Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

Added ability to receive updates from sqlite3_update_hook - #1267

Merged
daniellockyer merged 1 commit into
TryGhost:masterfrom
soukand:sqlite3_update_hook
Sep 13, 2022
Merged

Added ability to receive updates from sqlite3_update_hook#1267
daniellockyer merged 1 commit into
TryGhost:masterfrom
soukand:sqlite3_update_hook

Conversation

@soukand

@soukandsoukand commented Dec 25, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown

This would sure be useful. Any updates?

@kewde

Copy link
Copy Markdown
Collaborator

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

@kewdekewde closed this Apr 19, 2020
@kewdekewde reopened this Apr 19, 2020
@tiendq

Copy link
Copy Markdown

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

Comment threadsrc/database.cc Outdated
@justinmoon

Copy link
Copy Markdown

This would be very useful for my project

@aceslick911

Copy link
Copy Markdown

+1 this :)

@daniellockyer

Copy link
Copy Markdown
Contributor

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

@daniellockyerdaniellockyer mentioned this pull request May 21, 2022
@maxpert

Copy link
Copy Markdown

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

@volkanunsal

Copy link
Copy Markdown

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

@daniellockyer

Copy link
Copy Markdown
Contributor

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 🙂

@daniellockyerdaniellockyer changed the title added ability to receive updates from sqlite3_update_hookAdded ability to receive updates from sqlite3_update_hookSep 13, 2022
closesTryGhost#419
- this adds support for a `change` event which forwards events arising
from `sqlite3_update_hook`
@daniellockyer
daniellockyer merged commit 946a3f6 into TryGhost:masterSep 13, 2022
@daniellockyer

Copy link
Copy Markdown
Contributor

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

@codebrainz

Copy link
Copy Markdown

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

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@soukand@cuberoot@kewde@tiendq@justinmoon@aceslick911@daniellockyer@maxpert@volkanunsal@codebrainz