native-driver / com.squareup.sqldelight.drivers.native / wrapConnection

wrapConnection

fun wrapConnection(connection: <ERROR CLASS>, block: (<ERROR CLASS>) ->Unit):Unit

Platform and version requirements: native

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.