Replies: 1 comment 2 replies
-
Hi, I actually already gave some thought about it. The data stored in pg-mem tables is only an immutable dictionary of raw data, so it could very much be serialized to indexedDb or even localStorage (see here). So that part is trivial. The only thing that would require some work is due to the fact that pg-mem schema is not stored as data. However, I see some drawbacks:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are many queries I run in the backend that could run on the frontend.
For offline support and optimistic frontend UI updates, it's nice to work with an SQL db on the frontend.
pg-mem
's use case focuses on unit testing, but it provides a nice JS interface to a PSQL-compatible DB which could be a nice building block for an in-memory frontend SQL database.Interested in your thoughts on what would be required to extend
pg-mem
or extract pieces of it to build an in-memory db for browser usage.Beta Was this translation helpful? Give feedback.
All reactions