No matching definitions.

sqlite/stmt

src/sqlite/stmt.tur
defn

stmt-step

(stmt-step [stmt :int] :int)

advance a prepared statement to the next result row.

stmtstatement handle (opaque :int from db-prepare)

1 if a row is available, 0 if execution is complete, -1 on error.

(while (= 1 (stmt-step stmt)) (process-row stmt))

Since: P2

defn

stmt-bind-int

(stmt-bind-int [stmt :int i :int value :int] :bool)

bind a 64-bit integer to a statement parameter (1-indexed).

stmtstatement handle
i1-based parameter index
valueinteger value to bind

true on success, false on error.

(stmt-bind-int stmt 1 42)

Since: P2

defn

stmt-bind-real

(stmt-bind-real [stmt :int i :int value :float] :bool)

bind a double to a statement parameter (1-indexed).

stmtstatement handle
i1-based parameter index
valuedouble value to bind

true on success, false on error.

(stmt-bind-real stmt 1 3.14)

Since: P2

defn

stmt-bind-text

(stmt-bind-text [stmt :int i :int value :cstr] :bool)

bind a text string to a statement parameter (1-indexed).

stmtstatement handle
i1-based parameter index
valueNUL-terminated string to bind (copied by SQLite)

true on success, false on error.

(stmt-bind-text stmt 1 "Alice")

Since: P2

defn

stmt-bind-null

(stmt-bind-null [stmt :int i :int] :bool)

bind a SQL NULL to a statement parameter (1-indexed).

stmtstatement handle
i1-based parameter index

true on success, false on error.

(stmt-bind-null stmt 2)

Since: P2

defn

stmt-reset

(stmt-reset [stmt :int] :bool)

reset a prepared statement so it can be re-executed.

stmtstatement handle

true on success, false on error.

(stmt-reset stmt)

Since: P2

defn

stmt-finalize

(stmt-finalize [stmt :int] :bool)

finalize and free a prepared statement.

stmtstatement handle

true always.

(stmt-finalize stmt)

Since: P2