API reference › @evolu/sqlite-wasm › c-api › sqlite3_prepare_v2
function sqlite3_prepare_v2(
deps: SqliteWasmDep,
): (
db: SqliteDbPtr,
zSql: WasmPtr,
nByte: number,
ppStmt: WasmPtr,
pzTail: 0 | WasmPtr,
) => SqliteResultCode;
Defined in: packages/sqlite-wasm/src/CApi.ts:1808
Compiles the first statement of UTF-8 SQL as sqlite3_prepare_v3 does
with no flags, reading at most nByte bytes or up to a NUL when nByte is
negative, and writes the statement to *ppStmt and the address of the
uncompiled rest to *pzTail. *ppStmt is NULL on error and for SQL without
a statement, such as only a comment; the caller finalizes a non-NULL one.
Wasm type i(iiiii). Signature ["sqlite3_prepare_v2", "int", "sqlite3*", "*", "int", "**", "**"] from Evolu's supplement: SQLite binds it by hand to
accept JavaScript strings.