(** Use the [[Init]] module to open a new database handle. Each object type has its own module with functions to create, modify, save and destroy objects of that type into the SQLite database
(** [t db_name] open a Sqlite3 database with filename [db_name] and create any tables if they are missing. @return a database handle which can be used to create and retrieve objects in the database.
@raise Sql_error if a database error is encountered
*)
valdb:t->Sqlite3.db
(** [db handle] @return the underlying Sqlite3 database handle for the connection, for advanced queries.
*)
end
(** Use the [[Init]] module to open a new database handle. Each
object type has its own module with functions to create, modify, save
and destroy objects of that type into the SQLite database *)
(** [create db_name] opens a Sqlite3 database with filename
[db_name] and create any tables if they are missing.
@return a
database handle which can be used to create and retrieve objects in
the database. @raise Sql_error if a database error is
encountered *)
valraw:handle->Sqlite3.db
(** [raw db] @return the underlying Sqlite3 database for the
connection, for advanced queries. *)
moduleLoc:sig
typet=<
id:int64option;
set_id:int64option->unit;
file:string;
set_file:string->unit;
line:int64;
set_line:int64->unit;
start:int64;
set_start:int64->unit;
stop:int64;
set_stop:int64->unit;
save:int64;delete:unit
>
(** An object which can be stored in the database with the [save] method call, or removed by calling [delete]. Fields can be accessed via the approriate named method and set via the [set_] methods. Changes are not committed to the database until [save] is invoked.
*)
typet={
mutableid:int64option;
mutablefile:string;
mutableline:int64;
mutablestart:int64;
mutablestop:int64;
}
(** A record which can be stored in the database with the [save]
function, or removed by calling [delete]. Changes are not
committed to the database until [save] is invoked. *)
valsave:t->int64
valdelete:t->unit
valt:
?id:int64option->
?id:int64->
file:string->
line:int64->
start:int64->
stop:int64->
Init.t->t
(** Can be used to construct a new object. If [id] is not specified, it will be automatically assigned the first time [save] is called on the object. The object is not committed to the database until [save] is invoked. The [save] method will also return the [id] assigned to the object.
@raise Sql_error if a database error is encountered
t
(** Can be used to construct a new object. If [id] is not specified, it will be automatically assigned the first time [save] is called on the object. The object is not committed to the database until [save] is invoked. The [save] method will also return the [id] assigned to the object.
@raise Sql_error if a database error is encountered