@intentius/chant-lexicon-sql 0.124.49 → 0.124.50
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/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "8fcc05ed6d319778750df01f606b0296d313ea3a659fc2493157ed7429600cb3",
|
|
5
5
|
"meta.json": "2a75a38ea0fb186f27a59d6b8401d7af0809db5e471769f0259f7c1a4292b858",
|
|
6
6
|
"types/index.d.ts": "0286ebb367773e84c76818b0f69cb14cff8328fd2f8c65ed87563c8d5815458c",
|
|
7
7
|
"rules/postgres-templates.ts": "cbbe8b3c3531300ef5f17d596bf9403343d9fde019961436b6af0cdc66e4064a",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"rules/sqlpg125.ts": "cc7411c57c525613dc720ba00e986bbc4e5a84b8b0bcfa7a6ce0d058f039f025",
|
|
81
81
|
"rules/sqlpg126.ts": "d57b82a5842273876510131d67bf4418cbd61eff821e245edebc644dafd502bb"
|
|
82
82
|
},
|
|
83
|
-
"composite": "
|
|
83
|
+
"composite": "e5fa7bef4e056cc28f8c6715ae8e0a685ceb8a65909be069a78008c818409bd9"
|
|
84
84
|
}
|
package/dist/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-kinds.d.ts","sourceRoot":"","sources":["../../../src/postgres/live/catalog-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog-kinds.d.ts","sourceRoot":"","sources":["../../../src/postgres/live/catalog-kinds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAA+B,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AA4C7F,4GAA4G;AAC5G,wBAAsB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA0EvG;AAED,kFAAkF;AAClF,wBAAsB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAuCxG;AAID,gFAAgF;AAChF,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA8H1G;AAMD;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAwCvG;AAkBD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA2E3G;AA0KD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,SAAS,CAcpG"}
|
|
@@ -33,10 +33,12 @@ function commentOn(what, comment) {
|
|
|
33
33
|
const own = stripMarker(c);
|
|
34
34
|
return own === "" ? [] : [`COMMENT ON ${what} IS ${literal(own)}`];
|
|
35
35
|
}
|
|
36
|
-
const notInternal = (catalog, oid) => `NOT EXISTS (SELECT 1 FROM pg_catalog.pg_depend
|
|
36
|
+
const notInternal = (catalog, oid) => `NOT EXISTS (SELECT 1 FROM pg_catalog.pg_depend dep_ WHERE dep_.classid = 'pg_catalog.${catalog}'::pg_catalog.regclass AND dep_.objid = ${oid} AND dep_.deptype = 'i')`;
|
|
37
37
|
/** What depends on an object of catalog `catalog` (a normal dependency), as the server describes each. */
|
|
38
|
-
const dependentsOf = (catalog, oid) =>
|
|
39
|
-
|
|
38
|
+
const dependentsOf = (catalog, oid) =>
|
|
39
|
+
// `dep_`, not `d`: a caller's own alias (the text search dictionary query's `d`) would otherwise shadow it.
|
|
40
|
+
`ARRAY(SELECT pg_catalog.pg_describe_object(dep_.classid, dep_.objid, dep_.objsubid) FROM pg_catalog.pg_depend dep_
|
|
41
|
+
WHERE dep_.refclassid = 'pg_catalog.${catalog}'::pg_catalog.regclass AND dep_.refobjid = ${oid} AND dep_.deptype = 'n' ORDER BY 1)`;
|
|
40
42
|
/** A collation's name as a clause: a `pg_catalog` one bare. */
|
|
41
43
|
const collationName = (oid) => `(SELECT CASE WHEN cn.nspname = 'pg_catalog' THEN pg_catalog.quote_ident(co.collname) ELSE pg_catalog.quote_ident(cn.nspname) || '.' || pg_catalog.quote_ident(co.collname) END ` +
|
|
42
44
|
`FROM pg_catalog.pg_collation co JOIN pg_catalog.pg_namespace cn ON cn.oid = co.collnamespace WHERE co.oid = ${oid})`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-sql",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.50",
|
|
4
4
|
"description": "SQL lexicon for chant — database schema as typed declarations, one dialect at a time; ClickHouse first, with types read from a pinned server's catalog",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@intentius/chant": "^0.124.
|
|
75
|
+
"@intentius/chant": "^0.124.50"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -40,12 +40,13 @@ function commentOn(what: string, comment: unknown): string[] {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
const notInternal = (catalog: string, oid: string): string =>
|
|
43
|
-
`NOT EXISTS (SELECT 1 FROM pg_catalog.pg_depend
|
|
43
|
+
`NOT EXISTS (SELECT 1 FROM pg_catalog.pg_depend dep_ WHERE dep_.classid = 'pg_catalog.${catalog}'::pg_catalog.regclass AND dep_.objid = ${oid} AND dep_.deptype = 'i')`;
|
|
44
44
|
|
|
45
45
|
/** What depends on an object of catalog `catalog` (a normal dependency), as the server describes each. */
|
|
46
46
|
const dependentsOf = (catalog: string, oid: string): string =>
|
|
47
|
-
`
|
|
48
|
-
|
|
47
|
+
// `dep_`, not `d`: a caller's own alias (the text search dictionary query's `d`) would otherwise shadow it.
|
|
48
|
+
`ARRAY(SELECT pg_catalog.pg_describe_object(dep_.classid, dep_.objid, dep_.objsubid) FROM pg_catalog.pg_depend dep_
|
|
49
|
+
WHERE dep_.refclassid = 'pg_catalog.${catalog}'::pg_catalog.regclass AND dep_.refobjid = ${oid} AND dep_.deptype = 'n' ORDER BY 1)`;
|
|
49
50
|
|
|
50
51
|
/** A collation's name as a clause: a `pg_catalog` one bare. */
|
|
51
52
|
const collationName = (oid: string): string =>
|