pgsql-deparser 18.1.1 → 18.2.0
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/deparser.js +12 -0
- package/esm/deparser.js +12 -0
- package/package.json +2 -2
package/deparser.js
CHANGED
|
@@ -7769,6 +7769,15 @@ class Deparser {
|
|
|
7769
7769
|
output.push(this.visit(node.object, context));
|
|
7770
7770
|
}
|
|
7771
7771
|
}
|
|
7772
|
+
else if ((node.renameType === 'OBJECT_TYPE' || node.renameType === 'OBJECT_DOMAIN') && node.object.List) {
|
|
7773
|
+
// Qualified type names - join List parts with dots
|
|
7774
|
+
const items = list_utils_1.ListUtils.unwrapList(node.object);
|
|
7775
|
+
const parts = items
|
|
7776
|
+
.map((item) => item.String?.sval)
|
|
7777
|
+
.filter((s) => typeof s === 'string')
|
|
7778
|
+
.map((s) => this.quoteIfNeeded(s));
|
|
7779
|
+
output.push(parts.join('.'));
|
|
7780
|
+
}
|
|
7772
7781
|
else if (node.renameType === 'OBJECT_SCHEMA' && node.object.List) {
|
|
7773
7782
|
// Handle schema names - extract from List structure
|
|
7774
7783
|
const items = list_utils_1.ListUtils.unwrapList(node.object);
|
|
@@ -7908,6 +7917,9 @@ class Deparser {
|
|
|
7908
7917
|
else if (node.objtype === 'OBJECT_LANGUAGE') {
|
|
7909
7918
|
output.push('LANGUAGE');
|
|
7910
7919
|
}
|
|
7920
|
+
else if (node.objtype === 'OBJECT_SEQUENCE') {
|
|
7921
|
+
output.push('SEQUENCE');
|
|
7922
|
+
}
|
|
7911
7923
|
else if (node.objtype === 'OBJECT_FUNCTION') {
|
|
7912
7924
|
output.push('FUNCTION');
|
|
7913
7925
|
}
|
package/esm/deparser.js
CHANGED
|
@@ -7766,6 +7766,15 @@ export class Deparser {
|
|
|
7766
7766
|
output.push(this.visit(node.object, context));
|
|
7767
7767
|
}
|
|
7768
7768
|
}
|
|
7769
|
+
else if ((node.renameType === 'OBJECT_TYPE' || node.renameType === 'OBJECT_DOMAIN') && node.object.List) {
|
|
7770
|
+
// Qualified type names - join List parts with dots
|
|
7771
|
+
const items = ListUtils.unwrapList(node.object);
|
|
7772
|
+
const parts = items
|
|
7773
|
+
.map((item) => item.String?.sval)
|
|
7774
|
+
.filter((s) => typeof s === 'string')
|
|
7775
|
+
.map((s) => this.quoteIfNeeded(s));
|
|
7776
|
+
output.push(parts.join('.'));
|
|
7777
|
+
}
|
|
7769
7778
|
else if (node.renameType === 'OBJECT_SCHEMA' && node.object.List) {
|
|
7770
7779
|
// Handle schema names - extract from List structure
|
|
7771
7780
|
const items = ListUtils.unwrapList(node.object);
|
|
@@ -7905,6 +7914,9 @@ export class Deparser {
|
|
|
7905
7914
|
else if (node.objtype === 'OBJECT_LANGUAGE') {
|
|
7906
7915
|
output.push('LANGUAGE');
|
|
7907
7916
|
}
|
|
7917
|
+
else if (node.objtype === 'OBJECT_SEQUENCE') {
|
|
7918
|
+
output.push('SEQUENCE');
|
|
7919
|
+
}
|
|
7908
7920
|
else if (node.objtype === 'OBJECT_FUNCTION') {
|
|
7909
7921
|
output.push('FUNCTION');
|
|
7910
7922
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgsql-deparser",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "PostgreSQL AST Deparser",
|
|
6
6
|
"main": "index.js",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"@pgsql/quotes": "18.1.0",
|
|
61
61
|
"@pgsql/types": "^18.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "884ba252cf8b074c6790b3722477acc3d6f92539"
|
|
64
64
|
}
|