Library
Module
Module type
Parameter
Class
Class type
module Data = Sqlite3.Data
module Rc = Sqlite3.Rc
type db = Sqlite3.db
exception RcError of Rc.t
Exception raised by most of the functions below when a Sqlite failure occurs, with the corresponding error code.
exception Type_error of Data.t
Exception raised when the declared Ty.t
does not match the actual result returned by Sqlite.
type t = db
Alias for the DB connection
val check_ret_exn : Rc.t -> unit
Check return code.
val setup_timeout : ?ms:int -> t -> unit
on "busy", wait ms
milliseconds before failing.
val with_db :
?mode:[ `NO_CREATE | `READONLY ] ->
?mutex:[ `FULL | `NO ] ->
?cache:[ `PRIVATE | `SHARED ] ->
?vfs:string ->
?timeout:int ->
string ->
(t -> 'a) ->
'a
Temporarily open a DB connection. Parameters follow Sqlite3.db_open
.
module Ty : sig ... end
Values representing types to pass to a statement, or to extract from a row
module Cursor : sig ... end
val with_stmt : t -> string -> f:(Sqlite3.stmt -> 'a) -> 'a
Locally make a statement out of the given string, then cleanup when f
returns.
val exec0_exn : t -> string -> unit
Run the query purely for its side effects.
val exec_raw_args :
t ->
string ->
Sqlite3.Data.t array ->
f:(Data.t array Cursor.t -> 'b) ->
('b, Rc.t) Stdlib.result
val exec_raw_args_exn :
t ->
string ->
Sqlite3.Data.t array ->
f:(Data.t array Cursor.t -> 'b) ->
'b