add sqlite serialize/deserialize example#4167
Open
mattrighetti wants to merge 1 commit intolaunchbadge:mainfrom
Open
add sqlite serialize/deserialize example#4167mattrighetti wants to merge 1 commit intolaunchbadge:mainfrom
mattrighetti wants to merge 1 commit intolaunchbadge:mainfrom
Conversation
This was referenced Feb 18, 2026
- Use SqliteOwnedBuf with serialize/deserialize to snapshot an in-memory database as raw bytes - Embed the bytes in a custom container format (magic header + db) - Round-trip: create → serialize → write → read → deserialize → query
ccae8ea to
7becb51
Compare
Contributor
Author
|
Just updated the commit message to re-trigger CI |
abonander
reviewed
Mar 6, 2026
Comment on lines
+1
to
+7
| /// Demonstrates serialize/deserialize by embedding a SQLite database inside a custom | ||
| /// binary container format. | ||
| /// | ||
| /// The container prepends a magic header to the raw SQLite bytes, making it impossible | ||
| /// to open directly with `SqliteConnectOptions::filename()`. This is the whole point: | ||
| /// `sqlite3_serialize` / `sqlite3_deserialize` let you treat a database as an opaque | ||
| /// byte slice that can live inside any format you control. |
Collaborator
There was a problem hiding this comment.
I don't feel that this really makes sense to carry as an example, because this is a really niche use-case. These examples are targeted more at beginners and common use-cases to use as a basis. This is more like a demo/proof-of-concept.
Contributor
Author
There was a problem hiding this comment.
Do you have anything specific in mind?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Does your PR solve an issue?
No, it's just an example to show how the
serializeanddeserializeAPIs can be used.Is this a breaking change?
No.