API reference › @evolu/sqlite-wasm › c-api › sqlite3_sql

function sqlite3_sql(
  deps: SqliteWasmDep,
): (pStmt: SqliteStmtPtr) => 0 | CStringPtr;

Defined in: packages/sqlite-wasm/src/CApi.ts:1909

Returns the SQL text a statement was prepared from, which SQLite frees when the statement is finalized, or NULL for a statement from the legacy sqlite3_prepare, which this build does not export.

Wasm type i(i). Signature ["sqlite3_sql", "string", "sqlite3_stmt*"] from SQLite's table.

See https://sqlite.org/c3ref/expanded_sql.html.