latticesql 1.6.7 → 1.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -574,6 +574,13 @@ function translateDialect(sql) {
574
574
  );
575
575
  s = replaceFunction(s, "hex", (arg) => `encode(${arg}, 'hex')`);
576
576
  s = replaceFunction(s, "randomblob", (arg) => `gen_random_bytes(${arg})`);
577
+ s = replaceFunction(s, "datetime", (arg) => {
578
+ const trimmed = arg.trim();
579
+ if (trimmed === "'now'" || trimmed === '"now"') return "NOW()";
580
+ throw new Error(
581
+ "PostgresAdapter: datetime(" + arg + ") is not auto-translated. Only datetime('now') is supported. Use NOW() or an equivalent Postgres expression in your migration."
582
+ );
583
+ });
577
584
  return s;
578
585
  }
579
586
  function hasOnConflictInCode(sql) {
package/dist/index.cjs CHANGED
@@ -324,6 +324,13 @@ function translateDialect(sql) {
324
324
  );
325
325
  s = replaceFunction(s, "hex", (arg) => `encode(${arg}, 'hex')`);
326
326
  s = replaceFunction(s, "randomblob", (arg) => `gen_random_bytes(${arg})`);
327
+ s = replaceFunction(s, "datetime", (arg) => {
328
+ const trimmed = arg.trim();
329
+ if (trimmed === "'now'" || trimmed === '"now"') return "NOW()";
330
+ throw new Error(
331
+ "PostgresAdapter: datetime(" + arg + ") is not auto-translated. Only datetime('now') is supported. Use NOW() or an equivalent Postgres expression in your migration."
332
+ );
333
+ });
327
334
  return s;
328
335
  }
329
336
  function hasOnConflictInCode(sql) {
package/dist/index.js CHANGED
@@ -259,6 +259,13 @@ function translateDialect(sql) {
259
259
  );
260
260
  s = replaceFunction(s, "hex", (arg) => `encode(${arg}, 'hex')`);
261
261
  s = replaceFunction(s, "randomblob", (arg) => `gen_random_bytes(${arg})`);
262
+ s = replaceFunction(s, "datetime", (arg) => {
263
+ const trimmed = arg.trim();
264
+ if (trimmed === "'now'" || trimmed === '"now"') return "NOW()";
265
+ throw new Error(
266
+ "PostgresAdapter: datetime(" + arg + ") is not auto-translated. Only datetime('now') is supported. Use NOW() or an equivalent Postgres expression in your migration."
267
+ );
268
+ });
262
269
  return s;
263
270
  }
264
271
  function hasOnConflictInCode(sql) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latticesql",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "description": "Persistent structured memory for AI agent systems — pluggable SQLite or Postgres backend, LLM context bridge",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",