js.documents 14.4.25 → 14.4.27
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/odb/sql/evaluate.cjs +12 -14
- package/dist/odb/sql/evaluate.js +12 -14
- package/package.json +9 -9
|
@@ -60,8 +60,7 @@ function tryResolveName(candidates, ref, what, sql) {
|
|
|
60
60
|
if (!ref.quoted) {
|
|
61
61
|
const folded = candidates.filter((candidate) => candidate.toUpperCase() === ref.name);
|
|
62
62
|
if (folded.length > 1) throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`${what} "${ref.name}" is ambiguous—it matches ${folded.join(", ")} case-insensitively`, sql);
|
|
63
|
-
|
|
64
|
-
if (only !== void 0) return only;
|
|
63
|
+
return folded[0];
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
function resolveName(candidates, ref, what, sql) {
|
|
@@ -104,7 +103,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
|
104
103
|
firstFolded ??= index;
|
|
105
104
|
}
|
|
106
105
|
if (foldedNames.length > 1) throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`column "${ref.name}" is ambiguous—it matches ${foldedNames.join(", ")} case-insensitively`, sql);
|
|
107
|
-
|
|
106
|
+
return firstFolded;
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
function resolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
@@ -133,29 +132,28 @@ var ColumnResolver = class {
|
|
|
133
132
|
indexOf(ref) {
|
|
134
133
|
const cached = this.cache.get(ref);
|
|
135
134
|
if (cached !== void 0) return cached;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const qualifierName = resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
139
|
-
candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
|
|
140
|
-
} else candidateIndices = this.columns.map((_column, index) => index);
|
|
141
|
-
const index = resolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
|
|
135
|
+
const qualifierName = ref.qualifier === void 0 ? void 0 : resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
136
|
+
const index = resolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
|
|
142
137
|
this.cache.set(ref, index);
|
|
143
138
|
return index;
|
|
144
139
|
}
|
|
145
140
|
tryLocalIndexOf(ref) {
|
|
146
141
|
const cached = this.cache.get(ref);
|
|
147
142
|
if (cached !== void 0) return cached;
|
|
148
|
-
let
|
|
143
|
+
let qualifierName;
|
|
149
144
|
if (ref.qualifier !== void 0) {
|
|
150
|
-
|
|
145
|
+
qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
151
146
|
if (qualifierName === void 0) return;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
const index = tryResolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
|
|
147
|
+
}
|
|
148
|
+
const index = tryResolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
|
|
155
149
|
if (index === void 0) return;
|
|
156
150
|
this.cache.set(ref, index);
|
|
157
151
|
return index;
|
|
158
152
|
}
|
|
153
|
+
candidateIndicesFor(qualifierName) {
|
|
154
|
+
if (qualifierName === void 0) return this.columns.map((_column, index) => index);
|
|
155
|
+
return this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
|
|
156
|
+
}
|
|
159
157
|
valueAt(index, row) {
|
|
160
158
|
return valueAtIndex(row, index, this.sql);
|
|
161
159
|
}
|
package/dist/odb/sql/evaluate.js
CHANGED
|
@@ -59,8 +59,7 @@ function tryResolveName(candidates, ref, what, sql) {
|
|
|
59
59
|
if (!ref.quoted) {
|
|
60
60
|
const folded = candidates.filter((candidate) => candidate.toUpperCase() === ref.name);
|
|
61
61
|
if (folded.length > 1) throw new HsqldbSqlEvaluationError(`${what} "${ref.name}" is ambiguous—it matches ${folded.join(", ")} case-insensitively`, sql);
|
|
62
|
-
|
|
63
|
-
if (only !== void 0) return only;
|
|
62
|
+
return folded[0];
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
function resolveName(candidates, ref, what, sql) {
|
|
@@ -103,7 +102,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
|
103
102
|
firstFolded ??= index;
|
|
104
103
|
}
|
|
105
104
|
if (foldedNames.length > 1) throw new HsqldbSqlEvaluationError(`column "${ref.name}" is ambiguous—it matches ${foldedNames.join(", ")} case-insensitively`, sql);
|
|
106
|
-
|
|
105
|
+
return firstFolded;
|
|
107
106
|
}
|
|
108
107
|
}
|
|
109
108
|
function resolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
@@ -132,29 +131,28 @@ var ColumnResolver = class {
|
|
|
132
131
|
indexOf(ref) {
|
|
133
132
|
const cached = this.cache.get(ref);
|
|
134
133
|
if (cached !== void 0) return cached;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
const qualifierName = resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
138
|
-
candidateIndices = this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
|
|
139
|
-
} else candidateIndices = this.columns.map((_column, index) => index);
|
|
140
|
-
const index = resolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
|
|
134
|
+
const qualifierName = ref.qualifier === void 0 ? void 0 : resolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
135
|
+
const index = resolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
|
|
141
136
|
this.cache.set(ref, index);
|
|
142
137
|
return index;
|
|
143
138
|
}
|
|
144
139
|
tryLocalIndexOf(ref) {
|
|
145
140
|
const cached = this.cache.get(ref);
|
|
146
141
|
if (cached !== void 0) return cached;
|
|
147
|
-
let
|
|
142
|
+
let qualifierName;
|
|
148
143
|
if (ref.qualifier !== void 0) {
|
|
149
|
-
|
|
144
|
+
qualifierName = tryResolveName(this.qualifierNames, ref.qualifier, "table qualifier", this.sql);
|
|
150
145
|
if (qualifierName === void 0) return;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const index = tryResolveColumnIndex(this.columns, candidateIndices, ref.column, this.sql);
|
|
146
|
+
}
|
|
147
|
+
const index = tryResolveColumnIndex(this.columns, this.candidateIndicesFor(qualifierName), ref.column, this.sql);
|
|
154
148
|
if (index === void 0) return;
|
|
155
149
|
this.cache.set(ref, index);
|
|
156
150
|
return index;
|
|
157
151
|
}
|
|
152
|
+
candidateIndicesFor(qualifierName) {
|
|
153
|
+
if (qualifierName === void 0) return this.columns.map((_column, index) => index);
|
|
154
|
+
return this.columns.map((column, index) => column.qualifiers.includes(qualifierName) ? index : -1).filter((index) => index >= 0);
|
|
155
|
+
}
|
|
158
156
|
valueAt(index, row) {
|
|
159
157
|
return valueAtIndex(row, index, this.sql);
|
|
160
158
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "14.4.
|
|
3
|
+
"version": "14.4.27",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -77,21 +77,21 @@
|
|
|
77
77
|
],
|
|
78
78
|
"license": "MIT",
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"archive-codec": "1.11.
|
|
80
|
+
"archive-codec": "1.11.20",
|
|
81
81
|
"byte-codec": "2.0.0",
|
|
82
|
-
"doc-codec": "6.1.
|
|
82
|
+
"doc-codec": "6.1.12",
|
|
83
83
|
"document-schema.js": "7.15.1",
|
|
84
84
|
"epub-codec": "5.1.6",
|
|
85
85
|
"fflate": "0.8.3",
|
|
86
86
|
"markdown-codec": "11.1.5",
|
|
87
|
-
"odf.js": "11.1.
|
|
88
|
-
"ooxml.js": "12.2.
|
|
87
|
+
"odf.js": "11.1.6",
|
|
88
|
+
"ooxml.js": "12.2.20",
|
|
89
89
|
"pdf-codec": "5.2.23",
|
|
90
|
-
"ppt-codec": "2.2.
|
|
91
|
-
"rtf-codec": "8.1.
|
|
90
|
+
"ppt-codec": "2.2.11",
|
|
91
|
+
"rtf-codec": "8.1.12",
|
|
92
92
|
"temml": "0.13.4",
|
|
93
|
-
"wpd-codec": "5.1.
|
|
94
|
-
"xls-codec": "4.15.
|
|
93
|
+
"wpd-codec": "5.1.13",
|
|
94
|
+
"xls-codec": "4.15.33",
|
|
95
95
|
"zod": "4.4.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|