readTransaction<T> abstract method

Future<T> readTransaction<T>(
  1. Future<T> callback(
    1. SqliteReadContext tx
    ), {
  2. Duration? lockTimeout,
})

Open a read-only transaction.

Statements within the transaction must be done on the provided SqliteReadContext - attempting statements on the SqliteConnection instance will error.

Implementation

Future<T> readTransaction<T>(
    Future<T> Function(SqliteReadContext tx) callback,
    {Duration? lockTimeout});