diff --git a/src/letsqlite.ml b/src/letsqlite.ml index c34b9c5..8f5a94b 100644 --- a/src/letsqlite.ml +++ b/src/letsqlite.ml @@ -55,6 +55,7 @@ let prepare_keep keep db stmt v = try Norm (v,(keep, S.prepare db stmt)) with _ -> Failed Rc.ERROR let prepare db s v = prepare_keep false db s v +let prepare0 db s = prepare db s () let reprepare db stmt (v,(b,s)) = let x = if not b then S.finalize s else Rc.OK diff --git a/src/letsqlite.mli b/src/letsqlite.mli index 0ba7c9a..e01e6fe 100644 --- a/src/letsqlite.mli +++ b/src/letsqlite.mli @@ -102,6 +102,9 @@ val prepare : Sqlite3.db -> string -> 'a -> 'a stmt_m the statement in [s]. *) +val prepare0 : Sqlite3.db -> string -> unit stmt_m +(** [prepare0 db stmt] is equivalent to [prepare db stmt ()]. *) + val prepare_keep : bool -> Sqlite3.db -> string -> 'a -> 'a stmt_m (** [prepare_keep b] is like [prepare], but [b] is the preserve-on-failure file.