openRawDatabase method

FutureOr<Database> openRawDatabase({
  1. bool readOnly = false,
})

Opens a synchronous sqlite.Database directly in the current isolate.

This gives direct access to the database, but:

  1. No app-level locking is performed automatically. Transactions may fail with SQLITE_BUSY if another isolate is using the database at the same time.
  2. Other connections are not notified of any updates to tables made within this connection.

Implementation

FutureOr<Database> openRawDatabase({bool readOnly = false}) async {
  return openFactory
      .open(SqliteOpenOptions(primaryConnection: false, readOnly: readOnly));
}