New features: - Row-to-struct mapping (Row.to(), Row.toAlloc(), Row.freeStruct()) - Serialize/Deserialize API (toBytes, fromBytes, cloneToMemory, etc.) - Session extension for change tracking (changesets, patchsets, diff) - VACUUM INTO for creating compacted database copies - Snapshot API for consistent reads in WAL mode - Comprehensive README.md documentation Technical changes: - Enable -DSQLITE_ENABLE_SESSION and -DSQLITE_ENABLE_SNAPSHOT - Add c.zig defines for session/snapshot headers - Fix connection pool test to use temp file instead of shared cache - 63 tests passing, 7563 lines of code across 15 modules 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
857 B
Zig
26 lines
857 B
Zig
//! SQLite C bindings
|
|
//!
|
|
//! Centralized @cImport for SQLite. All modules should import this
|
|
//! instead of doing their own @cImport.
|
|
|
|
pub const c = @cImport({
|
|
@cDefine("SQLITE_ENABLE_COLUMN_METADATA", "1");
|
|
@cDefine("SQLITE_ENABLE_PREUPDATE_HOOK", "1");
|
|
@cDefine("SQLITE_ENABLE_SESSION", "1");
|
|
@cDefine("SQLITE_ENABLE_SNAPSHOT", "1");
|
|
@cInclude("sqlite3.h");
|
|
});
|
|
|
|
// Re-export commonly used types for convenience
|
|
pub const sqlite3 = c.sqlite3;
|
|
pub const sqlite3_stmt = c.sqlite3_stmt;
|
|
pub const sqlite3_context = c.sqlite3_context;
|
|
pub const sqlite3_value = c.sqlite3_value;
|
|
pub const sqlite3_backup = c.sqlite3_backup;
|
|
pub const sqlite3_blob = c.sqlite3_blob;
|
|
|
|
// Constants
|
|
pub const SQLITE_OK = c.SQLITE_OK;
|
|
pub const SQLITE_ROW = c.SQLITE_ROW;
|
|
pub const SQLITE_DONE = c.SQLITE_DONE;
|
|
pub const SQLITE_TRANSIENT = c.SQLITE_TRANSIENT;
|