Alexander Perfilyev
Alexander Perfilyev

Reputation: 6829

How to use new compiled statements in sqldelight with sqlbrite?

Since I cannot obtain SQLiteOpenHelper instance from BriteDatabase, how can I create compiled insert/update/delete statement from my model? Methods that return SqlDelightStatement are marked as deprecated in SqlDelight 0.5.1. I'm using SqlBrite 0.8.0 and I see there's a BriteDatabase#executeInsert(String, SQLiteStatement) and so on.

Upvotes: 3

Views: 949

Answers (1)

Anstrong
Anstrong

Reputation: 754

EDIT December 27th 2016: SQLBrite version 1.1.0 and up now exposes its own getWritableDatabase()

It's worth noting that calling getWritableDatabase() can potentially create or migrate a database so make sure you're calling it from a background thread!

Upvotes: 3

Related Questions