Comments (8)
If this is as simple as hooking into LibSQL, I think this can be done easily enough. Am I missing an extra step?
from tinybase.
Main question seems to be whether to integrate with (newer) libsql-js or (older) libsql-client, or both
from tinybase.
hello @jamesgpearce - founder of Turso here. Great to see Turso integrated into this project!
the libsql-js
driver is a dependency of @libsql/client
, and is lower level. If you need to go down to a lower level, you may have to use it, but if possible, integrate with @libsql/client
.
from tinybase.
Thanks for swinging by! And thanks for the clarification. I'll take a look.
from tinybase.
@glommer I'm wondering if there's a way to subscribe to database changes. My other sqlite-based adapters all provide a way to get to sqlite3_update_hook
which I can listen to. I can't see that exposed in either libsql-js or libsql/client. Am I blind? :)
If not, is there another way to subscribe to changes, other than polling?
from tinybase.
Please give v4.7.0 a whirl! I use polling for now. https://tinybase.org/
from tinybase.
hey @jamesgpearce how did you do the integration? If you integrated at the level of our C api, this function should still be there.
If you integrated at the typescript client SDK, indeed I think there's no typescript API that exposes that directly. Can you point us to how you are doing this with any other adaptor? We're happy to expose a similar function.
Tagging my cofounder @penberg in this thread!
from tinybase.
At the moment I am polling which is not ideal but it works. If you can expose that hook that would be awesome though. Eg Expo SQLite has addDatabaseChangeListener
, CR-SQLite has onUpdate
, sqlite3 has db.on('change'...
etc etc
from tinybase.
Related Issues (20)
- Clarify that etags are required for the remote persister HOT 4
- React UI Hooks don't seem to have "with-schema" variants HOT 1
- VSCode Auto Import not working correctly HOT 5
- IndexedDB integration for service workers HOT 2
- Page of community apps and demos
- First party CRDT support
- expo-sqlite-next-persister not working HOT 3
- Create of IndexedDB persister is slow when database doesn't exist HOT 7
- useCreate hooks do not work when React.StrictMode is enabled HOT 4
- PowerSync support HOT 2
- StoreInspector doesn't seem to work on API generated Providers HOT 1
- Develop a Vite plugin for getStoreApi HOT 2
- Add Zod and Effect Schema support for better DX HOT 7
- Consider using Bun for the development of TinyBase itself HOT 1
- Persist TinyBase to Astro DB
- Support TS `moduleResolution: node16` HOT 5
- Loro CRDT Addition
- 'Pagination' for SQLite persistence
- Extra persister events (start + finish) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinybase.