Android – how to use new compiled statements in sqldelay with sqlbrite?
•
Android
Since sqliteopenhelper instance cannot be obtained from britedatabase, how to create compiled insert / update / delete statements from the model? The method returning sqldelightstatement is marked as deprecated in sqldelight 0.5.1. I am using sqlbrite 0.8.0. I see a britedatabase#executeinsert (string, sqlitestatement), and so on
resolvent:
Editor December 27, 2016: sqlbrite version 1.1.0 and later now exposes its own getwritabledatabase ()
It is worth noting that calling getwritabledatabase () may create or migrate the database, so please make sure you call it from the background thread!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码