You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you sure that the example code you posted is representative of your actual code? That syntax looks correct and should not result in the error you gave.
Here's an example based on one of the library's unit tests:
const{ sql }=newSQLocal({databasePath: 'test.sqlite3',onInit: (sql)=>{return[sql`PRAGMA foreign_keys = ON`];},});const[foreignKeys]=awaitsql`PRAGMA foreign_keys`;// foreignKeys should be { foreign_keys: 1 }
Thank you for the reply!
I realized that i was using an old version of sqlocal, now it works!
First i thought it has to do with my sqlite3.wasm file because i use the binaries from this project: https://github.com/utelle/SQLite3MultipleCiphers
but it was just a problem with the wrong version!
Thank you for your great library!
I am trying to use the "onInit" callback to set a few PRAGMAs, but i am unable to get it working.
What is the right syntax? I tried:
and get the error:
It doesn't work, even when i try other ways like it is explained in the docs for the "batch" command.
Could you please give me a working example?
The text was updated successfully, but these errors were encountered: