Module IBase.SqliteUtils
- exception- Error of string
- The functions in this module tend to raise more often than their counterparts in - Sqlite3. In particular, they may raise if the- Sqlite3.Rc.tresult of certain operations is unexpected.
- val check_result_code : Sqlite3.db -> log:string -> Sqlite3.Rc.t -> unit
- Assert that the result is either - Sqlite3.Rc.OKor- Sqlite3.Rc.ROW. If the result is not valid, raise- Error.
- val exec : Sqlite3.db -> log:string -> stmt:string -> unit
- Execute the given Sqlite - stmtand check the result with- check_result_code.
- val finalize : Sqlite3.db -> log:string -> Sqlite3.stmt -> unit
- Finalize the given - stmt. Raises- Erroron failure.
- val result_fold_rows : ?finalize:bool -> Sqlite3.db -> log:string -> Sqlite3.stmt -> init:'a -> f:('a -> Sqlite3.stmt -> 'a) -> 'a
- Fold - fover each row of the result.- fmust not access the database.
- val result_fold_single_column_rows : ?finalize:bool -> Sqlite3.db -> log:string -> Sqlite3.stmt -> init:'b -> f:('b -> Sqlite3.Data.t -> 'b) -> 'b
- Like - result_fold_rowsbut pass column 0 of each row in the results to- f.
- val result_option : ?finalize:bool -> Sqlite3.db -> log:string -> read_row:(Sqlite3.stmt -> 'a) -> Sqlite3.stmt -> 'a option
- Same as - result_fold_rowsbut asserts that at most one row is returned.
- val result_single_column_option : ?finalize:bool -> Sqlite3.db -> log:string -> Sqlite3.stmt -> Sqlite3.Data.t option
- Same as - result_fold_single_column_rowsbut asserts that at most one row is returned.
- val result_unit : ?finalize:bool -> Sqlite3.db -> log:string -> Sqlite3.stmt -> unit
- Same as - result_fold_rowsbut asserts that no row is returned.
- val db_close : Sqlite3.db -> unit
- Close the given database and asserts that it was effective. Raises - Errorif not.
- module type Data = sig ... end
- An API commonly needed to store and retrieve objects from the database 
- module MarshalledDataNOTForComparison : functor (D : sig ... end) -> Data with type t = D.t
- A default implementation of the Data API that encodes every objects as marshalled blobs 
- module MarshalledNullableDataNOTForComparison : functor (D : sig ... end) -> Data with type t = D.t option
- A default implementation of the Data API that encodes None as a NULL SQLite value