latticesql 1.6.9 → 1.6.10

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.
@@ -39,6 +39,42 @@ function ensureClient() {
39
39
  jeErr instanceof Error ? jeErr.message : jeErr
40
40
  );
41
41
  }
42
+ try {
43
+ await client.query(
44
+ `CREATE OR REPLACE FUNCTION strftime(format text, modifier text)
45
+ RETURNS text
46
+ LANGUAGE plpgsql
47
+ IMMUTABLE
48
+ AS $fn$
49
+ DECLARE ts timestamptz;
50
+ BEGIN
51
+ IF modifier = 'now' THEN
52
+ ts := now();
53
+ ELSE
54
+ ts := modifier::timestamptz;
55
+ END IF;
56
+ RETURN to_char(
57
+ ts AT TIME ZONE 'UTC',
58
+ replace(replace(replace(replace(replace(replace(replace(replace(
59
+ format,
60
+ '%Y', 'YYYY'),
61
+ '%m', 'MM'),
62
+ '%d', 'DD'),
63
+ '%H', 'HH24'),
64
+ '%M', 'MI'),
65
+ '%S', 'SS'),
66
+ '%f', 'MS'),
67
+ 'T', '"T"')
68
+ );
69
+ END;
70
+ $fn$;`
71
+ );
72
+ } catch (sfErr) {
73
+ console.warn(
74
+ "[PostgresAdapter] could not register strftime polyfill:",
75
+ sfErr instanceof Error ? sfErr.message : sfErr
76
+ );
77
+ }
42
78
  return { ok: true };
43
79
  }
44
80
  case "close": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latticesql",
3
- "version": "1.6.9",
3
+ "version": "1.6.10",
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",