latticesql 1.6.8 → 1.6.9

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.
@@ -23,6 +23,22 @@ function ensureClient() {
23
23
  extErr instanceof Error ? extErr.message : extErr
24
24
  );
25
25
  }
26
+ try {
27
+ await client.query(
28
+ `CREATE OR REPLACE FUNCTION json_extract(doc text, path text)
29
+ RETURNS text
30
+ LANGUAGE sql
31
+ IMMUTABLE
32
+ AS $fn$
33
+ SELECT doc::jsonb #>> string_to_array(regexp_replace(path, '^\\$\\.?', ''), '.')
34
+ $fn$;`
35
+ );
36
+ } catch (jeErr) {
37
+ console.warn(
38
+ "[PostgresAdapter] could not register json_extract polyfill:",
39
+ jeErr instanceof Error ? jeErr.message : jeErr
40
+ );
41
+ }
26
42
  return { ok: true };
27
43
  }
28
44
  case "close": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "latticesql",
3
- "version": "1.6.8",
3
+ "version": "1.6.9",
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",