opened

fun opened(pool: SQLiteConnectionPool, scope: CoroutineScope, schema: Schema, identifier: String, logger: Logger): PowerSyncDatabase(source)

Creates a PowerSync database managed by an external connection pool.

In this case, PowerSync will not open its own SQLite connections, but rather refer to connections in the pool.

The identifier parameter should be a name identifying the path of the database. The PowerSync SDK will emit a warning if multiple databases are opened with the same identifier, and uses internal locks to ensure these two databases are not synced at the same time (which would be inefficient and can cause consistency issues).