Commit graph

5 commits

Author SHA1 Message Date
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
7229c27c80 Fase 4: Window functions, URI, pragmas y connection pool
- Window functions: createWindowFunction() con 4 callbacks
  (xStep, xFinal, xValue, xInverse)
- URI connection string: openUri() y openUriAlloc()
  (file:path?mode=ro&cache=shared)
- Pragmas adicionales: setAutoVacuum, setCacheSize,
  setCaseSensitiveLike, setDeferForeignKeys, setLockingMode,
  setQueryOnly, setRecursiveTriggers, setSecureDelete,
  setPageSize, setMaxPageCount, setTempStore, setWalAutoCheckpoint
- Maintenance: vacuum, incrementalVacuum, optimize,
  integrityCheck, quickCheck, walCheckpoint
- ConnectionPool: pool thread-safe con acquire/release

Paridad 100% con go-sqlite3 (excepto extensiones dinamicas
que estan deshabilitadas por seguridad)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 19:33:46 +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
7742f44667 v0.4: Fase 3A complete - Blob I/O, Hooks, Aggregate Functions
New features:
- Blob I/O: Incremental read/write for large BLOBs
  - Blob.open(), close(), deinit()
  - Blob.read(), write() with offset support
  - Blob.bytes(), reopen(), readAll()
- Hooks: Monitor database changes
  - setCommitHook() - called on transaction commit
  - setRollbackHook() - called on transaction rollback
  - setUpdateHook() - called on INSERT/UPDATE/DELETE
  - clearHooks() - remove all hooks
  - UpdateOperation enum (insert, update, delete)
- Aggregate Functions: Custom multi-row aggregates
  - createAggregateFunction(name, num_args, step_fn, final_fn)
  - AggregateContext with getAggregateContext() for state management
  - Support for setNull/Int/Float/Text/Blob/Error results

Documentation:
- Updated docs/API.md to v0.4 with new features and examples
- Updated docs/CGO_PARITY_ANALYSIS.md - Fase 3A marked complete
- Updated CLAUDE.md to v0.4 with all new implementations

Tests: 28 total (8 new tests for Fase 3A features)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 18:02:01 +01:00
532cf827f8 v0.3: Fase 2A+2B complete - Major feature additions
New features:
- Backup API: Backup struct with step(), progress(), remaining(), pageCount()
- Convenience functions: backupToFile(), loadFromFile(), backupDatabase()
- ATTACH/DETACH: attach(), attachMemory(), detach(), listDatabases()
- User-Defined Functions: createScalarFunction(), FunctionContext, FunctionValue
- Custom Collations: createCollation(), CollationFn, removeCollation()
- Named parameters: bindTextNamed(), bindIntNamed(), etc. (:name, @name, $name)
- Savepoints: savepoint(), release(), rollbackTo()
- Configuration: setBusyTimeout(), setJournalMode(), setSynchronous(), enableWalMode()
- Statement metadata: sql(), isReadOnly(), parameterCount(), parameterIndex()
- Transaction: beginExclusive()
- Utilities: errorCode(), extendedErrorCode(), interrupt(), isReadOnly(), filename()
- Additional bind/column: bindBool(), bindZeroblob(), columnBool(), columnBytes(), columnDeclType()

Documentation:
- Created docs/API.md - Complete API reference
- Created docs/ARCHITECTURE.md - Technical architecture
- Created docs/CGO_PARITY_ANALYSIS.md - Feature parity tracking with go-sqlite3
- Updated CLAUDE.md with all new features

All 20 tests passing.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 17:54:50 +01:00