Current.Db
Access to the sqlite database.
val v : t Stdlib.Lazy.t
An sqlite database stored in state_dir "db"
.
exec stmt values
executes stmt values
. Raises an exception on error.
query stmt values
executes the SQL query stmt values
and returns the resulting rows.
query_one stmt values
executes the SQL query stmt values
and returns the single resulting row. Raises an exception if there are no results or multiple results.
query_some stmt values
executes the SQL query stmt values
and returns the single resulting row, or None
if there are no results. Raises an exception if there are multiple results.
val exec_literal : t -> string -> unit
exec_literal t sql
executes sql
on t
. Raises an exception on error.