Skip to content

Comments

feat: Add Database#serialize and Database#deserialize methods #685

Open
Maaarcocr wants to merge 3 commits intosparklemotion:mainfrom
Maaarcocr:new-main
Open

feat: Add Database#serialize and Database#deserialize methods #685
Maaarcocr wants to merge 3 commits intosparklemotion:mainfrom
Maaarcocr:new-main

Conversation

@Maaarcocr
Copy link

Add support for sqlite3_serialize() and sqlite3_deserialize() which
allow serializing an in-memory database to a binary string and
restoring it later.

These methods are useful for:

  • Creating snapshots of in-memory databases
  • Transferring database contents between connections
  • Backing up and restoring database state

The methods are only available when SQLite is compiled without
SQLITE_OMIT_DESERIALIZE (requires SQLite >= 3.23.0).

Maaarcocr and others added 3 commits December 19, 2025 13:08
Add support for sqlite3_serialize() and sqlite3_deserialize() which
allow serializing an in-memory database to a binary string and
restoring it later.

These methods are useful for:
- Creating snapshots of in-memory databases
- Transferring database contents between connections
- Backing up and restoring database state

The methods are only available when SQLite is compiled without
SQLITE_OMIT_DESERIALIZE (requires SQLite >= 3.23.0).
@flavorjones
Copy link
Member

@Maaarcocr The test suite failure seems legit. Let me know if you need assistance getting unblocked!

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.

3 participants