package catapult-sqlite

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module P = Catapult
type t
val create : ?sync:[ `OFF | `NORMAL | `FULL ] -> ?append:bool -> ?file:string -> trace_id:string -> dir:string -> unit -> t

Open writer into a database file.

  • parameter append

    if true, append to existing records (default false)

  • parameter file

    if provided, path to the file

  • parameter dir

    directory into which to place the file if file not provided

  • parameter trace_id

    basename for the file if file not provided

  • parameter sync

    controls "PRAGMA SYNCHRONOUS". Default is `NORMAL which is safe; `OFF is much faster but might corrupt DB if the machin crashes. See https://sqlite.org/pragma.html#pragma_synchronous

val cycle_stmt : t -> unit

Close and recreate internal state.

val close : t -> unit

Close writer.

val write_string_l : t -> string list -> unit
val write_string : t -> string -> unit

Send a json encoded event. Thread safe.