wasm library Web only
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> Cross-platform definitions - Application-defined context used to compute results in aggregate functions.
-
AggregateFunction<
V> Cross-platform definitions - Interface for application-defined aggregate functions.
- AllowedArgumentCount Cross-platform definitions
- Describes how many arguments an application-defined sql function can take.
- ApplyChangesetOptions
- BaseVfsFile Cross-platform definitions
- A VirtualFileSystemFile base class that implements xRead to zero-fill the buffer in case of short reads.
- BaseVirtualFileSystem Cross-platform definitions
- A VirtualFileSystem implementation that uses a Random instance for xRandomness and DateTime.now for xCurrentTime.
- Changeset Cross-platform definitions
- A changeset, representing changes made while a Session is active.
- ChangesetIterator
- An Iterator through a Changeset or Patchset.
- ChangesetOperation Cross-platform definitions
- A recorded operation on a changeset.
- CommonDatabase Cross-platform definitions
- An opened sqlite3 database.
- CommonPreparedStatement Cross-platform definitions
- A prepared statement.
- CommonSqlite3 Cross-platform definitions
-
Provides access to
sqlite3functions, such as opening new databases. - Cursor Cross-platform definitions
- Base class for result sets.
- CustomStatementParameter Cross-platform definitions
- A parameter passed to prepared statements that decides how it gets mapped to SQL in applyTo.
- DatabaseConfig Cross-platform definitions
- Make configuration changes to the database connection.
- IndexedDbFileSystem Web only
- A file system storing files divided into blocks in an IndexedDB database.
- InMemoryFileSystem Cross-platform definitions
- A virtual file system implementation that stores all files in memory.
- IteratingCursor Cross-platform definitions
- A Cursor that can only be read once, obtaining rows from the database "on the fly" as moveNext is called.
- Patchset Cross-platform definitions
- A patchset obtained from a byte sequence or an active Session.
- ResultSet Cross-platform definitions
- Stores the full result of a select statement.
- Row Cross-platform definitions
- A single row in the result of a select statement.
- Session Cross-platform definitions
- A Session tracks database changes made by a Conn. It is used to build changesets.
- SimpleOpfsFileSystem Web only
-
A VirtualFileSystem for the
sqlite3wasm library based on the file system access API. - SqlDeviceCharacteristics
- SqlError Cross-platform definitions
- Common result codes, https://www.sqlite.org/rescode.html Result Codes
- SqlExtendedError Cross-platform definitions
- Extended Result Codes, https://www.sqlite.org/rescode.html
- SqlFileLockingLevels Cross-platform definitions
- File lock levels, https://www.sqlite.org/c3ref/c_lock_exclusive.html
- SqlFlag Cross-platform definitions
- Flags for file open operations, https://www.sqlite.org/c3ref/c_open_autoproxy.html Flags For File Open Operations
- SqlFunctionFlag Cross-platform definitions
- Function flags, https://www.sqlite.org/c3ref/c_deterministic.html
- Sqlite3Filename Cross-platform definitions
- A filename passed to VirtualFileSystem.xOpen.
- SqliteArguments Cross-platform definitions
- Arguments passed to a user-defined SQLite function.
- SqliteUpdate Cross-platform definitions
- A data change notification from sqlite.
- SqlPrepareFlag Cross-platform definitions
- Prepare flags, https://www.sqlite.org/c3ref/c_prepare_normalize.html
- SqlSpecialDestructor Cross-platform definitions
- Special destructors, https://www.sqlite.org/c3ref/c_static.html
- SqlTextEncoding Cross-platform definitions
- 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 Cross-platform definitions
- Datatypes, https://sqlite.org/c3ref/c_blob.html
- StatementParameters Cross-platform definitions
- 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 Web only
- Contains code used to implement web workers that are prodiving synchronous access to asynchronous web APIs (like OPFS).
- VirtualFileSystem Cross-platform definitions
- A virtual filesystem used by sqlite3 to access the current I/O environment.
- VirtualFileSystemFile Cross-platform definitions
- A file implemented by a VFS author and returned by VirtualFileSystem.xOpen.
- WasmSqlite3 Web only
-
A WebAssembly version of the
CommmonSqlite3interface. - WasmVfs Web only
- A VFS implementation based on the file system access API without shared workers.
-
WindowFunction<
V> Cross-platform definitions - A window function for sqlite3.
Enums
- ApplyChangesetConflict
- OpenMode
- Controls how databases should be opened by sqlite
- SqliteUpdateKind Cross-platform definitions
- The kind of an SqliteUpdate received through a CommonDatabase.updates stream.
Extension Types
- SubtypedValue Cross-platform definitions
- A value that will be passed to SQLite as a return value with an additional subtype (encoded as a byte value) attached to it.
- WorkerOptions Web only
- 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> Cross-platform definitions - 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(SqliteArguments 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 Cross-platform definitions
- Thrown by sqlite methods.
- VfsException Cross-platform definitions
- An exception thrown by VirtualFileSystem implementations written in Dart to signal that an operation could not be completed.