API reference › @evolu/sqlite-wasm › c-api › sqlite3_backup_init
function sqlite3_backup_init(
deps: SqliteWasmDep,
): (
pDest: SqliteDbPtr,
zDestName: CStringPtr,
pSource: SqliteDbPtr,
zSourceName: CStringPtr,
) => 0 | SqliteBackupPtr;
Defined in: packages/sqlite-wasm/src/CApi.ts:1566
Prepares to copy the database zSourceName of pSource, such as main, into the database zDestName of pDest, which sqlite3_backup_step does, and returns the backup, or NULL with the error in pDest. It fails while pDest has any transaction open, when both are the same connection, and for an unknown database name.
Wasm type i(iiii). Signature ["sqlite3_backup_init", "sqlite3_backup*", "sqlite3*", "string", "sqlite3*", "string"] from SQLite's table.