openRawDatabase method
Opens a synchronous sqlite.Database directly in the current isolate.
This gives direct access to the database, but:
- No app-level locking is performed automatically. Transactions may fail with SQLITE_BUSY if another isolate is using the database at the same time.
- Other connections are not notified of any updates to tables made within this connection.
Implementation
Future<sqlite.Database> openRawDatabase({bool readOnly = false}) async {
final db = await openFactory
.open(SqliteOpenOptions(primaryConnection: false, readOnly: readOnly));
return db;
}