sig
module Rc :
sig
type unknown
external int_of_unknown : unknown -> int = "%identity"
type t =
OK
| ERROR
| INTERNAL
| PERM
| ABORT
| BUSY
| LOCKED
| NOMEM
| READONLY
| INTERRUPT
| IOERR
| CORRUPT
| NOTFOUND
| FULL
| CANTOPEN
| PROTOCOL
| EMPTY
| SCHEMA
| TOOBIG
| CONSTRAINT
| MISMATCH
| MISUSE
| NOFLS
| AUTH
| FORMAT
| RANGE
| NOTADB
| ROW
| DONE
| UNKNOWN of unknown
val to_string : t -> string
end
module Data :
sig
type t =
NONE
| NULL
| INT of int64
| FLOAT of float
| TEXT of string
| BLOB of string
val to_string : t -> string
val to_string_debug : t -> string
end
exception Rc of Sqlite3EZ.Rc.t
exception Finally of exn * exn
type db
val db_open :
?mode:[ `NO_CREATE | `READONLY ] ->
?mutex:[ `FULL | `NO ] ->
?cache:[ `PRIVATE | `SHARED ] -> ?vfs:string -> string -> Sqlite3EZ.db
val db_close : Sqlite3EZ.db -> unit
val with_db :
?mode:[ `NO_CREATE | `READONLY ] ->
?mutex:[ `FULL | `NO ] ->
?cache:[ `PRIVATE | `SHARED ] ->
?vfs:string -> string -> (Sqlite3EZ.db -> 'a) -> 'a
val transact : Sqlite3EZ.db -> (Sqlite3EZ.db -> 'a) -> 'a
val atomically : Sqlite3EZ.db -> (Sqlite3EZ.db -> 'a) -> 'a
val exec : Sqlite3EZ.db -> string -> unit
val last_insert_rowid : Sqlite3EZ.db -> Int64.t
val changes : Sqlite3EZ.db -> int
type statement
val make_statement : Sqlite3EZ.db -> string -> Sqlite3EZ.statement
val statement_exec : Sqlite3EZ.statement -> Sqlite3EZ.Data.t array -> unit
val statement_query :
Sqlite3EZ.statement ->
Sqlite3EZ.Data.t array ->
(Sqlite3EZ.Data.t array -> 'a) -> ('a -> 'b -> 'b) -> 'b -> 'b
val statement_finalize : Sqlite3EZ.statement -> unit
val db_handle : Sqlite3EZ.db -> Sqlite3.db
end