SqliteConnection.synchronousWrapper constructor
SqliteConnection.synchronousWrapper(
- CommonDatabase raw, {
- Mutex? mutex,
- bool? profileQueries,
Creates a SqliteConnection instance that wraps a raw CommonDatabase
from the sqlite3 package.
Users should not typically create connections manually at all. Instead,
open a SqliteDatabase through a factory. In special scenarios where it
may be easier to wrap a raw databases (like unit tests), this method
may be used as an escape hatch for the asynchronous wrappers provided by
this package.
When profileQueries is enabled (it's enabled by default outside of
release builds, queries are posted to the dart:developer timeline).
Implementation
factory SqliteConnection.synchronousWrapper(CommonDatabase raw,
{Mutex? mutex, bool? profileQueries}) {
return SyncSqliteConnection(raw, mutex ?? Mutex(),
profileQueries: profileQueries);
}