3 ms·
I've been thinking about prototyping a Firebase clone that uses a relational database and SQL syntax. Instead of subscribing to "nodes" you would subscribe to q
by jlizzle30 9y ago
I've been thinking about prototyping a Firebase clone that uses a relational database and SQL syntax. Instead of subscribing to "nodes" you would subscribe to queries. Anyone know if this exists already?
- cjbprime 9y agoHow would you (as the DB author) know when a query has updated results?
- jlizzle30 9y agoSomething like this: subscribe ('SELECT * FROM tableA', callback) On the initial subscription, 'callback' would be called once for each row in 'tableA', then again when a row is inserted or updated. It would be the same as Firebase in this respect.
- cjbprime 9y agoNo, you as the person writing this new database, not you as the user of the API.
- eat_veggies 9y agoNot OP but I would watch for mutations in the subscribed columns, then test the changed rows on the query's constraints and fire an event if it satisfies them. I'm sure there is a more clever/efficient way of doing this though, and I can't wait to see how he/she implements it.
- deleted 9y ago[deleted]
- gary__ 9y agoRelated in a limited fashion: https://docs.microsoft.com/en-us/dotnet/framework/data/adonet/sql/query-notifications-in-sql-server https://docs.microsoft.com/en-us/dotnet/framework/data/adone... Then there's this write-up of someone replacing rethinkdb with postgres for live queries - (including a link to some code) http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.html http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.ht... Have you any plans already of how you will go about this?