https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
k

krzysztof

06/29/2022, 3:11 PM
How could I execute pragmas (such as for WAL mode) using delight? I keep getting
Queries can be performed using SQLiteDatabase query or rawQuery methods only
from Android driver, either if I run is as labeled statement or just type it in my
.sq
schema
Native driver works fine
Just found a workaround for it:
Copy code
val driver = AndroidSqliteDriver(StorageDB.Schema, ctx, dbName)
        driver.executeQuery(null, "PRAGMA journal_mode=WAL;", 0).next()
This does not crash and executes query correctly. Still not quite sure why it crashes when using
execute
, but SO search told me that it’s due journal_mode pragma returning a value
8 Views