How to enable pragmas with SqliteDialect
Hello, I am using SqliteDialect and want to enable foreign_keys pragma.
From SQLite Docs:
Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection.I was trying to use SqliteDialect's onCreateConnection to enable this. But the issue is that
onCreateConnection
provides me a DatabaseConnection
instance. DatabaseConnection.executeQuery
expects a CompiledQuery
. To compile a query I can do something like but the problem is that I don't have a db
because I am creating a dialect which I will then use to create a db
.
Is there something I am missing or is there a better way to achieve this ?2 Replies
Solution
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Oh great. Thank you. Your repo looks very useful too.