sqlite_wasm_rs

Module c

Source
Expand description

This module provides some C-Like interfaces from sqlite-wasm.

Re-exports§

Functions§

  • Implementations of aggregate SQL functions use this routine to allocate memory for storing their state.
  • Bind a BLOB value to a parameter in a prepared statement.
  • Bind a double precision floating point number to a parameter in a prepared statement.
  • Bind an integer number to a parameter in a prepared statement.
  • Bind a 64 bit integer number to a parameter in a prepared statement.
  • Bind a NULL value to a parameter in a prepared statement.
  • Bind a TEXT value to a parameter in a prepared statement.
  • Returns the number of rows modified, inserted or deleted by the most recently completed INSERT, UPDATE or DELETE statement on the database connection specified by the only parameter. Executing any other type of SQL statement does not modify the value returned by these functions. REturn value is undefined if the number of changes is bigger than 32 bits. Use sqlite3_changes64() instead in these cases.
  • Destructor for the sqlite3 object.
  • Destructor for the sqlite3 object.
  • Returns the number of columns in the result set returned by the prepared statement.
  • Returns the name assigned to a particular column in the result set of a SELECT statement.
  • Get a sql_value* result value from a column in the current result row.
  • Returns a copy of the pointer to the database connection (the 1st parameter) of the sqlite3_create_function() routine that originally registered the application defined function.
  • Add a collation to a database connection.
  • Add SQL function or aggregation or redefine the behavior of an existing SQL function or aggregation.
  • Returns the database connection handle to which a prepared statement belongs. The database connection returned by sqlite3_db_handle is the same database connection that was the first argument to the sqlite3_prepare_v2() call (or its variants) that was used to create the statement in the first place.
  • Causes the database connection db to disconnect from database schema and then reopen schema as an in-memory database based on the serialization contained in data. The serialized database data is dbSize bytes in size. bufferSize is the size of the buffer data, which might be larger than dbSize. If bufferSize is larger than dbSize, and the SQLITE_DESERIALIZE_READONLY bit is not set in flags, then SQLite is permitted to add content to the in-memory database as long as the total size does not exceed bufferSize bytes.
  • If the most recent sqlite3_* API call associated with database connection db failed, then the sqlite3_errmsg(db) interface returns English- language text that describes the error.
  • A convenience wrapper around sqlite3_prepare_v2(), sqlite3_step(), and sqlite3_finalize(), that allows an application to run multiple statements of SQL without having to use a lot of C code.
  • If the most recent sqlite3_* API call associated with database connection db failed, then the sqlite3_extended_errcode(db) interface returns the extended result code for that API call, even when extended result codes are disabled.
  • The sqlite3_finalize() function is called to delete a prepared statement. If the most recent evaluation of the statement encountered no errors or if the statement is never been evaluated, then sqlite3_finalize() returns SQLITE_OK. If the most recent evaluation of statement stmt failed, then sqlite3_finalize(stmt) returns the appropriate error code or extended error code.
  • Calling sqlite3_free() with a pointer previously returned by sqlite3_malloc() or sqlite3_realloc() releases that memory so that it might be reused.
  • Open an SQLite database file as specified by the filename argument and support opfs vfs on wasm platform.
  • Compiles a prepared statement.
  • Called to reset a [prepared statement] object back to its initial state, ready to be re-executed. Any SQL statement variables that had values bound to them using the sqlite3_bind_*() API retain their values. Use sqlite3_clear_bindings() to reset the bindings.
  • Sets the result from an application-defined function to be the BLOB whose content is pointed to by the second parameter and which is blobLen bytes long.
  • Sets the result from an application-defined function to be a floating point value specified by its 2nd argument.
  • Cause the implemented SQL function to throw an exception.
  • Sets the return value of the application-defined function to be the 32-bit signed integer value given in the 2nd argument.
  • Sets the return value of the application-defined function to be the 64-bit signed integer value given in the 2nd argument.
  • Sets the return value of the application-defined function to be NULL.
  • Set the return value of the application-defined function to be a text string
  • Returns a pointer to memory that is a serialization of the schema database on database connection db. If piSize is not a NULL pointer, then the size of the database in bytes is written into *piSize.
  • After a prepared statement has been prepared using any of sqlite3_prepare_v2(), sqlite3_prepare_v3(), sqlite3_prepare16_v2(), or sqlite3_prepare16_v3() or one of the legacy interfaces sqlite3_prepare() or sqlite3_prepare16(), this function must be called one or more times to evaluate the statement.
  • Returns a copy of the pointer that was the pUserData parameter (the 5th parameter) of the sqlite3_create_function() routine that originally registered the application defined function.
  • Extract a BLOB value from a protected sqlite3_value object.
  • Get the size of a BLOB or TEXT value in bytes from a protected sqlite3_value object.
  • Extract a REAL value from a protected sqlite3_value object.
  • Makes a copy of the sqlite3_value object sqliteValue and returns a pointer to that copy. The sqlite3_value returned is a protected sqlite3_value object even if the input is not. If `sqliteValue is a pointer value, then the result is a NULL value.
  • Frees an sqlite3_value object previously obtained from sqlite3_value_dup().
  • Extract a INTEGER value from a protected sqlite3_value object.
  • Extract a 64-bit INTEGER value from a protected sqlite3_value object.
  • Extract a TEXT value from a protected sqlite3_value object.
  • Get the default datatype of the value from a protected sqlite3_value object.