fluent-sqlite-driver
fluent-sqlite-driver copied to clipboard
Getting a pragma value
I'm having a hard time figuring out how to get a pragma value out of SQLite using Fluent. Any pointers?
@adamnemecek was this solved in Discord?
try await (req.db as! any SQLDatabase).raw("PRAGMA some_pragma_or_other").first()?.decode(column: "some_pragma_or_other", as: Int.self)
See also https://github.com/vapor/sqlite-kit/blob/main/Tests/SQLiteKitTests/SQLiteKitTests.swift#L92-L93