tben and Claude Opus 5.5
66f73c4228
Fix SQL injection, schema-sync data loss, and backup safety
...
Security:
- select: bind parameters instead of mysql.format (backslash escaping
allowed injection on SQLite); drop the mysql dependency
- validate all interpolated identifiers, limit/offset/page, order
strategy, operators, join types and raw equalities (new sql-safe.ts)
- quote identifiers and bind values in schema manager DDL/queries
Data loss:
- schema sync runs with foreign keys off inside a transaction, with
foreign_key_check before commit (DROP TABLE no longer cascades)
- parentTableName tables: stop mutating the parent schema and copy
inherited columns on rebuild
- keep column data on type changes (match columns by name)
- backups and schema snapshots use VACUUM INTO (includes WAL data);
restore closes the DB, clears -wal/-shm, and swaps atomically
- backup listing/trimming only touches <db_name>-<timestamp> files
Correctness:
- update/delete use the generator's WHERE clause instead of a regex
- keep 0/""/false values; booleans stored as 0/1
- IN/NOT IN and BETWEEN arrays, NOT LIKE wrapping, AVG, select aliases
- OFFSET without LIMIT, count ignores pagination
- MATCH emits `field MATCH fn(?)` for sqlite-vec
- sql() returns rows for any row-producing statement
- targetId no longer mutates the caller's query
- init throws instead of process.exit; CLI reports errors
Co-Authored-By: Claude Opus 5.5 <[email protected] >
2026-10-14 02:06:59 +01:00
tben
991b02d7c1
Updates
2026-09-20 06:50:40 +01:00
tben
9129593545
Updates
2026-09-17 11:22:18 +01:00
tben
a357f69380
Updates
2026-05-24 04:37:51 +01:00
tben
6796a36464
Updates
2026-05-23 16:42:12 +01:00
tben
bcdd1f4b7e
Updates
2026-05-23 16:40:20 +01:00
tben
47f85d8343
Change updated_at and created_at preference. Insert data can override them.
2026-04-19 11:10:41 +01:00
tben
95d567d4dd
Update joins parser. Enforce selectFields unless instructed otherwise
2026-04-19 09:48:38 +01:00
tben
64a6d78506
SQL gen bugfix #5
2026-04-18 19:25:59 +01:00
tben
0309b0dc81
SQL gen bugfix #4
2026-04-18 19:24:55 +01:00
tben
ca99684183
SQL gen bugfix #3
2026-04-18 15:30:18 +01:00
tben
9e830cfb74
SQL gen bugfix #2
2026-04-18 15:27:25 +01:00
tben
df195412ac
SQL gen bugfix
2026-04-18 15:18:44 +01:00
tben
9c5d39edfb
Add more features to the query generator
2026-04-18 14:59:23 +01:00
tben
f3f1c42699
Major version update. Refactor sql generator function. Add core select directives like SUM, MIN, MAX, etc
2026-04-18 07:24:01 +01:00
tben
0a3320ff83
Updates
2026-04-18 06:02:43 +01:00
tben
fbf3622b18
DB Update Bugfix
2026-04-16 17:27:18 +01:00
tben
ff5d8082b7
Bugfix
2026-04-16 17:25:41 +01:00
tben
b73309e9d5
Bugfix
2026-04-16 17:18:50 +01:00
tben
959465a006
Bugfix
2026-04-16 15:15:33 +01:00
tben
7b2dc81bbb
Bugfix
2026-04-16 15:07:38 +01:00
tben
ea8a2eab6b
Updates
2026-04-16 15:05:35 +01:00
tben
af6b44ffbe
Updates
2026-04-16 14:36:28 +01:00
tben
613962a925
Update sql equalities.
2026-04-14 20:05:02 +01:00
tben
a4aa20baa4
Update sql gen. Add support for raw sql in joins select and regular select sections
2026-04-12 14:15:57 +01:00
tben
a57a063f67
Refactor select count strategy. Run the count query together with the normal query
2026-04-12 10:36:32 +01:00
tben
0827cfed11
Pagination Bugfix #3
2026-04-12 08:40:48 +01:00
tben
33f040116d
Pagination Bugfix #2
2026-04-12 08:36:21 +01:00
tben
eec6ad2785
Pagination Bugfix.
2026-04-12 08:33:29 +01:00
tben
dea25b71c2
Add Select pagination
2026-04-12 08:32:00 +01:00
tben
31a7fb40cb
Update conflict appenditures. Add updated_at field
2026-04-11 08:58:38 +01:00
tben
e6af7de865
Updates
2026-04-10 21:13:11 +01:00
tben
5799a2586e
Update sql insert data types
2026-04-05 09:45:29 +01:00
tben
d3bfb3a82b
Update raw SQL runner
2026-04-05 09:44:09 +01:00
tben
f500c52ee5
Fix vector table errors
2026-04-05 09:34:18 +01:00
tben
259a684136
Document typedefs better. Fix tables deletion schema sync issue.
2026-04-05 09:03:47 +01:00
tben
01b96d788e
Update schema gen function to be compatible with buffers
2026-04-05 07:40:10 +01:00
tben
88fff6c507
Update insert value types. Allow buffers
2026-04-05 07:37:08 +01:00
tben
b3bd5866e6
Update SQL handlers debugging
2026-04-05 07:19:26 +01:00
tben
685d47d91f
Change table update strategy to full recreation every time
2026-04-05 07:10:26 +01:00
tben
b46ff44dc7
Updates
2026-04-04 17:18:41 +01:00
tben
1a52f1927f
Updates
2026-04-04 16:49:01 +01:00
tben
1a96c95f7c
Updates
2026-04-02 20:26:01 +01:00
tben
eb41e95bd3
Updates
2026-04-02 07:33:04 +01:00
tben
7d320f26ef
Update Types
2026-03-22 13:07:38 +01:00
tben
462b897615
Update CLI admin panel
2026-03-22 06:54:49 +01:00
tben
4ae7fcf6a5
Add CLI admin panel
2026-03-22 06:42:51 +01:00
tben
35c4ca3853
Bugfix update
2026-03-22 05:46:26 +01:00
tben
f0cec49e3b
Major Bugfix
2026-03-22 05:44:28 +01:00
tben
04e4e0e9fd
Update README.md
2026-03-22 05:26:28 +01:00
tben
e7ee76f572
Updates
2026-03-11 05:40:37 +01:00
tben
406759306b
Updates
2026-03-08 10:11:08 +01:00
tben
a2f07e3c55
Updates
2026-03-05 05:27:12 +01:00
tben
72f361b06b
Updates
2026-03-05 05:26:28 +01:00
tben
59e72942b8
Updates
2026-03-05 05:24:02 +01:00
tben
077a15ed71
Update CRUD functions type defs
2026-03-02 17:03:00 +01:00
tben
83bc501bd1
Update README
2026-03-02 14:59:54 +01:00
tben
310f14dd75
Resolve typescript errors
2026-03-02 14:58:14 +01:00
tben
8f50b200c8
Make backup dir name config variable optional
2026-03-02 14:56:47 +01:00
tben
98e51645d5
Add Backup and Restore: Version Update
2026-03-02 14:51:47 +01:00
tben
ec27ff9c04
Add Backup and Restore
2026-03-02 14:51:19 +01:00
tben
634be9b01d
Updates
2026-03-02 10:44:30 +01:00
tben
e293205e66
Updates
2026-03-02 10:32:57 +01:00
tben
2baf4abdb4
Add Engine V1
2026-03-02 10:24:40 +01:00
tben
dcc0c9e393
first Commit #2
2026-03-02 07:56:23 +01:00
tben
5555a8e917
first Commit
2026-03-02 07:56:05 +01:00