surrealdb / surrealdb.wasm

A WebAssembly engine for the SurrealDB JavaScript SDK
https://surrealdb.com
Apache License 2.0
114 stars 19 forks source link

Feature: live queries #46

Closed orimay closed 8 months ago

orimay commented 9 months ago

Is your feature request related to a problem?

Currently, live queries are not supported

Describe the solution

New API that would utilize async generators. It would've been awesome to have it typed

Alternative methods

Use with no live queries, just track updates out of database for local IndexDB cases

SurrealDB version

surrealdb.wasm^0.7.0

Contact Details

dmitrii.a.baranov@gmail.com

Is there an existing issue for this?

Code of Conduct

limcheekin commented 9 months ago

May I know is there any update?

phughk commented 9 months ago

With the rust API now using live queries, this should be already working. 0.7.0 was released in September, so it doesn't include that functionality. Will ping the team about doing a new release of wasm. Closing as it is resolved. We can re-open a bug if it is still not working.

phughk commented 9 months ago

Re-opening, after having spoken to @rushmorem - turns out the wasm project does wrap the Rust API but needs explicit support for JS types, and that would be a feature. Going to add-assign to Rushmore as well

limcheekin commented 9 months ago

With the rust API now using live queries, this should be already working. 0.7.0 was released in September, so it doesn't include that functionality. Will ping the team about doing a new release of wasm. Closing as it is resolved. We can re-open a bug if it is still not working.

Please release wasm for the SurrealDB v1.1 first. For other features, you can make it into v1. 2 release which is not too long to go anyway.

Thank you.

rushmorem commented 8 months ago

v0.8.0 is now out with support for the live query API. Unlike the Rust SDK though, it doesn't also have direct support for the LIVE SELECT statement in the query method yet.