Module Ask_sqlite3.Stmt

Low-level prepared statement interface.

type db = t
type t

The type for pepared statements.

val create : db -> string -> (terror) Stdlib.result

create db sql is a statement for sql sql in database db. This statement is not part of the cache of db you have to finalize it yourself. All statements should be finalized before you close d, otherwise close d will error on close.

type 'r step

The type for stepping through row results of type 'r.

val start : t -> 'r Ask.Sql.Stmt.t -> ('r steperror) Stdlib.result

start s sb starts the statement s as bound by sb. This resets the prepared statement and binds the arguments of sb.

val step : 'b step -> ('b optionerror) Stdlib.result

step s is the next result in s, or None if the query has finished executing.

val finalize : t -> (unit, error) Stdlib.result

inalize s finalizes statement st.