wrapConnection

fun wrapConnection(connection: DatabaseConnection, block: (SqlDriver) -> Unit)

Sqliter's DatabaseConfiguration takes lambda arguments for it's create and upgrade operations, which each take a DatabaseConnection argument. Use wrapConnection to have SqlDelight access this passed connection and avoid the pooling that the full SqlDriver instance performs.

Note that queries created during this operation will be cleaned up. If holding onto a cursor from a wrap call, it will no longer be viable.