Skip to content
New issue

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

Added ability to receive updates from sqlite3_update_hook #1267

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

soukand
Copy link
Contributor

@soukand soukand commented Dec 25, 2019

Currently there are event insert/update/delete events defined on javascript side, but they are not working c++ side.
The code was already implemented in pull request #1174, but tests weren't added, so i decided to add them myself.

Error: update is not a valid configuration option
    at Database.addListener.Database.on (D:\dvp\study_stack\cloudfs\node_modules\sqlite3\lib\sqlite3.js:154:14)
    at SQLITE.on (D:\dvp\study_stack\cloudfs\libs\sql.js:74:15)
    at test.run (D:\dvp\study_stack\cloudfs\test.js:12:14)
    at <anonymous> Error: update is not a valid configuration option
    at Database.addListener.Database.on (D:\dvp\study_stack\cloudfs\node_modules\sqlite3\lib\sqlite3.js:154:14)
    at SQLITE.on (D:\dvp\study_stack\cloudfs\libs\sql.js:74:15)
    at test.run (D:\dvp\study_stack\cloudfs\test.js:12:14)
    at <anonymous>

@cuberoot
Copy link

This would sure be useful. Any updates?

@kewde
Copy link
Collaborator

kewde commented Feb 20, 2020

Triggering CI again, this PR looks good.
Sorry for the delay.

@kewde kewde closed this Apr 19, 2020
@kewde kewde reopened this Apr 19, 2020
@tiendq
Copy link

tiendq commented Sep 15, 2020

Is it still open due to conflicts in database.cc?

src/database.cc Outdated Show resolved Hide resolved
@justinmoon
Copy link

This would be very useful for my project

@aceslick911
Copy link

+1 this :)

@daniellockyer
Copy link
Member

@soukand Would you be able to rebase the PR? 🙂

@maxpert
Copy link

maxpert commented Aug 18, 2022

+1 this will be a game changer for what I am working on. Can we get this merged?

@volkanunsal
Copy link

We need this too. Are there any plans to merge it anytime soon?

@daniellockyer
Copy link
Member

Hi all! 👋🏻 I am working on rebasing this myself but currently running into a situation where it causes the process to hang. I should have some more time next week to work on it 🙂

@daniellockyer daniellockyer changed the title added ability to receive updates from sqlite3_update_hook Added ability to receive updates from sqlite3_update_hook Sep 13, 2022
closes TryGhost#419

- this adds support for a `change` event which forwards events arising
  from `sqlite3_update_hook`
@daniellockyer daniellockyer merged commit 946a3f6 into TryGhost:master Sep 13, 2022
@daniellockyer
Copy link
Member

Thanks for the patience everyone - this will be released shortly 🙂

@codebrainz
Copy link

This seems to be missing from the documentation. Is there a more up-to-date API documentation than the Github wiki?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants