discontinuedPackage powersync_core has been discontinued and replaced by powersync.

withAllConnections<T> abstract method

Future<T> withAllConnections<T>(
  1. Future<T> block(
    1. SqliteWriteContext writer,
    2. List<SqliteReadContext> readers
    )
)

Locks all underlying connections making up this database, and gives block access to all of them at once. This can be useful to run the same statement on all connections. For instance, ATTACHing a database, that is expected to be available in all connections.

Implementation

Future<T> withAllConnections<T>(
    Future<T> Function(
            SqliteWriteContext writer, List<SqliteReadContext> readers)
        block);