Skip to content

Comments

Add Database#serialize and Database#deserialize methods#669

Closed
Maaarcocr wants to merge 2 commits intosparklemotion:mainfrom
Maaarcocr:main
Closed

Add Database#serialize and Database#deserialize methods#669
Maaarcocr wants to merge 2 commits intosparklemotion:mainfrom
Maaarcocr: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).

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 Maaarcocr changed the title feat: Add Database#serialize and Database#deserialize methods Add Database#serialize and Database#deserialize methods Dec 19, 2025
@tenderlove
Copy link
Member

@Maaarcocr would you mind opening a new PR on a different branch with your commits on top? I think this is good and I want to get it merged, but I want to see CI pass 😅

@Maaarcocr
Copy link
Author

closing this in favour of #685

@Maaarcocr Maaarcocr closed this Feb 20, 2026
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.

2 participants