wasm library wasm

Experimental access to sqlite3 on the web.

Using this library requires additional setup, see the readme of the sqlite3 package for details.

Also, please note that this library is not production-ready at the moment and should be used with caution. In particular, the implementation of the virtual file system used to store persistent databases may change in a way that requires migration work in the future.

Classes

AggregateContext<V> common
Application-defined context used to compute results in aggregate functions.
AggregateFunction<V> common
Interface for application-defined aggregate functions.
AllowedArgumentCount common
Describes how many arguments an application-defined sql function can take.
BaseVfsFile common
A VirtualFileSystemFile base class that implements xRead to zero-fill the buffer in case of short reads.
BaseVirtualFileSystem common
A VirtualFileSystem implementation that uses a Random instance for xRandomness and DateTime.now for xCurrentTime.
CommonDatabase common
An opened sqlite3 database.
CommonPreparedStatement common
A prepared statement.
CommonSqlite3 common
Provides access to sqlite3 functions, such as opening new databases.
Cursor common
Base class for result sets.
CustomStatementParameter common
A parameter passed to prepared statements that decides how it gets mapped to SQL in applyTo.
DatabaseConfig common
Make configuration changes to the database connection.
IndexedDbFileSystem wasm
A file system storing files divided into blocks in an IndexedDB database.
InMemoryFileSystem common
A virtual file system implementation that stores all files in memory.
IteratingCursor common
A Cursor that can only be read once, obtaining rows from the database "on the fly" as moveNext is called.
ResultSet common
Stores the full result of a select statement.
Row common
A single row in the result of a select statement.
SimpleOpfsFileSystem wasm
A VirtualFileSystem for the sqlite3 wasm library based on the file system access API.
SqlDeviceCharacteristics
SqlError common
Common result codes, https://www.sqlite.org/rescode.html Result Codes
SqlExtendedError common
Extended Result Codes, https://www.sqlite.org/rescode.html
SqlFileLockingLevels common
File lock levels, https://www.sqlite.org/c3ref/c_lock_exclusive.html
SqlFlag common
Flags for file open operations, https://www.sqlite.org/c3ref/c_open_autoproxy.html Flags For File Open Operations
SqlFunctionFlag common
Function flags, https://www.sqlite.org/c3ref/c_deterministic.html
Sqlite3Filename common
A filename passed to VirtualFileSystem.xOpen.
SqliteUpdate common
A data change notification from sqlite.
SqlPrepareFlag common
Prepare flags, https://www.sqlite.org/c3ref/c_prepare_normalize.html
SqlSpecialDestructor common
Special destructors, https://www.sqlite.org/c3ref/c_static.html
SqlTextEncoding common
Text Encodings, https://www.sqlite.org/c3ref/c_any.html These constant define integer codes that represent the various text encodings supported by SQLite.
SqlType common
Datatypes, https://sqlite.org/c3ref/c_blob.html
StatementParameters common
A set of values that can be used to bind parameters in a SQL query.
Version
Version information about the sqlite3 library in use.
VfsWorker wasm
Contains code used to implement web workers that are prodiving synchronous access to asynchronous web APIs (like OPFS).
VirtualFileSystem common
A virtual filesystem used by sqlite3 to access the current I/O environment.
VirtualFileSystemFile common
A file implemented by a VFS author and returned by VirtualFileSystem.xOpen.
WasmSqlite3 wasm
A WebAssembly version of the CommmonSqlite3 interface.
WasmVfs wasm
A VFS implementation based on the file system access API without shared workers.
WindowFunction<V> common
A window function for sqlite3.

Enums

OpenMode
Controls how databases should be opened by sqlite
SqliteUpdateKind common
The kind of an SqliteUpdate received through a CommonDatabase.updates stream.

Extension Types

WorkerOptions wasm
Options created by an WasmVfs. These include the shared array buffers used to make asynchronous web APIs synchronous for SQLite.

Constants

jsonb → const Codec<Object?, Uint8List> common
A Codec capable of converting Dart objects from and to the JSONB format used by sqlite3.
SQLITE_DBCONFIG_DQS_DDL → const int
SQLITE_DBCONFIG_DQS_DML → const int
SQLITE_DELETE → const int
SQLITE_INSERT → const int
SQLITE_UPDATE → const int

Properties

bigIntMaxValue64 BigInt
final
bigIntMinValue64 BigInt
final

Typedefs

CollatingFunction = int Function(String? textA, String? textB)
A collating function provided to a sql collation.
ScalarFunction = Object? Function(List<Object?> arguments)
A scalar function exposed to sql.
VoidPredicate = bool Function()
A filter function without any arguments.
XOpenResult = ({VirtualFileSystemFile file, int outFlags})
The result of VirtualFileSystem.xOpen.

Exceptions / Errors

SqliteException common
Thrown by sqlite methods.
VfsException common
An exception thrown by VirtualFileSystem implementations written in Dart to signal that an operation could not be completed.