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

Snapshot.content: TEXT | BLOB | JSON #110

Open
samuelstroschein opened this issue Oct 19, 2024 — with Linear · 0 comments
Open

Snapshot.content: TEXT | BLOB | JSON #110

samuelstroschein opened this issue Oct 19, 2024 — with Linear · 0 comments

Comments

Copy link
Member

samuelstroschein commented Oct 19, 2024

Context

Snapshotting text is valuable:

  • csv saving row changes is text
  • markdown entire file snapshots are text
snapshot.content = "Lisa,5" 

Plugins have to do a workaround atm

snapshot.content = { text: "Lisa,5" }

Proposal

Evaluate defining a snapshot (schema) as type: "text" | "blob" | "json"

Pros

  • higher DX it feels intuitive to snapshot text if it is text
  • tiny bit less storage space
  • slightly better performance by not requiring json serialization and parsing

Cons

  • dynamic column types (sqlite has no problem dynamic column types)
@samuelstroschein samuelstroschein changed the title proper json type for snapshot.content Snapshot.content: TEXT | BLOB | JSON Oct 19, 2024
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

1 participant