Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw if shapeKey isn't set when using pglite/sync #525

Open
KyleAMathews opened this issue Feb 5, 2025 · 1 comment
Open

Throw if shapeKey isn't set when using pglite/sync #525

KyleAMathews opened this issue Feb 5, 2025 · 1 comment

Comments

@KyleAMathews
Copy link
Contributor

From @samwillis

We've not so far as it enables syncing in to an ephemeral database without the additional overhead. But as it's probably wanted in 95% of cases maybe we should have an unkeyedShape: true or similar that allows it.
Or maybe shapeKey: null?

Tony from Discord also suggested that:

perhaps it could be based on whether the dbDir is set?

@samwillis
Copy link
Collaborator

dbDir isn't enough to make a judgment as to if its a persisted database or not. It's possible to pass a custom VFS as an alternative to a dbDir, and there may be alternative in-memory VFSs in future, such as a CoW cloneable VFS for unit tests.

We have a first version of this merged this morning where its required, but passing null stops it persisting state: #522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants