We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serialize
I need to execute few SQL queries and wrap it in transaction, to ensure data consistency. I see DB have method serialize and i've read the docs https://github.com/tryghost/node-sqlite3/wiki/Control-Flow
It is absolutely not clear how this method works technically. Some questions i have after read:
5.1.6
v18.16.0
npm i sqlite3
The text was updated successfully, but these errors were encountered:
For promises, I created prun using p/deferred from the promesa library in clojurescript:
prun
(defn- prun [db sql & [args]] (let [p (p/deferred)] #_(js/console.debug (format "running sql: %s with args: %s" sql args)) (.run db sql (if args (clj->js args) #js []) (fn [err] (if err (p/reject! p (js->clj err)) (p/resolve! p (this-as t {:last-id (.-lastID t) :changes (.-changes t)}))))) p))
You could do similarly in plain JavaScript.
Sorry, something went wrong.
No branches or pull requests
Issue Summary
I need to execute few SQL queries and wrap it in transaction, to ensure data consistency.
I see DB have method
serialize
and i've read the docs https://github.com/tryghost/node-sqlite3/wiki/Control-FlowIt is absolutely not clear how this method works technically. Some questions i have after read:
Steps to Reproduce
serialize
works under the hood, and how to create flat async code with few SQL queries inside transactionVersion
5.1.6
Node.js Version
v18.16.0
How did you install the library?
npm i sqlite3
The text was updated successfully, but these errors were encountered: