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>
This commit is contained in:
parent
8a9b17c83c
commit
c5e6cec4a6
19 changed files with 67 additions and 67 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
# zsqlite
|
# zcatsql
|
||||||
|
|
||||||
> SQLite wrapper idiomático para Zig 0.15.2+
|
> SQLite wrapper idiomático para Zig 0.15.2+
|
||||||
|
|
||||||
|
|
@ -137,7 +137,7 @@ if (!result.valid) { /* ALERTA */ }
|
||||||
## Git
|
## Git
|
||||||
|
|
||||||
```
|
```
|
||||||
origin: git@git.reugenio.com:reugenio/zsqlite.git
|
origin: git@git.reugenio.com:reugenio/zcatsql.git
|
||||||
branch: main
|
branch: main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -1,4 +1,4 @@
|
||||||
# zsqlite
|
# zcatsql
|
||||||
|
|
||||||
SQLite wrapper idiomático para Zig 0.15.2+
|
SQLite wrapper idiomático para Zig 0.15.2+
|
||||||
|
|
||||||
|
|
@ -16,28 +16,28 @@ Compila el SQLite amalgamation directamente en el binario, resultando en un ejec
|
||||||
|
|
||||||
1. Clonar el repositorio:
|
1. Clonar el repositorio:
|
||||||
```bash
|
```bash
|
||||||
git clone git@git.reugenio.com:reugenio/zsqlite.git
|
git clone git@git.reugenio.com:reugenio/zcatsql.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Añadir como dependencia en `build.zig.zon`:
|
2. Añadir como dependencia en `build.zig.zon`:
|
||||||
```zig
|
```zig
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.zsqlite = .{
|
.zcatsql = .{
|
||||||
.path = "../zsqlite",
|
.path = "../zcatsql",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
```
|
```
|
||||||
|
|
||||||
3. En `build.zig`:
|
3. En `build.zig`:
|
||||||
```zig
|
```zig
|
||||||
const zsqlite = b.dependency("zsqlite", .{});
|
const zcatsql = b.dependency("zcatsql", .{});
|
||||||
exe.root_module.addImport("zsqlite", zsqlite.module("zsqlite"));
|
exe.root_module.addImport("zcatsql", zcatsql.module("zcatsql"));
|
||||||
```
|
```
|
||||||
|
|
||||||
## Uso Básico
|
## Uso Básico
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
// Abrir base de datos
|
// Abrir base de datos
|
||||||
|
|
|
||||||
16
REFERENCE.md
16
REFERENCE.md
|
|
@ -1,4 +1,4 @@
|
||||||
# zsqlite - Manual de Referencia Técnica
|
# zcatsql - Manual de Referencia Técnica
|
||||||
|
|
||||||
> **Versión**: 1.0.0
|
> **Versión**: 1.0.0
|
||||||
> **Zig**: 0.15.2
|
> **Zig**: 0.15.2
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
## Introducción
|
## Introducción
|
||||||
|
|
||||||
**zsqlite** es un wrapper idiomático de SQLite para Zig que compila SQLite amalgamation directamente en el binario, resultando en un ejecutable único sin dependencias externas.
|
**zcatsql** es un wrapper idiomático de SQLite para Zig que compila SQLite amalgamation directamente en el binario, resultando en un ejecutable único sin dependencias externas.
|
||||||
|
|
||||||
### Características principales:
|
### Características principales:
|
||||||
|
|
||||||
|
|
@ -55,17 +55,17 @@
|
||||||
### Como dependencia en build.zig
|
### Como dependencia en build.zig
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const zsqlite = b.dependency("zsqlite", .{
|
const zcatsql = b.dependency("zcatsql", .{
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
exe.root_module.addImport("zsqlite", zsqlite.module("zsqlite"));
|
exe.root_module.addImport("zcatsql", zcatsql.module("zcatsql"));
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uso básico
|
### Uso básico
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
var db = try sqlite.open("test.db");
|
var db = try sqlite.open("test.db");
|
||||||
|
|
@ -1148,7 +1148,7 @@ El sistema de Audit Log proporciona registro completo de operaciones de base de
|
||||||
### Configuración
|
### Configuración
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
var db = try sqlite.open("myapp.db");
|
var db = try sqlite.open("myapp.db");
|
||||||
defer db.close();
|
defer db.close();
|
||||||
|
|
@ -1385,7 +1385,7 @@ pub const AuthResult = enum(c_int) {
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||||
|
|
@ -1563,4 +1563,4 @@ Este proyecto está bajo licencia MIT. SQLite es de dominio público.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*Generado para zsqlite v1.0.0 - Diciembre 2025*
|
*Generado para zcatsql v1.0.0 - Diciembre 2025*
|
||||||
|
|
|
||||||
10
build.zig
10
build.zig
|
|
@ -23,15 +23,15 @@ pub fn build(b: *std.Build) void {
|
||||||
"-DSQLITE_ENABLE_SNAPSHOT", // Snapshot API for consistent reads
|
"-DSQLITE_ENABLE_SNAPSHOT", // Snapshot API for consistent reads
|
||||||
};
|
};
|
||||||
|
|
||||||
// zsqlite module - includes SQLite C compilation
|
// zcatsql module - includes SQLite C compilation
|
||||||
const zsqlite_mod = b.createModule(.{
|
const zcatsql_mod = b.createModule(.{
|
||||||
.root_source_file = b.path("src/root.zig"),
|
.root_source_file = b.path("src/root.zig"),
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.link_libc = true,
|
.link_libc = true,
|
||||||
});
|
});
|
||||||
zsqlite_mod.addIncludePath(b.path("vendor"));
|
zcatsql_mod.addIncludePath(b.path("vendor"));
|
||||||
zsqlite_mod.addCSourceFile(.{
|
zcatsql_mod.addCSourceFile(.{
|
||||||
.file = b.path("vendor/sqlite3.c"),
|
.file = b.path("vendor/sqlite3.c"),
|
||||||
.flags = sqlite_flags,
|
.flags = sqlite_flags,
|
||||||
});
|
});
|
||||||
|
|
@ -63,7 +63,7 @@ pub fn build(b: *std.Build) void {
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
.imports = &.{
|
.imports = &.{
|
||||||
.{ .name = "zsqlite", .module = zsqlite_mod },
|
.{ .name = "zcatsql", .module = zcatsql_mod },
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# zsqlite - API Reference
|
# zcatsql - API Reference
|
||||||
|
|
||||||
> **Version**: 0.6
|
> **Version**: 0.6
|
||||||
> **Ultima actualizacion**: 2025-12-08
|
> **Ultima actualizacion**: 2025-12-08
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
## Quick Reference
|
## Quick Reference
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
// Abrir base de datos
|
// Abrir base de datos
|
||||||
var db = try sqlite.openMemory(); // In-memory
|
var db = try sqlite.openMemory(); // In-memory
|
||||||
|
|
@ -1129,5 +1129,5 @@ var db = try sqlite.openUri("file:static.db?immutable=1");
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**© zsqlite v0.6 - API Reference**
|
**© zcatsql v0.6 - API Reference**
|
||||||
*2025-12-08*
|
*2025-12-08*
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
# zsqlite - Arquitectura Tecnica
|
# zcatsql - Arquitectura Tecnica
|
||||||
|
|
||||||
> **Version**: 0.6
|
> **Version**: 0.6
|
||||||
> **Ultima actualizacion**: 2025-12-08
|
> **Ultima actualizacion**: 2025-12-08
|
||||||
|
|
||||||
## Vision General
|
## Vision General
|
||||||
|
|
||||||
zsqlite es un wrapper de SQLite para Zig que compila SQLite amalgamation directamente en el binario. El objetivo es proveer una API idiomatica Zig mientras se mantiene acceso completo a las capacidades de SQLite.
|
zcatsql es un wrapper de SQLite para Zig que compila SQLite amalgamation directamente en el binario. El objetivo es proveer una API idiomatica Zig mientras se mantiene acceso completo a las capacidades de SQLite.
|
||||||
|
|
||||||
```
|
```
|
||||||
┌─────────────────────────────────────────────────────────────┐
|
┌─────────────────────────────────────────────────────────────┐
|
||||||
│ Aplicacion Zig │
|
│ Aplicacion Zig │
|
||||||
├─────────────────────────────────────────────────────────────┤
|
├─────────────────────────────────────────────────────────────┤
|
||||||
│ zsqlite API │
|
│ zcatsql API │
|
||||||
│ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌───────────┐ │
|
│ ┌──────────┐ ┌───────────┐ ┌──────────┐ ┌───────────┐ │
|
||||||
│ │ Database │ │ Statement │ │ Backup │ │ConnPool │ │
|
│ │ Database │ │ Statement │ │ Backup │ │ConnPool │ │
|
||||||
│ │ │ │ │ │ Blob │ │ Functions │ │
|
│ │ │ │ │ │ Blob │ │ Functions │ │
|
||||||
|
|
@ -269,7 +269,7 @@ Mantenemos las mismas convenciones en la API publica para consistencia con docum
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
// Compilar SQLite como C source
|
// Compilar SQLite como C source
|
||||||
zsqlite_mod.addCSourceFile(.{
|
zcatsql_mod.addCSourceFile(.{
|
||||||
.file = b.path("vendor/sqlite3.c"),
|
.file = b.path("vendor/sqlite3.c"),
|
||||||
.flags = sqlite_flags,
|
.flags = sqlite_flags,
|
||||||
});
|
});
|
||||||
|
|
@ -401,5 +401,5 @@ La estructura modular ya esta implementada (ver seccion "Estructura Modular").
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**© zsqlite - Arquitectura Tecnica**
|
**© zcatsql - Arquitectura Tecnica**
|
||||||
*2025-12-08*
|
*2025-12-08*
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Visión General
|
## Visión General
|
||||||
|
|
||||||
Sistema de log histórico externo para zsqlite que permite:
|
Sistema de log histórico externo para zcatsql que permite:
|
||||||
1. **v1.0**: Auditoría completa de operaciones con integridad verificable
|
1. **v1.0**: Auditoría completa de operaciones con integridad verificable
|
||||||
2. **v2.0**: Navegación temporal (time travel) a cualquier punto en el historial
|
2. **v2.0**: Navegación temporal (time travel) a cualquier punto en el historial
|
||||||
|
|
||||||
|
|
@ -208,7 +208,7 @@ pub fn verifyChain(log_dir: []const u8) !VerifyResult {
|
||||||
## API v1.0 - Auditoría
|
## API v1.0 - Auditoría
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const AuditLog = @import("zsqlite").audit.AuditLog;
|
const AuditLog = @import("zcatsql").audit.AuditLog;
|
||||||
|
|
||||||
// Configuración
|
// Configuración
|
||||||
const config = AuditLog.Config{
|
const config = AuditLog.Config{
|
||||||
|
|
@ -257,7 +257,7 @@ std.debug.print("Entries: {}, Files: {}\n", .{stats.total_entries, stats.file_co
|
||||||
## API v2.0 - Time Travel
|
## API v2.0 - Time Travel
|
||||||
|
|
||||||
```zig
|
```zig
|
||||||
const TimeMachine = @import("zsqlite").audit.TimeMachine;
|
const TimeMachine = @import("zcatsql").audit.TimeMachine;
|
||||||
|
|
||||||
// Inicializar con log existente
|
// Inicializar con log existente
|
||||||
var tm = try TimeMachine.init(allocator, "./mydb_audit");
|
var tm = try TimeMachine.init(allocator, "./mydb_audit");
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
# Analisis de Paridad con CGo go-sqlite3
|
# Analisis de Paridad con CGo go-sqlite3
|
||||||
|
|
||||||
> **Fecha**: 2025-12-08
|
> **Fecha**: 2025-12-08
|
||||||
> **Objetivo**: Identificar todas las funcionalidades de go-sqlite3 para replicarlas en zsqlite
|
> **Objetivo**: Identificar todas las funcionalidades de go-sqlite3 para replicarlas en zcatsql
|
||||||
|
|
||||||
## Resumen
|
## Resumen
|
||||||
|
|
||||||
go-sqlite3 (https://github.com/mattn/go-sqlite3) es el wrapper SQLite mas maduro para Go.
|
go-sqlite3 (https://github.com/mattn/go-sqlite3) es el wrapper SQLite mas maduro para Go.
|
||||||
Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlite.
|
Este documento analiza todas sus funcionalidades para asegurar paridad en zcatsql.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Estado de Implementacion
|
## Estado de Implementacion
|
||||||
|
|
||||||
### Leyenda
|
### Leyenda
|
||||||
- ✅ Implementado en zsqlite
|
- ✅ Implementado en zcatsql
|
||||||
- ⏳ Pendiente de implementar
|
- ⏳ Pendiente de implementar
|
||||||
- 🔄 Parcialmente implementado
|
- 🔄 Parcialmente implementado
|
||||||
- ❌ No aplicable a Zig
|
- ❌ No aplicable a Zig
|
||||||
|
|
@ -22,7 +22,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 1. Conexion a Base de Datos
|
## 1. Conexion a Base de Datos
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Notas |
|
| Funcionalidad | go-sqlite3 | zcatsql | Notas |
|
||||||
|---------------|------------|---------|-------|
|
|---------------|------------|---------|-------|
|
||||||
| Open basico | ✅ | ✅ | `sqlite.open()` |
|
| Open basico | ✅ | ✅ | `sqlite.open()` |
|
||||||
| Open con flags | ✅ | ✅ | `Database.openWithFlags()` |
|
| Open con flags | ✅ | ✅ | `Database.openWithFlags()` |
|
||||||
|
|
@ -35,7 +35,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 2. Configuracion de Pragmas
|
## 2. Configuracion de Pragmas
|
||||||
|
|
||||||
| Pragma | go-sqlite3 | zsqlite | Prioridad |
|
| Pragma | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|--------|------------|---------|-----------|
|
|--------|------------|---------|-----------|
|
||||||
| auto_vacuum | ✅ | ✅ | `db.setAutoVacuum()` |
|
| auto_vacuum | ✅ | ✅ | `db.setAutoVacuum()` |
|
||||||
| busy_timeout | ✅ | ✅ | `db.setBusyTimeout()` |
|
| busy_timeout | ✅ | ✅ | `db.setBusyTimeout()` |
|
||||||
|
|
@ -54,7 +54,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 3. Prepared Statements
|
## 3. Prepared Statements
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Notas |
|
| Funcionalidad | go-sqlite3 | zcatsql | Notas |
|
||||||
|---------------|------------|---------|-------|
|
|---------------|------------|---------|-------|
|
||||||
| Prepare | ✅ | ✅ | `db.prepare()` |
|
| Prepare | ✅ | ✅ | `db.prepare()` |
|
||||||
| Exec (sin resultados) | ✅ | ✅ | `db.exec()` |
|
| Exec (sin resultados) | ✅ | ✅ | `db.exec()` |
|
||||||
|
|
@ -71,7 +71,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 4. Bind de Parametros
|
## 4. Bind de Parametros
|
||||||
|
|
||||||
| Tipo | go-sqlite3 | zsqlite | Notas |
|
| Tipo | go-sqlite3 | zcatsql | Notas |
|
||||||
|------|------------|---------|-------|
|
|------|------------|---------|-------|
|
||||||
| NULL | ✅ | ✅ | `stmt.bindNull()` |
|
| NULL | ✅ | ✅ | `stmt.bindNull()` |
|
||||||
| int64 | ✅ | ✅ | `stmt.bindInt()` |
|
| int64 | ✅ | ✅ | `stmt.bindInt()` |
|
||||||
|
|
@ -86,7 +86,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 5. Lectura de Columnas
|
## 5. Lectura de Columnas
|
||||||
|
|
||||||
| Tipo | go-sqlite3 | zsqlite | Notas |
|
| Tipo | go-sqlite3 | zcatsql | Notas |
|
||||||
|------|------------|---------|-------|
|
|------|------------|---------|-------|
|
||||||
| Column count | ✅ | ✅ | `stmt.columnCount()` |
|
| Column count | ✅ | ✅ | `stmt.columnCount()` |
|
||||||
| Column name | ✅ | ✅ | `stmt.columnName()` |
|
| Column name | ✅ | ✅ | `stmt.columnName()` |
|
||||||
|
|
@ -106,7 +106,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 6. Transacciones
|
## 6. Transacciones
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Notas |
|
| Funcionalidad | go-sqlite3 | zcatsql | Notas |
|
||||||
|---------------|------------|---------|-------|
|
|---------------|------------|---------|-------|
|
||||||
| BEGIN | ✅ | ✅ | `db.begin()` |
|
| BEGIN | ✅ | ✅ | `db.begin()` |
|
||||||
| BEGIN IMMEDIATE | ✅ | ✅ | `db.beginImmediate()` |
|
| BEGIN IMMEDIATE | ✅ | ✅ | `db.beginImmediate()` |
|
||||||
|
|
@ -122,7 +122,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 7. Metadatos y Utilidades
|
## 7. Metadatos y Utilidades
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Notas |
|
| Funcionalidad | go-sqlite3 | zcatsql | Notas |
|
||||||
|---------------|------------|---------|-------|
|
|---------------|------------|---------|-------|
|
||||||
| LastInsertRowId | ✅ | ✅ | `db.lastInsertRowId()` |
|
| LastInsertRowId | ✅ | ✅ | `db.lastInsertRowId()` |
|
||||||
| Changes | ✅ | ✅ | `db.changes()` |
|
| Changes | ✅ | ✅ | `db.changes()` |
|
||||||
|
|
@ -139,7 +139,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 8. Limites y Control
|
## 8. Limites y Control
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Prioridad |
|
| Funcionalidad | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|---------------|------------|---------|-----------|
|
|---------------|------------|---------|-----------|
|
||||||
| GetLimit | ✅ | ✅ | `db.getLimit()` |
|
| GetLimit | ✅ | ✅ | `db.getLimit()` |
|
||||||
| SetLimit | ✅ | ✅ | `db.setLimit()` |
|
| SetLimit | ✅ | ✅ | `db.setLimit()` |
|
||||||
|
|
@ -150,7 +150,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 9. Callbacks y Hooks
|
## 9. Callbacks y Hooks
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Prioridad |
|
| Funcionalidad | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|---------------|------------|---------|-----------|
|
|---------------|------------|---------|-----------|
|
||||||
| Commit hook | ✅ | ✅ | `db.setCommitHook()` |
|
| Commit hook | ✅ | ✅ | `db.setCommitHook()` |
|
||||||
| Rollback hook | ✅ | ✅ | `db.setRollbackHook()` |
|
| Rollback hook | ✅ | ✅ | `db.setRollbackHook()` |
|
||||||
|
|
@ -165,7 +165,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 10. Funciones Personalizadas
|
## 10. Funciones Personalizadas
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Prioridad |
|
| Funcionalidad | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|---------------|------------|---------|-----------|
|
|---------------|------------|---------|-----------|
|
||||||
| RegisterFunc (scalar) | ✅ | ✅ | `db.createScalarFunction()` |
|
| RegisterFunc (scalar) | ✅ | ✅ | `db.createScalarFunction()` |
|
||||||
| RegisterAggregator | ✅ | ✅ | `db.createAggregateFunction()` |
|
| RegisterAggregator | ✅ | ✅ | `db.createAggregateFunction()` |
|
||||||
|
|
@ -176,7 +176,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 11. Backup API
|
## 11. Backup API
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Prioridad |
|
| Funcionalidad | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|---------------|------------|---------|-----------|
|
|---------------|------------|---------|-----------|
|
||||||
| Backup init | ✅ | ✅ | `Backup.init()` |
|
| Backup init | ✅ | ✅ | `Backup.init()` |
|
||||||
| Backup step | ✅ | ✅ | `backup.step()` |
|
| Backup step | ✅ | ✅ | `backup.step()` |
|
||||||
|
|
@ -188,7 +188,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 12. Blob I/O
|
## 12. Blob I/O
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Prioridad |
|
| Funcionalidad | go-sqlite3 | zcatsql | Prioridad |
|
||||||
|---------------|------------|---------|-----------|
|
|---------------|------------|---------|-----------|
|
||||||
| Blob open | ✅ | ✅ | `Blob.open()` |
|
| Blob open | ✅ | ✅ | `Blob.open()` |
|
||||||
| Blob close | ✅ | ✅ | `blob.close()` |
|
| Blob close | ✅ | ✅ | `blob.close()` |
|
||||||
|
|
@ -201,7 +201,7 @@ Este documento analiza todas sus funcionalidades para asegurar paridad en zsqlit
|
||||||
|
|
||||||
## 13. Extensiones
|
## 13. Extensiones
|
||||||
|
|
||||||
| Funcionalidad | go-sqlite3 | zsqlite | Notas |
|
| Funcionalidad | go-sqlite3 | zcatsql | Notas |
|
||||||
|---------------|------------|---------|-------|
|
|---------------|------------|---------|-------|
|
||||||
| Load extension | ✅ | ❌ | Deshabilitado por seguridad |
|
| Load extension | ✅ | ❌ | Deshabilitado por seguridad |
|
||||||
| Enable load ext | ✅ | ❌ | |
|
| Enable load ext | ✅ | ❌ | |
|
||||||
|
|
@ -341,5 +341,5 @@ sqlite3_set_authorizer()
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
**© zsqlite - CGo Parity Analysis**
|
**© zcatsql - CGo Parity Analysis**
|
||||||
*2025-12-08*
|
*2025-12-08*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! Basic example demonstrating zsqlite usage
|
//! Basic example demonstrating zcatsql usage
|
||||||
//!
|
//!
|
||||||
//! This example shows:
|
//! This example shows:
|
||||||
//! - Opening a database
|
//! - Opening a database
|
||||||
|
|
@ -8,10 +8,10 @@
|
||||||
//! - Transactions
|
//! - Transactions
|
||||||
|
|
||||||
const std = @import("std");
|
const std = @import("std");
|
||||||
const sqlite = @import("zsqlite");
|
const sqlite = @import("zcatsql");
|
||||||
|
|
||||||
pub fn main() !void {
|
pub fn main() !void {
|
||||||
std.debug.print("zsqlite basic example\n", .{});
|
std.debug.print("zcatsql basic example\n", .{});
|
||||||
std.debug.print("SQLite version: {s}\n\n", .{sqlite.version()});
|
std.debug.print("SQLite version: {s}\n\n", .{sqlite.version()});
|
||||||
|
|
||||||
// Open an in-memory database
|
// Open an in-memory database
|
||||||
|
|
|
||||||
0
file::memory:?cache=shared
Normal file
0
file::memory:?cache=shared
Normal file
|
|
@ -551,7 +551,7 @@ test "AuditLog basic" {
|
||||||
const allocator = std.testing.allocator;
|
const allocator = std.testing.allocator;
|
||||||
|
|
||||||
// Create test directory
|
// Create test directory
|
||||||
const tmp_dir = "/tmp/zsqlite_audit_log_test";
|
const tmp_dir = "/tmp/zcatsql_audit_log_test";
|
||||||
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
||||||
|
|
||||||
// Open database
|
// Open database
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
//! Audit Log System
|
//! Audit Log System
|
||||||
//!
|
//!
|
||||||
//! External audit logging for zsqlite that provides:
|
//! External audit logging for zcatsql that provides:
|
||||||
//! - v1.0: Complete operation auditing with verifiable integrity (hash chain)
|
//! - v1.0: Complete operation auditing with verifiable integrity (hash chain)
|
||||||
//! - v2.0: Time travel to any point in history (future)
|
//! - v2.0: Time travel to any point in history (future)
|
||||||
//!
|
//!
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
//! ## Quick Start
|
//! ## Quick Start
|
||||||
//!
|
//!
|
||||||
//! ```zig
|
//! ```zig
|
||||||
//! const audit = @import("zsqlite").audit;
|
//! const audit = @import("zcatsql").audit;
|
||||||
//!
|
//!
|
||||||
//! // Initialize
|
//! // Initialize
|
||||||
//! var log = try audit.AuditLog.init(allocator, &db, .{
|
//! var log = try audit.AuditLog.init(allocator, &db, .{
|
||||||
|
|
|
||||||
|
|
@ -386,7 +386,7 @@ pub fn quickCheck(allocator: Allocator, log_dir: []const u8) !bool {
|
||||||
test "verify empty log" {
|
test "verify empty log" {
|
||||||
const allocator = std.testing.allocator;
|
const allocator = std.testing.allocator;
|
||||||
|
|
||||||
const tmp_dir = "/tmp/zsqlite_verify_test";
|
const tmp_dir = "/tmp/zcatsql_verify_test";
|
||||||
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
||||||
|
|
||||||
// Create directory with just index
|
// Create directory with just index
|
||||||
|
|
@ -416,7 +416,7 @@ test "verify empty log" {
|
||||||
test "quickCheck" {
|
test "quickCheck" {
|
||||||
const allocator = std.testing.allocator;
|
const allocator = std.testing.allocator;
|
||||||
|
|
||||||
const tmp_dir = "/tmp/zsqlite_quickcheck_test";
|
const tmp_dir = "/tmp/zcatsql_quickcheck_test";
|
||||||
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
||||||
|
|
||||||
std.fs.makeDirAbsolute(tmp_dir) catch {};
|
std.fs.makeDirAbsolute(tmp_dir) catch {};
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ test "Writer basic operations" {
|
||||||
const allocator = std.testing.allocator;
|
const allocator = std.testing.allocator;
|
||||||
|
|
||||||
// Use temp directory
|
// Use temp directory
|
||||||
const tmp_dir = "/tmp/zsqlite_audit_test";
|
const tmp_dir = "/tmp/zcatsql_audit_test";
|
||||||
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
||||||
|
|
||||||
var writer = try Writer.init(allocator, tmp_dir, "test.db");
|
var writer = try Writer.init(allocator, tmp_dir, "test.db");
|
||||||
|
|
@ -324,7 +324,7 @@ test "Writer basic operations" {
|
||||||
test "Writer rotation" {
|
test "Writer rotation" {
|
||||||
const allocator = std.testing.allocator;
|
const allocator = std.testing.allocator;
|
||||||
|
|
||||||
const tmp_dir = "/tmp/zsqlite_audit_rotation_test";
|
const tmp_dir = "/tmp/zcatsql_audit_rotation_test";
|
||||||
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
defer std.fs.cwd().deleteTree(tmp_dir) catch {};
|
||||||
|
|
||||||
var writer = try Writer.init(allocator, tmp_dir, "test.db");
|
var writer = try Writer.init(allocator, tmp_dir, "test.db");
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! zsqlite - SQLite wrapper for Zig
|
//! zcatsql - SQLite wrapper for Zig
|
||||||
//!
|
//!
|
||||||
//! A lightweight, idiomatic Zig wrapper around SQLite that compiles the
|
//! A lightweight, idiomatic Zig wrapper around SQLite that compiles the
|
||||||
//! SQLite amalgamation directly into your binary for zero runtime dependencies.
|
//! SQLite amalgamation directly into your binary for zero runtime dependencies.
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
//! ## Quick Start
|
//! ## Quick Start
|
||||||
//!
|
//!
|
||||||
//! ```zig
|
//! ```zig
|
||||||
//! const sqlite = @import("zsqlite");
|
//! const sqlite = @import("zcatsql");
|
||||||
//!
|
//!
|
||||||
//! pub fn main() !void {
|
//! pub fn main() !void {
|
||||||
//! var db = try sqlite.open(":memory:");
|
//! var db = try sqlite.open(":memory:");
|
||||||
|
|
@ -1101,7 +1101,7 @@ test "connection pool basic" {
|
||||||
|
|
||||||
// Use a temp file instead of shared memory cache
|
// Use a temp file instead of shared memory cache
|
||||||
// (shared cache is disabled with -DSQLITE_OMIT_SHARED_CACHE)
|
// (shared cache is disabled with -DSQLITE_OMIT_SHARED_CACHE)
|
||||||
const tmp_path = "/tmp/zsqlite_pool_test.db";
|
const tmp_path = "/tmp/zcatsql_pool_test.db";
|
||||||
std.fs.cwd().deleteFile(tmp_path) catch {};
|
std.fs.cwd().deleteFile(tmp_path) catch {};
|
||||||
defer std.fs.cwd().deleteFile(tmp_path) catch {};
|
defer std.fs.cwd().deleteFile(tmp_path) catch {};
|
||||||
|
|
||||||
|
|
@ -1607,7 +1607,7 @@ test "vacuum into file" {
|
||||||
try db.exec("INSERT INTO test VALUES (1, 'test data')");
|
try db.exec("INSERT INTO test VALUES (1, 'test data')");
|
||||||
|
|
||||||
// Create a temp file path
|
// Create a temp file path
|
||||||
const tmp_path = "/tmp/zsqlite_vacuum_test.db";
|
const tmp_path = "/tmp/zcatsql_vacuum_test.db";
|
||||||
|
|
||||||
// Clean up any existing file
|
// Clean up any existing file
|
||||||
std.fs.cwd().deleteFile(tmp_path) catch {};
|
std.fs.cwd().deleteFile(tmp_path) catch {};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
//! ## Quick Start
|
//! ## Quick Start
|
||||||
//!
|
//!
|
||||||
//! ```zig
|
//! ```zig
|
||||||
//! const sqlite = @import("zsqlite");
|
//! const sqlite = @import("zcatsql");
|
||||||
//!
|
//!
|
||||||
//! // Serialize a database to bytes
|
//! // Serialize a database to bytes
|
||||||
//! var db = try sqlite.open(":memory:");
|
//! var db = try sqlite.open(":memory:");
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
//! ## Quick Start
|
//! ## Quick Start
|
||||||
//!
|
//!
|
||||||
//! ```zig
|
//! ```zig
|
||||||
//! const sqlite = @import("zsqlite");
|
//! const sqlite = @import("zcatsql");
|
||||||
//! const Session = sqlite.session.Session;
|
//! const Session = sqlite.session.Session;
|
||||||
//!
|
//!
|
||||||
//! // Create a session to track changes
|
//! // Create a session to track changes
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! Common types for zsqlite
|
//! Common types for zcatsql
|
||||||
//!
|
//!
|
||||||
//! Contains enums, flags, and type definitions shared across modules.
|
//! Contains enums, flags, and type definitions shared across modules.
|
||||||
|
|
||||||
|
|
|
||||||
BIN
test_arraylist
Executable file
BIN
test_arraylist
Executable file
Binary file not shown.
Loading…
Reference in a new issue