I wonder if such thing works?
Trying to subscribe to new additions to a table
and send them to my browser client.
Asked
Active
Viewed 101 times
-1

n79qk272x57w46w9
- 51
- 5
1 Answers
0
I do not believe there is in DuckDB any kind of CDC (Change Data Capture), triggers or anything else you could use to create a true event-driven listen like you suggest. I believe you'd have to set up some kind of polling mechanism in Node.js to watch for changes and have that trigger an event.
With that said, DuckDB is an OLAP database. Polling for changes like this probably isn't the best use case for OLAP and is something you'd see in OTAP. It seems like whatever is inserting into the table should be triggering an event and you'd hook your stream up to that.

Dude0001
- 3,019
- 2
- 23
- 38
-
thanks, I'm just experimenting with different use-cases. playing around with the db. I guess I would use something like couchdb for such. – n79qk272x57w46w9 May 31 '23 at 15:55