Commit graph

5 commits

Author SHA1 Message Date
04c5d41956 fix: Change SQLITE_THREADSAFE=0 to THREADSAFE=2
CRITICAL FIX: SQLite was compiled single-threaded but the library
provides a ConnectionPool which implies multi-threaded usage.

THREADSAFE=2 (multi-thread mode) allows different connections to be
used from different threads, which is exactly what ConnectionPool needs.

Updated: build.zig, README.md, CLAUDE.md, docs/ARCHITECTURE.md

Reported by: Gemini audit (2025-12-14)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 19:38:45 +01:00
c5e6cec4a6 refactor: rename zsqlite to zcatsql
Consistent naming with zcat ecosystem (zcatui, zcatgui, zcatsql).
All lowercase per Zig naming conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 02:19:52 +01:00
fac8bcba62 feat: v1.0 - add row mapping, serialize, session, vacuum into, snapshots
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>
2025-12-08 21:04:24 +01:00
733533ec83 feat(v0.5): Fase 3B - Callbacks avanzados, limits y timestamps
Implementa todas las funcionalidades restantes de la paridad con go-sqlite3:

Callbacks y Hooks:
- Authorizer callback para control de operaciones SQL
- Pre-update hook con acceso a valores antes/despues del cambio
- Progress handler para interrumpir queries largos
- Busy handler personalizado (custom callback)

APIs adicionales:
- Limits API (getLimit/setLimit) para control de limites SQLite
- Column metadata extendida (columnDatabaseName, columnTableName, columnOriginName)
- Expanded SQL (stmt.expandedSql)
- Timestamp binding (bindTimestamp, bindCurrentTime) con formato ISO8601

Build:
- Habilitado SQLITE_ENABLE_PREUPDATE_HOOK en build.zig
- Definido @cDefine en @cImport para exponer APIs opcionales

Tests:
- Tests para authorizer, progress handler, limits, expanded SQL
- Tests para column metadata y pre-update hook
- Tests para timestamp binding

Documentacion actualizada con todos los nuevos APIs y ejemplos.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 18:52:18 +01:00
a290859182 Initial commit: zsqlite - SQLite wrapper for Zig
- SQLite 3.47.2 amalgamation compiled directly into binary
- Idiomatic Zig API (Database, Statement, errors)
- Full test suite passing
- Basic example with CRUD operations
- Zero runtime dependencies

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 16:45:28 +01:00