Skip to content

Instantly share code, notes, and snippets.

@pahill
Created April 7, 2019 09:41
Show Gist options
  • Save pahill/a6a4fa1e10de466a2a9e7e55854d0b88 to your computer and use it in GitHub Desktop.
Save pahill/a6a4fa1e10de466a2a9e7e55854d0b88 to your computer and use it in GitHub Desktop.
private suspend fun <T> dbQuery(block: () -> T): T {
return withContext(Dispatchers.IO) {
transaction { block() }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment