sqlite_async library

High-performance asynchronous interface for SQLite on Dart & Flutter.

See SqliteDatabase as a starting point.

Classes

Mutex
An asynchronous mutex.
PlaceholderQueryFragment
A query fragment that can be embedded in another query.
SqliteConnection
Abstract class representing a connection to the SQLite database.
SqliteDatabase
A SQLite database instance.
SqliteDownMigration
Set of down migration statements, persisted in the database.
SqliteMigration
A migration for a single database version.
SqliteMigrations
Migrations to initialize and update a database.
SqliteOpenFactory
Factory to create new SQLite database connections.
SqliteOpenOptions
SqliteOptions
SqliteReadContext
Abstract class representing calls available in a read-only or read-write context.
SqliteWriteContext
Abstract class representing calls available in a read-write context.
SyncSqliteConnection
A simple "synchronous" connection which provides the async SqliteConnection implementation using a synchronous SQLite connection
UpdateNotification
Notification of an update to one or more tables, for the purpose of realtime change notifications.
WebSqliteOptions

Enums

SqliteJournalMode
SQLite journal mode. Set on the primary connection. This library is written with WAL mode in mind - other modes may cause unexpected locking behavior.
SqliteSynchronous
SQLite file commit mode.

Functions

quoteIdentifier(String s) String
quoteJsonIndex(int index) String
quoteJsonPath(String path) String
quoteString(String s) String
selectJsonColumnMap(Map<Object, String>? columnMap) PlaceholderQueryFragment
Similar to selectJsonColumns, but allows specifying different output columns. This is useful for using on a List of Lists, instead of a List of Objects.
selectJsonColumns(List<String> columns) PlaceholderQueryFragment
Given a list of columns, return an expression extracting the columns from a list of JSON-encoded objects.

Typedefs

SqliteMigrationFunction = FutureOr<void> Function(SqliteWriteContext tx)

Exceptions / Errors

AbortException
An exception thrown when calls to SqliteConnection.readLock, SqliteConnection.writeLock and similar methods are aborted or time out before a connection could be obtained from the pool.
LockError
MigrationError