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

Expose SQLite.export(). #1751

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

angrytongan
Copy link
Contributor

No description provided.

@Fil
Copy link
Contributor

Fil commented Oct 14, 2024

This is interesting. Can we clarify what the use case is, though? I can see how re-importing the same data is useful to show that it works, but besides the demo would you want to reuse that export on the same page? Or is it more—say—that you would use the page to edit a db, then click on a button to download an export or save it to an asset server?

@mbostock
Copy link
Member

Maybe the better solution here would be to document how to access the underlying SQLite instance. I don’t think we want to create wrapper functions for everything that SQLite supports, especially if it’s not a use case we expect is common.

@df-rw
Copy link

df-rw commented Oct 14, 2024

Can we clarify what the use case is, though?

🤔 I want to persist the SQLite database at the client by puling it out with export() and storing it somewhere, then pushing it back in with load().

would you want to reuse that export on the same page?

You're right, probably not the best way to show the example by using the same data on the same page.

Maybe the better solution here would be to document how to access the underlying SQLite instance. I don’t think we want to create wrapper functions for everything that SQLite supports, especially if it’s not a use case we expect is common.

My thinking was "if there is a load(), there should be a matching save()" 🤷 Happy to go with accessing SQLite directly for things like this 👍

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

Successfully merging this pull request may close these issues.

4 participants