js.documents 14.4.32 → 14.4.34
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/{blr-types-CMN0QKUE.d.cts → blr-types-deHhtYjv.d.cts} +2 -1
- package/dist/{blr-types-CMN0QKUE.d.ts → blr-types-deHhtYjv.d.ts} +2 -1
- package/dist/convert/composition.cjs +65 -65
- package/dist/convert/composition.d.cts +1 -1
- package/dist/convert/composition.d.ts +1 -1
- package/dist/convert/composition.js +65 -65
- package/dist/edit/docx/table.cjs +1 -1
- package/dist/edit/docx/table.js +1 -1
- package/dist/edit/odg/page.d.cts +1 -1
- package/dist/edit/odg/page.d.ts +1 -1
- package/dist/edit/odg/vector.cjs +5 -0
- package/dist/edit/odg/vector.d.cts +2 -2
- package/dist/edit/odg/vector.d.ts +2 -2
- package/dist/edit/odg/vector.js +5 -1
- package/dist/edit/odp/slide.d.cts +1 -1
- package/dist/edit/odp/slide.d.ts +1 -1
- package/dist/edit/odt/automatic-styles.cjs +1 -1
- package/dist/edit/odt/automatic-styles.js +1 -1
- package/dist/edit/odt/content.cjs +32 -32
- package/dist/edit/odt/content.js +32 -32
- package/dist/edit/odt/table.cjs +1 -1
- package/dist/edit/odt/table.js +1 -1
- package/dist/edit/pdf/item.cjs +5 -0
- package/dist/edit/pdf/item.d.cts +2 -2
- package/dist/edit/pdf/item.d.ts +2 -2
- package/dist/edit/pdf/item.js +5 -1
- package/dist/edit/pdf/page.d.cts +1 -1
- package/dist/edit/pdf/page.d.ts +1 -1
- package/dist/evaluate-BbOsgdmN.d.cts +15 -0
- package/dist/evaluate-C7fmk69X.d.ts +15 -0
- package/dist/firebird/backup.d.cts +1 -1
- package/dist/firebird/backup.d.ts +1 -1
- package/dist/firebird/blr-types.cjs +5 -0
- package/dist/firebird/blr-types.d.cts +2 -2
- package/dist/firebird/blr-types.d.ts +2 -2
- package/dist/firebird/blr-types.js +5 -1
- package/dist/firebird/schema.d.cts +1 -1
- package/dist/firebird/schema.d.ts +1 -1
- package/dist/hsqldb/binary-script.d.cts +1 -1
- package/dist/hsqldb/binary-script.d.ts +1 -1
- package/dist/hsqldb/cache.d.cts +1 -1
- package/dist/hsqldb/cache.d.ts +1 -1
- package/dist/hsqldb/script.cjs +5 -0
- package/dist/hsqldb/script.d.cts +2 -2
- package/dist/hsqldb/script.d.ts +2 -2
- package/dist/hsqldb/script.js +5 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/{item-SUC4uKDO.d.cts → item-B5d6CCqq.d.cts} +2 -1
- package/dist/{item-SUC4uKDO.d.ts → item-B5d6CCqq.d.ts} +2 -1
- package/dist/latex/lower.cjs +2 -2
- package/dist/latex/lower.js +2 -2
- package/dist/layout/lattice.cjs +1 -1
- package/dist/layout/lattice.js +1 -1
- package/dist/layout/reconstruct.cjs +3 -3
- package/dist/layout/reconstruct.js +3 -3
- package/dist/markdown/render.cjs +5 -0
- package/dist/markdown/render.d.cts +2 -1
- package/dist/markdown/render.d.ts +2 -1
- package/dist/markdown/render.js +5 -1
- package/dist/model/embedded-drawing.cjs +5 -0
- package/dist/model/embedded-drawing.d.cts +2 -1
- package/dist/model/embedded-drawing.d.ts +2 -1
- package/dist/model/embedded-drawing.js +5 -1
- package/dist/odb/csv.d.cts +1 -1
- package/dist/odb/csv.d.ts +1 -1
- package/dist/odb/formula/evaluate.cjs +5 -0
- package/dist/odb/formula/evaluate.d.cts +3 -2
- package/dist/odb/formula/evaluate.d.ts +3 -2
- package/dist/odb/formula/evaluate.js +5 -1
- package/dist/odb/formula/parser.d.cts +1 -1
- package/dist/odb/formula/parser.d.ts +1 -1
- package/dist/odb/read.d.cts +1 -1
- package/dist/odb/read.d.ts +1 -1
- package/dist/odb/report/render.cjs +5 -0
- package/dist/odb/report/render.d.cts +3 -2
- package/dist/odb/report/render.d.ts +3 -2
- package/dist/odb/report/render.js +5 -1
- package/dist/odb/report/source.d.cts +1 -1
- package/dist/odb/report/source.d.ts +1 -1
- package/dist/odb/spreadsheet.d.cts +1 -1
- package/dist/odb/spreadsheet.d.ts +1 -1
- package/dist/odb/sql/evaluate.cjs +21 -1
- package/dist/odb/sql/evaluate.d.cts +2 -2
- package/dist/odb/sql/evaluate.d.ts +2 -2
- package/dist/odb/sql/evaluate.js +18 -2
- package/dist/odb/sql/parser.cjs +12 -7
- package/dist/odb/sql/parser.d.cts +2 -2
- package/dist/odb/sql/parser.d.ts +2 -2
- package/dist/odb/sql/parser.js +12 -8
- package/dist/odb/values.cjs +5 -0
- package/dist/odb/values.d.cts +2 -2
- package/dist/odb/values.d.ts +2 -2
- package/dist/odb/values.js +5 -1
- package/dist/{parser-Oq6zLQsu.d.cts → parser-BTA1wXPd.d.cts} +2 -1
- package/dist/{parser-CfMvvMT1.d.ts → parser-CoIi0l9I.d.ts} +2 -1
- package/dist/ppt/write.cjs +5 -0
- package/dist/ppt/write.d.cts +2 -1
- package/dist/ppt/write.d.ts +2 -1
- package/dist/ppt/write.js +5 -1
- package/dist/{script-DsGGIzGU.d.cts → script-pkZ2Kor4.d.cts} +2 -1
- package/dist/{script-DsGGIzGU.d.ts → script-pkZ2Kor4.d.ts} +2 -1
- package/dist/svg/transform.cjs +5 -0
- package/dist/svg/transform.d.cts +2 -1
- package/dist/svg/transform.d.ts +2 -1
- package/dist/svg/transform.js +5 -1
- package/dist/svg/write.cjs +5 -0
- package/dist/svg/write.d.cts +2 -1
- package/dist/svg/write.d.ts +2 -1
- package/dist/svg/write.js +5 -1
- package/dist/{values-BBN9E8dV.d.cts → values-DcupkLKg.d.cts} +2 -1
- package/dist/{values-BBN9E8dV.d.ts → values-DcupkLKg.d.ts} +2 -1
- package/dist/{vector-DDP7hgvm.d.cts → vector-DWSXN_G2.d.cts} +2 -1
- package/dist/{vector-DDP7hgvm.d.ts → vector-DWSXN_G2.d.ts} +2 -1
- package/package.json +13 -13
- package/dist/evaluate-BnRKjJ1G.d.ts +0 -11
- package/dist/evaluate-CYYLwKtR.d.cts +0 -11
package/dist/odb/csv.d.cts
CHANGED
package/dist/odb/csv.d.ts
CHANGED
|
@@ -161,6 +161,7 @@ var FormulaEvaluator = class {
|
|
|
161
161
|
return require_odb_values.aggregateCellValues(formula.aggregate, values, (message) => new require_odb_formula_errors.RptFormulaEvaluationError(message, formula.text));
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
return assertNeverFormulaKind(formula);
|
|
164
165
|
}
|
|
165
166
|
requireRow(rowIndex, formula, what) {
|
|
166
167
|
if (rowIndex === void 0) fail(`${what} needs a data row, but the band it appears in belongs to no row (the report header and footer print outside the data)`, formula);
|
|
@@ -278,6 +279,10 @@ function evaluateRptBandOutsideData(definition, band, resultSet) {
|
|
|
278
279
|
const evaluator = new FormulaEvaluator(new PreparedReport(definition, resultSet), new RunState(definition.groups.length, resultSet.rows.length));
|
|
279
280
|
return prepareBandFormulas(band).map((formula) => formula === void 0 ? void 0 : evaluator.evaluate(formula, void 0, { kind: "report" }));
|
|
280
281
|
}
|
|
282
|
+
function assertNeverFormulaKind(value) {
|
|
283
|
+
throw new Error(`documents.js: unhandled formula ${JSON.stringify(value)}`);
|
|
284
|
+
}
|
|
281
285
|
//#endregion
|
|
286
|
+
exports.assertNeverFormulaKind = assertNeverFormulaKind;
|
|
282
287
|
exports.evaluateRptBandOutsideData = evaluateRptBandOutsideData;
|
|
283
288
|
exports.runRptReport = runRptReport;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
1
|
+
import { t as SqlResultSet } from "../../evaluate-BbOsgdmN.cjs";
|
|
2
2
|
import { ContentCellValue } from "document-schema.js";
|
|
3
3
|
//#region src/odb/formula/evaluate.d.ts
|
|
4
4
|
type RptBandKind = "report-header" | "group-header" | "detail" | "group-footer" | "report-footer";
|
|
@@ -39,5 +39,6 @@ interface RptReportRun {
|
|
|
39
39
|
}
|
|
40
40
|
declare function runRptReport(definition: RptReportDefinition, resultSet: SqlResultSet): RptReportRun;
|
|
41
41
|
declare function evaluateRptBandOutsideData(definition: RptReportDefinition, band: RptBandDefinition, resultSet: SqlResultSet): readonly (ContentCellValue | undefined)[];
|
|
42
|
+
declare function assertNeverFormulaKind(value: never): never;
|
|
42
43
|
//#endregion
|
|
43
|
-
export { RptBandDefinition, RptBandInstance, RptBandKind, RptGroupDefinition, RptNamedFunctionDefinition, RptReportDefinition, RptReportRun, RptScope, evaluateRptBandOutsideData, runRptReport };
|
|
44
|
+
export { RptBandDefinition, RptBandInstance, RptBandKind, RptGroupDefinition, RptNamedFunctionDefinition, RptReportDefinition, RptReportRun, RptScope, assertNeverFormulaKind, evaluateRptBandOutsideData, runRptReport };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
1
|
+
import { t as SqlResultSet } from "../../evaluate-C7fmk69X.js";
|
|
2
2
|
import { ContentCellValue } from "document-schema.js";
|
|
3
3
|
//#region src/odb/formula/evaluate.d.ts
|
|
4
4
|
type RptBandKind = "report-header" | "group-header" | "detail" | "group-footer" | "report-footer";
|
|
@@ -39,5 +39,6 @@ interface RptReportRun {
|
|
|
39
39
|
}
|
|
40
40
|
declare function runRptReport(definition: RptReportDefinition, resultSet: SqlResultSet): RptReportRun;
|
|
41
41
|
declare function evaluateRptBandOutsideData(definition: RptReportDefinition, band: RptBandDefinition, resultSet: SqlResultSet): readonly (ContentCellValue | undefined)[];
|
|
42
|
+
declare function assertNeverFormulaKind(value: never): never;
|
|
42
43
|
//#endregion
|
|
43
|
-
export { RptBandDefinition, RptBandInstance, RptBandKind, RptGroupDefinition, RptNamedFunctionDefinition, RptReportDefinition, RptReportRun, RptScope, evaluateRptBandOutsideData, runRptReport };
|
|
44
|
+
export { RptBandDefinition, RptBandInstance, RptBandKind, RptGroupDefinition, RptNamedFunctionDefinition, RptReportDefinition, RptReportRun, RptScope, assertNeverFormulaKind, evaluateRptBandOutsideData, runRptReport };
|
|
@@ -160,6 +160,7 @@ var FormulaEvaluator = class {
|
|
|
160
160
|
return aggregateCellValues(formula.aggregate, values, (message) => new RptFormulaEvaluationError(message, formula.text));
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
+
return assertNeverFormulaKind(formula);
|
|
163
164
|
}
|
|
164
165
|
requireRow(rowIndex, formula, what) {
|
|
165
166
|
if (rowIndex === void 0) fail(`${what} needs a data row, but the band it appears in belongs to no row (the report header and footer print outside the data)`, formula);
|
|
@@ -277,5 +278,8 @@ function evaluateRptBandOutsideData(definition, band, resultSet) {
|
|
|
277
278
|
const evaluator = new FormulaEvaluator(new PreparedReport(definition, resultSet), new RunState(definition.groups.length, resultSet.rows.length));
|
|
278
279
|
return prepareBandFormulas(band).map((formula) => formula === void 0 ? void 0 : evaluator.evaluate(formula, void 0, { kind: "report" }));
|
|
279
280
|
}
|
|
281
|
+
function assertNeverFormulaKind(value) {
|
|
282
|
+
throw new Error(`documents.js: unhandled formula ${JSON.stringify(value)}`);
|
|
283
|
+
}
|
|
280
284
|
//#endregion
|
|
281
|
-
export { evaluateRptBandOutsideData, runRptReport };
|
|
285
|
+
export { assertNeverFormulaKind, evaluateRptBandOutsideData, runRptReport };
|
package/dist/odb/read.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
2
|
-
import { r as HsqldbTable } from "../script-
|
|
2
|
+
import { r as HsqldbTable } from "../script-pkZ2Kor4.cjs";
|
|
3
3
|
import { Package } from "odf.js";
|
|
4
4
|
//#region src/odb/read.d.ts
|
|
5
5
|
declare class OdbNoEmbeddedDataSourceError extends Error {
|
package/dist/odb/read.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
2
|
-
import { r as HsqldbTable } from "../script-
|
|
2
|
+
import { r as HsqldbTable } from "../script-pkZ2Kor4.js";
|
|
3
3
|
import { Package } from "odf.js";
|
|
4
4
|
//#region src/odb/read.d.ts
|
|
5
5
|
declare class OdbNoEmbeddedDataSourceError extends Error {
|
|
@@ -36,6 +36,7 @@ function bandOfInstance(report, groups, instance) {
|
|
|
36
36
|
return printedBand(instance.kind === "group-header" ? group.header : group.footer, groupBandStyle(instance.kind, level), instance.values);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
return assertNeverInstanceKind(instance.kind);
|
|
39
40
|
}
|
|
40
41
|
function elementText(element, value) {
|
|
41
42
|
if (element.formula === void 0) return element.text ?? "";
|
|
@@ -101,5 +102,9 @@ function renderOdbReportContent(report, resultSet) {
|
|
|
101
102
|
sections: [section]
|
|
102
103
|
};
|
|
103
104
|
}
|
|
105
|
+
function assertNeverInstanceKind(value) {
|
|
106
|
+
throw new Error(`documents.js: unhandled instance.kind ${JSON.stringify(value)}`);
|
|
107
|
+
}
|
|
104
108
|
//#endregion
|
|
109
|
+
exports.assertNeverInstanceKind = assertNeverInstanceKind;
|
|
105
110
|
exports.renderOdbReportContent = renderOdbReportContent;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
1
|
+
import { t as SqlResultSet } from "../../evaluate-BbOsgdmN.cjs";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
import { OdbReport } from "odf.js";
|
|
4
4
|
//#region src/odb/report/render.d.ts
|
|
5
5
|
declare function renderOdbReportContent(report: OdbReport, resultSet: SqlResultSet): ContentDocument;
|
|
6
|
+
declare function assertNeverInstanceKind(value: never): never;
|
|
6
7
|
//#endregion
|
|
7
|
-
export { renderOdbReportContent };
|
|
8
|
+
export { assertNeverInstanceKind, renderOdbReportContent };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
1
|
+
import { t as SqlResultSet } from "../../evaluate-C7fmk69X.js";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
import { OdbReport } from "odf.js";
|
|
4
4
|
//#region src/odb/report/render.d.ts
|
|
5
5
|
declare function renderOdbReportContent(report: OdbReport, resultSet: SqlResultSet): ContentDocument;
|
|
6
|
+
declare function assertNeverInstanceKind(value: never): never;
|
|
6
7
|
//#endregion
|
|
7
|
-
export { renderOdbReportContent };
|
|
8
|
+
export { assertNeverInstanceKind, renderOdbReportContent };
|
|
@@ -35,6 +35,7 @@ function bandOfInstance(report, groups, instance) {
|
|
|
35
35
|
return printedBand(instance.kind === "group-header" ? group.header : group.footer, groupBandStyle(instance.kind, level), instance.values);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
+
return assertNeverInstanceKind(instance.kind);
|
|
38
39
|
}
|
|
39
40
|
function elementText(element, value) {
|
|
40
41
|
if (element.formula === void 0) return element.text ?? "";
|
|
@@ -100,5 +101,8 @@ function renderOdbReportContent(report, resultSet) {
|
|
|
100
101
|
sections: [section]
|
|
101
102
|
};
|
|
102
103
|
}
|
|
104
|
+
function assertNeverInstanceKind(value) {
|
|
105
|
+
throw new Error(`documents.js: unhandled instance.kind ${JSON.stringify(value)}`);
|
|
106
|
+
}
|
|
103
107
|
//#endregion
|
|
104
|
-
export { renderOdbReportContent };
|
|
108
|
+
export { assertNeverInstanceKind, renderOdbReportContent };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HsqldbDecodeOptions } from "../../rowformat-Cl2exlEh.cjs";
|
|
2
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
2
|
+
import { t as SqlResultSet } from "../../evaluate-BbOsgdmN.cjs";
|
|
3
3
|
import { OdbQueryInfo, OdbReport, Package } from "odf.js";
|
|
4
4
|
//#region src/odb/report/source.d.ts
|
|
5
5
|
declare class OdbReportDataSourceError extends Error {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HsqldbDecodeOptions } from "../../rowformat-Cl2exlEh.js";
|
|
2
|
-
import { t as SqlResultSet } from "../../evaluate-
|
|
2
|
+
import { t as SqlResultSet } from "../../evaluate-C7fmk69X.js";
|
|
3
3
|
import { OdbQueryInfo, OdbReport, Package } from "odf.js";
|
|
4
4
|
//#region src/odb/report/source.d.ts
|
|
5
5
|
declare class OdbReportDataSourceError extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as HsqldbTable } from "../script-
|
|
1
|
+
import { r as HsqldbTable } from "../script-pkZ2Kor4.cjs";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
//#region src/odb/spreadsheet.d.ts
|
|
4
4
|
declare function odbTablesToSpreadsheetDocument(tables: readonly HsqldbTable[]): ContentDocument;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as HsqldbTable } from "../script-
|
|
1
|
+
import { r as HsqldbTable } from "../script-pkZ2Kor4.js";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
//#region src/odb/spreadsheet.d.ts
|
|
4
4
|
declare function odbTablesToSpreadsheetDocument(tables: readonly HsqldbTable[]): ContentDocument;
|
|
@@ -17,6 +17,7 @@ function truthOfComparison(ordering, operator) {
|
|
|
17
17
|
case "<=": return ordering <= 0 ? "true" : "false";
|
|
18
18
|
case ">=": return ordering >= 0 ? "true" : "false";
|
|
19
19
|
}
|
|
20
|
+
return assertNeverOperator(operator);
|
|
20
21
|
}
|
|
21
22
|
function notTruth(truth) {
|
|
22
23
|
if (truth === "true") return "false";
|
|
@@ -46,6 +47,7 @@ function literalToValue(literal) {
|
|
|
46
47
|
};
|
|
47
48
|
case "null": return require_odb_values.CELL_NULL;
|
|
48
49
|
}
|
|
50
|
+
return assertNeverLiteralKind(literal);
|
|
49
51
|
}
|
|
50
52
|
function likePatternToRegExp(pattern) {
|
|
51
53
|
let source = "^";
|
|
@@ -109,7 +111,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
|
109
111
|
function resolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
110
112
|
const index = tryResolveColumnIndex(columns, candidateIndices, ref, sql);
|
|
111
113
|
if (index !== void 0) return index;
|
|
112
|
-
throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`column "${ref.name}" not found—available: ${candidateIndices.length === 0 ? "(none)" : candidateIndices.map((
|
|
114
|
+
throw new require_odb_sql_errors.HsqldbSqlEvaluationError(`column "${ref.name}" not found—available: ${candidateIndices.length === 0 ? "(none)" : candidateIndices.map((candidate) => columns[candidate]?.columnName ?? "?").join(", ")}`, sql);
|
|
113
115
|
}
|
|
114
116
|
var ColumnResolver = class {
|
|
115
117
|
sql;
|
|
@@ -223,6 +225,7 @@ function evaluatePredicate(predicate, row, resolver, tables, sql) {
|
|
|
223
225
|
case "and": return andTruth(evaluatePredicate(predicate.left, row, resolver, tables, sql), evaluatePredicate(predicate.right, row, resolver, tables, sql));
|
|
224
226
|
case "or": return orTruth(evaluatePredicate(predicate.left, row, resolver, tables, sql), evaluatePredicate(predicate.right, row, resolver, tables, sql));
|
|
225
227
|
}
|
|
228
|
+
return assertNeverPredicateKind(predicate);
|
|
226
229
|
}
|
|
227
230
|
function evaluateInSubquery(value, query, tables, outerResolver, outerRow, sql) {
|
|
228
231
|
if (value.kind === "empty") return "unknown";
|
|
@@ -287,6 +290,7 @@ function groupKeyOf(values) {
|
|
|
287
290
|
case "string":
|
|
288
291
|
case "error": return `text:${value.value}`;
|
|
289
292
|
}
|
|
293
|
+
return assertNeverValueKind(value);
|
|
290
294
|
}).join("\0");
|
|
291
295
|
}
|
|
292
296
|
function planSelectList(statement, resolver) {
|
|
@@ -533,5 +537,21 @@ function evaluateSelectInScope(statement, tables, outer) {
|
|
|
533
537
|
}
|
|
534
538
|
return evaluateUngrouped(statement, plan, matching, resolver);
|
|
535
539
|
}
|
|
540
|
+
function assertNeverOperator(value) {
|
|
541
|
+
throw new Error(`documents.js: unhandled operator ${JSON.stringify(value)}`);
|
|
542
|
+
}
|
|
543
|
+
function assertNeverLiteralKind(value) {
|
|
544
|
+
throw new Error(`documents.js: unhandled literal ${JSON.stringify(value)}`);
|
|
545
|
+
}
|
|
546
|
+
function assertNeverPredicateKind(value) {
|
|
547
|
+
throw new Error(`documents.js: unhandled predicate ${JSON.stringify(value)}`);
|
|
548
|
+
}
|
|
549
|
+
function assertNeverValueKind(value) {
|
|
550
|
+
throw new Error(`documents.js: unhandled value ${JSON.stringify(value)}`);
|
|
551
|
+
}
|
|
536
552
|
//#endregion
|
|
553
|
+
exports.assertNeverLiteralKind = assertNeverLiteralKind;
|
|
554
|
+
exports.assertNeverOperator = assertNeverOperator;
|
|
555
|
+
exports.assertNeverPredicateKind = assertNeverPredicateKind;
|
|
556
|
+
exports.assertNeverValueKind = assertNeverValueKind;
|
|
537
557
|
exports.evaluateSelect = evaluateSelect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as evaluateSelect, t as SqlResultSet } from "../../evaluate-
|
|
2
|
-
export { SqlResultSet, evaluateSelect };
|
|
1
|
+
import { a as assertNeverValueKind, i as assertNeverPredicateKind, n as assertNeverLiteralKind, o as evaluateSelect, r as assertNeverOperator, t as SqlResultSet } from "../../evaluate-BbOsgdmN.cjs";
|
|
2
|
+
export { SqlResultSet, assertNeverLiteralKind, assertNeverOperator, assertNeverPredicateKind, assertNeverValueKind, evaluateSelect };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as evaluateSelect, t as SqlResultSet } from "../../evaluate-
|
|
2
|
-
export { SqlResultSet, evaluateSelect };
|
|
1
|
+
import { a as assertNeverValueKind, i as assertNeverPredicateKind, n as assertNeverLiteralKind, o as evaluateSelect, r as assertNeverOperator, t as SqlResultSet } from "../../evaluate-C7fmk69X.js";
|
|
2
|
+
export { SqlResultSet, assertNeverLiteralKind, assertNeverOperator, assertNeverPredicateKind, assertNeverValueKind, evaluateSelect };
|
package/dist/odb/sql/evaluate.js
CHANGED
|
@@ -16,6 +16,7 @@ function truthOfComparison(ordering, operator) {
|
|
|
16
16
|
case "<=": return ordering <= 0 ? "true" : "false";
|
|
17
17
|
case ">=": return ordering >= 0 ? "true" : "false";
|
|
18
18
|
}
|
|
19
|
+
return assertNeverOperator(operator);
|
|
19
20
|
}
|
|
20
21
|
function notTruth(truth) {
|
|
21
22
|
if (truth === "true") return "false";
|
|
@@ -45,6 +46,7 @@ function literalToValue(literal) {
|
|
|
45
46
|
};
|
|
46
47
|
case "null": return CELL_NULL;
|
|
47
48
|
}
|
|
49
|
+
return assertNeverLiteralKind(literal);
|
|
48
50
|
}
|
|
49
51
|
function likePatternToRegExp(pattern) {
|
|
50
52
|
let source = "^";
|
|
@@ -108,7 +110,7 @@ function tryResolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
|
108
110
|
function resolveColumnIndex(columns, candidateIndices, ref, sql) {
|
|
109
111
|
const index = tryResolveColumnIndex(columns, candidateIndices, ref, sql);
|
|
110
112
|
if (index !== void 0) return index;
|
|
111
|
-
throw new HsqldbSqlEvaluationError(`column "${ref.name}" not found—available: ${candidateIndices.length === 0 ? "(none)" : candidateIndices.map((
|
|
113
|
+
throw new HsqldbSqlEvaluationError(`column "${ref.name}" not found—available: ${candidateIndices.length === 0 ? "(none)" : candidateIndices.map((candidate) => columns[candidate]?.columnName ?? "?").join(", ")}`, sql);
|
|
112
114
|
}
|
|
113
115
|
var ColumnResolver = class {
|
|
114
116
|
sql;
|
|
@@ -222,6 +224,7 @@ function evaluatePredicate(predicate, row, resolver, tables, sql) {
|
|
|
222
224
|
case "and": return andTruth(evaluatePredicate(predicate.left, row, resolver, tables, sql), evaluatePredicate(predicate.right, row, resolver, tables, sql));
|
|
223
225
|
case "or": return orTruth(evaluatePredicate(predicate.left, row, resolver, tables, sql), evaluatePredicate(predicate.right, row, resolver, tables, sql));
|
|
224
226
|
}
|
|
227
|
+
return assertNeverPredicateKind(predicate);
|
|
225
228
|
}
|
|
226
229
|
function evaluateInSubquery(value, query, tables, outerResolver, outerRow, sql) {
|
|
227
230
|
if (value.kind === "empty") return "unknown";
|
|
@@ -286,6 +289,7 @@ function groupKeyOf(values) {
|
|
|
286
289
|
case "string":
|
|
287
290
|
case "error": return `text:${value.value}`;
|
|
288
291
|
}
|
|
292
|
+
return assertNeverValueKind(value);
|
|
289
293
|
}).join("\0");
|
|
290
294
|
}
|
|
291
295
|
function planSelectList(statement, resolver) {
|
|
@@ -532,5 +536,17 @@ function evaluateSelectInScope(statement, tables, outer) {
|
|
|
532
536
|
}
|
|
533
537
|
return evaluateUngrouped(statement, plan, matching, resolver);
|
|
534
538
|
}
|
|
539
|
+
function assertNeverOperator(value) {
|
|
540
|
+
throw new Error(`documents.js: unhandled operator ${JSON.stringify(value)}`);
|
|
541
|
+
}
|
|
542
|
+
function assertNeverLiteralKind(value) {
|
|
543
|
+
throw new Error(`documents.js: unhandled literal ${JSON.stringify(value)}`);
|
|
544
|
+
}
|
|
545
|
+
function assertNeverPredicateKind(value) {
|
|
546
|
+
throw new Error(`documents.js: unhandled predicate ${JSON.stringify(value)}`);
|
|
547
|
+
}
|
|
548
|
+
function assertNeverValueKind(value) {
|
|
549
|
+
throw new Error(`documents.js: unhandled value ${JSON.stringify(value)}`);
|
|
550
|
+
}
|
|
535
551
|
//#endregion
|
|
536
|
-
export { evaluateSelect };
|
|
552
|
+
export { assertNeverLiteralKind, assertNeverOperator, assertNeverPredicateKind, assertNeverValueKind, evaluateSelect };
|
package/dist/odb/sql/parser.cjs
CHANGED
|
@@ -53,6 +53,7 @@ function describeToken(token) {
|
|
|
53
53
|
case "punctuation": return `"${token.punctuation}"`;
|
|
54
54
|
case "end": return "end of statement";
|
|
55
55
|
}
|
|
56
|
+
return assertNeverTokenKind(token);
|
|
56
57
|
}
|
|
57
58
|
function rejectOutOfScopeConstructs(tokens, sql) {
|
|
58
59
|
tokens.forEach((token, index) => {
|
|
@@ -108,7 +109,7 @@ var SqlParser = class {
|
|
|
108
109
|
}
|
|
109
110
|
takeName(what) {
|
|
110
111
|
const token = this.peek();
|
|
111
|
-
if (token.kind !== "identifier") this.fail(what);
|
|
112
|
+
if (token.kind !== "identifier") return this.fail(what);
|
|
112
113
|
this.advance();
|
|
113
114
|
return {
|
|
114
115
|
name: token.name,
|
|
@@ -223,7 +224,7 @@ var SqlParser = class {
|
|
|
223
224
|
this.advance();
|
|
224
225
|
return { kind: "null" };
|
|
225
226
|
}
|
|
226
|
-
this.fail("a literal value");
|
|
227
|
+
return this.fail("a literal value");
|
|
227
228
|
}
|
|
228
229
|
parseOperand() {
|
|
229
230
|
const token = this.peek();
|
|
@@ -271,7 +272,7 @@ var SqlParser = class {
|
|
|
271
272
|
const token = this.peek();
|
|
272
273
|
if (token.kind !== "string") {
|
|
273
274
|
if (token.kind === "identifier") throw new require_odb_sql_errors.HsqldbSqlUnsupportedError("a non-literal LIKE pattern", this.sql);
|
|
274
|
-
this.fail("a string literal LIKE pattern");
|
|
275
|
+
return this.fail("a string literal LIKE pattern");
|
|
275
276
|
}
|
|
276
277
|
this.advance();
|
|
277
278
|
return {
|
|
@@ -306,7 +307,7 @@ var SqlParser = class {
|
|
|
306
307
|
this.advance();
|
|
307
308
|
return this.parseBetween(operand, true);
|
|
308
309
|
}
|
|
309
|
-
this.fail("keyword LIKE, IN or BETWEEN after NOT");
|
|
310
|
+
return this.fail("keyword LIKE, IN or BETWEEN after NOT");
|
|
310
311
|
}
|
|
311
312
|
parsePostfix(operand) {
|
|
312
313
|
const token = this.peek();
|
|
@@ -346,7 +347,7 @@ var SqlParser = class {
|
|
|
346
347
|
}
|
|
347
348
|
if (token.keyword === "NOT") return this.parseNegatedPostfix(operand);
|
|
348
349
|
}
|
|
349
|
-
this.fail("a comparison operator, or keyword IS, LIKE, IN or BETWEEN");
|
|
350
|
+
return this.fail("a comparison operator, or keyword IS, LIKE, IN or BETWEEN");
|
|
350
351
|
}
|
|
351
352
|
parsePrimary() {
|
|
352
353
|
if (this.atPunctuation("(")) {
|
|
@@ -550,7 +551,7 @@ var SqlParser = class {
|
|
|
550
551
|
if (natural) this.advance();
|
|
551
552
|
const joinKind = this.parseJoinKind();
|
|
552
553
|
if (joinKind === void 0) {
|
|
553
|
-
if (natural) this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL");
|
|
554
|
+
if (natural) return this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL");
|
|
554
555
|
break;
|
|
555
556
|
}
|
|
556
557
|
if (natural && joinKind === "cross") this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL (NATURAL CROSS JOIN is not valid SQL)");
|
|
@@ -594,12 +595,16 @@ var SqlParser = class {
|
|
|
594
595
|
parseStatement() {
|
|
595
596
|
const statement = this.parseSelectBody();
|
|
596
597
|
if (this.atPunctuation(";")) this.advance();
|
|
597
|
-
if (this.peek().kind !== "end") this.fail("end of statement");
|
|
598
|
+
if (this.peek().kind !== "end") return this.fail("end of statement");
|
|
598
599
|
return statement;
|
|
599
600
|
}
|
|
600
601
|
};
|
|
601
602
|
function parseSelect(sql) {
|
|
602
603
|
return new SqlParser(sql).parseStatement();
|
|
603
604
|
}
|
|
605
|
+
function assertNeverTokenKind(value) {
|
|
606
|
+
throw new Error(`documents.js: unhandled token ${JSON.stringify(value)}`);
|
|
607
|
+
}
|
|
604
608
|
//#endregion
|
|
609
|
+
exports.assertNeverTokenKind = assertNeverTokenKind;
|
|
605
610
|
exports.parseSelect = parseSelect;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { SqlAggregateArgument, SqlAggregateFunction, SqlColumnRef, SqlFromClause, SqlFromSource, SqlJoinClause, SqlJoinCondition, SqlJoinKind, SqlLiteral, SqlNameRef, SqlOperand, SqlOrderByTerm, SqlPredicate, SqlSelectItem, SqlSelectStatement, SqlSortDirection, parseSelect };
|
|
1
|
+
import { _ as assertNeverTokenKind, a as SqlFromSource, c as SqlJoinKind, d as SqlOperand, f as SqlOrderByTerm, g as SqlSortDirection, h as SqlSelectStatement, i as SqlFromClause, l as SqlLiteral, m as SqlSelectItem, n as SqlAggregateFunction, o as SqlJoinClause, p as SqlPredicate, r as SqlColumnRef, s as SqlJoinCondition, t as SqlAggregateArgument, u as SqlNameRef, v as parseSelect } from "../../parser-BTA1wXPd.cjs";
|
|
2
|
+
export { SqlAggregateArgument, SqlAggregateFunction, SqlColumnRef, SqlFromClause, SqlFromSource, SqlJoinClause, SqlJoinCondition, SqlJoinKind, SqlLiteral, SqlNameRef, SqlOperand, SqlOrderByTerm, SqlPredicate, SqlSelectItem, SqlSelectStatement, SqlSortDirection, assertNeverTokenKind, parseSelect };
|
package/dist/odb/sql/parser.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
export { SqlAggregateArgument, SqlAggregateFunction, SqlColumnRef, SqlFromClause, SqlFromSource, SqlJoinClause, SqlJoinCondition, SqlJoinKind, SqlLiteral, SqlNameRef, SqlOperand, SqlOrderByTerm, SqlPredicate, SqlSelectItem, SqlSelectStatement, SqlSortDirection, parseSelect };
|
|
1
|
+
import { _ as assertNeverTokenKind, a as SqlFromSource, c as SqlJoinKind, d as SqlOperand, f as SqlOrderByTerm, g as SqlSortDirection, h as SqlSelectStatement, i as SqlFromClause, l as SqlLiteral, m as SqlSelectItem, n as SqlAggregateFunction, o as SqlJoinClause, p as SqlPredicate, r as SqlColumnRef, s as SqlJoinCondition, t as SqlAggregateArgument, u as SqlNameRef, v as parseSelect } from "../../parser-CoIi0l9I.js";
|
|
2
|
+
export { SqlAggregateArgument, SqlAggregateFunction, SqlColumnRef, SqlFromClause, SqlFromSource, SqlJoinClause, SqlJoinCondition, SqlJoinKind, SqlLiteral, SqlNameRef, SqlOperand, SqlOrderByTerm, SqlPredicate, SqlSelectItem, SqlSelectStatement, SqlSortDirection, assertNeverTokenKind, parseSelect };
|
package/dist/odb/sql/parser.js
CHANGED
|
@@ -52,6 +52,7 @@ function describeToken(token) {
|
|
|
52
52
|
case "punctuation": return `"${token.punctuation}"`;
|
|
53
53
|
case "end": return "end of statement";
|
|
54
54
|
}
|
|
55
|
+
return assertNeverTokenKind(token);
|
|
55
56
|
}
|
|
56
57
|
function rejectOutOfScopeConstructs(tokens, sql) {
|
|
57
58
|
tokens.forEach((token, index) => {
|
|
@@ -107,7 +108,7 @@ var SqlParser = class {
|
|
|
107
108
|
}
|
|
108
109
|
takeName(what) {
|
|
109
110
|
const token = this.peek();
|
|
110
|
-
if (token.kind !== "identifier") this.fail(what);
|
|
111
|
+
if (token.kind !== "identifier") return this.fail(what);
|
|
111
112
|
this.advance();
|
|
112
113
|
return {
|
|
113
114
|
name: token.name,
|
|
@@ -222,7 +223,7 @@ var SqlParser = class {
|
|
|
222
223
|
this.advance();
|
|
223
224
|
return { kind: "null" };
|
|
224
225
|
}
|
|
225
|
-
this.fail("a literal value");
|
|
226
|
+
return this.fail("a literal value");
|
|
226
227
|
}
|
|
227
228
|
parseOperand() {
|
|
228
229
|
const token = this.peek();
|
|
@@ -270,7 +271,7 @@ var SqlParser = class {
|
|
|
270
271
|
const token = this.peek();
|
|
271
272
|
if (token.kind !== "string") {
|
|
272
273
|
if (token.kind === "identifier") throw new HsqldbSqlUnsupportedError("a non-literal LIKE pattern", this.sql);
|
|
273
|
-
this.fail("a string literal LIKE pattern");
|
|
274
|
+
return this.fail("a string literal LIKE pattern");
|
|
274
275
|
}
|
|
275
276
|
this.advance();
|
|
276
277
|
return {
|
|
@@ -305,7 +306,7 @@ var SqlParser = class {
|
|
|
305
306
|
this.advance();
|
|
306
307
|
return this.parseBetween(operand, true);
|
|
307
308
|
}
|
|
308
|
-
this.fail("keyword LIKE, IN or BETWEEN after NOT");
|
|
309
|
+
return this.fail("keyword LIKE, IN or BETWEEN after NOT");
|
|
309
310
|
}
|
|
310
311
|
parsePostfix(operand) {
|
|
311
312
|
const token = this.peek();
|
|
@@ -345,7 +346,7 @@ var SqlParser = class {
|
|
|
345
346
|
}
|
|
346
347
|
if (token.keyword === "NOT") return this.parseNegatedPostfix(operand);
|
|
347
348
|
}
|
|
348
|
-
this.fail("a comparison operator, or keyword IS, LIKE, IN or BETWEEN");
|
|
349
|
+
return this.fail("a comparison operator, or keyword IS, LIKE, IN or BETWEEN");
|
|
349
350
|
}
|
|
350
351
|
parsePrimary() {
|
|
351
352
|
if (this.atPunctuation("(")) {
|
|
@@ -549,7 +550,7 @@ var SqlParser = class {
|
|
|
549
550
|
if (natural) this.advance();
|
|
550
551
|
const joinKind = this.parseJoinKind();
|
|
551
552
|
if (joinKind === void 0) {
|
|
552
|
-
if (natural) this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL");
|
|
553
|
+
if (natural) return this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL");
|
|
553
554
|
break;
|
|
554
555
|
}
|
|
555
556
|
if (natural && joinKind === "cross") this.fail("keyword JOIN, INNER, LEFT, RIGHT or FULL after NATURAL (NATURAL CROSS JOIN is not valid SQL)");
|
|
@@ -593,12 +594,15 @@ var SqlParser = class {
|
|
|
593
594
|
parseStatement() {
|
|
594
595
|
const statement = this.parseSelectBody();
|
|
595
596
|
if (this.atPunctuation(";")) this.advance();
|
|
596
|
-
if (this.peek().kind !== "end") this.fail("end of statement");
|
|
597
|
+
if (this.peek().kind !== "end") return this.fail("end of statement");
|
|
597
598
|
return statement;
|
|
598
599
|
}
|
|
599
600
|
};
|
|
600
601
|
function parseSelect(sql) {
|
|
601
602
|
return new SqlParser(sql).parseStatement();
|
|
602
603
|
}
|
|
604
|
+
function assertNeverTokenKind(value) {
|
|
605
|
+
throw new Error(`documents.js: unhandled token ${JSON.stringify(value)}`);
|
|
606
|
+
}
|
|
603
607
|
//#endregion
|
|
604
|
-
export { parseSelect };
|
|
608
|
+
export { assertNeverTokenKind, parseSelect };
|
package/dist/odb/values.cjs
CHANGED
|
@@ -23,6 +23,7 @@ function cellComparisonKey(value) {
|
|
|
23
23
|
};
|
|
24
24
|
case "empty": return;
|
|
25
25
|
}
|
|
26
|
+
return assertNeverValueKind(value);
|
|
26
27
|
}
|
|
27
28
|
function compareCellKeys(left, right, fail) {
|
|
28
29
|
if (left.valueClass === "numeric" && right.valueClass === "numeric") return left.numeric < right.numeric ? -1 : left.numeric > right.numeric ? 1 : 0;
|
|
@@ -66,9 +67,13 @@ function aggregateCellValues(aggregate, values, fail) {
|
|
|
66
67
|
}
|
|
67
68
|
return present.reduce((best, value) => (aggregate === "MIN" ? compareCellValues(value, best, fail) < 0 : compareCellValues(value, best, fail) > 0) ? value : best, first);
|
|
68
69
|
}
|
|
70
|
+
function assertNeverValueKind(value) {
|
|
71
|
+
throw new Error(`documents.js: unhandled value ${JSON.stringify(value)}`);
|
|
72
|
+
}
|
|
69
73
|
//#endregion
|
|
70
74
|
exports.CELL_NULL = CELL_NULL;
|
|
71
75
|
exports.aggregateCellValues = aggregateCellValues;
|
|
76
|
+
exports.assertNeverValueKind = assertNeverValueKind;
|
|
72
77
|
exports.cellComparisonKey = cellComparisonKey;
|
|
73
78
|
exports.cellValuesEqual = cellValuesEqual;
|
|
74
79
|
exports.compareCellKeys = compareCellKeys;
|
package/dist/odb/values.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CellValueFailure, c as
|
|
2
|
-
export { CELL_NULL, CellAggregateFunction, CellComparisonKey, CellValueClass, CellValueFailure, aggregateCellValues, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
|
1
|
+
import { a as CellValueFailure, c as cellComparisonKey, d as compareCellValues, i as CellValueClass, l as cellValuesEqual, n as CellAggregateFunction, o as aggregateCellValues, r as CellComparisonKey, s as assertNeverValueKind, t as CELL_NULL, u as compareCellKeys } from "../values-DcupkLKg.cjs";
|
|
2
|
+
export { CELL_NULL, CellAggregateFunction, CellComparisonKey, CellValueClass, CellValueFailure, aggregateCellValues, assertNeverValueKind, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
package/dist/odb/values.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CellValueFailure, c as
|
|
2
|
-
export { CELL_NULL, CellAggregateFunction, CellComparisonKey, CellValueClass, CellValueFailure, aggregateCellValues, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
|
1
|
+
import { a as CellValueFailure, c as cellComparisonKey, d as compareCellValues, i as CellValueClass, l as cellValuesEqual, n as CellAggregateFunction, o as aggregateCellValues, r as CellComparisonKey, s as assertNeverValueKind, t as CELL_NULL, u as compareCellKeys } from "../values-DcupkLKg.js";
|
|
2
|
+
export { CELL_NULL, CellAggregateFunction, CellComparisonKey, CellValueClass, CellValueFailure, aggregateCellValues, assertNeverValueKind, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
package/dist/odb/values.js
CHANGED
|
@@ -22,6 +22,7 @@ function cellComparisonKey(value) {
|
|
|
22
22
|
};
|
|
23
23
|
case "empty": return;
|
|
24
24
|
}
|
|
25
|
+
return assertNeverValueKind(value);
|
|
25
26
|
}
|
|
26
27
|
function compareCellKeys(left, right, fail) {
|
|
27
28
|
if (left.valueClass === "numeric" && right.valueClass === "numeric") return left.numeric < right.numeric ? -1 : left.numeric > right.numeric ? 1 : 0;
|
|
@@ -65,5 +66,8 @@ function aggregateCellValues(aggregate, values, fail) {
|
|
|
65
66
|
}
|
|
66
67
|
return present.reduce((best, value) => (aggregate === "MIN" ? compareCellValues(value, best, fail) < 0 : compareCellValues(value, best, fail) > 0) ? value : best, first);
|
|
67
68
|
}
|
|
69
|
+
function assertNeverValueKind(value) {
|
|
70
|
+
throw new Error(`documents.js: unhandled value ${JSON.stringify(value)}`);
|
|
71
|
+
}
|
|
68
72
|
//#endregion
|
|
69
|
-
export { CELL_NULL, aggregateCellValues, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
|
73
|
+
export { CELL_NULL, aggregateCellValues, assertNeverValueKind, cellComparisonKey, cellValuesEqual, compareCellKeys, compareCellValues };
|
|
@@ -136,5 +136,6 @@ interface SqlSelectStatement {
|
|
|
136
136
|
readonly orderBy: readonly SqlOrderByTerm[];
|
|
137
137
|
}
|
|
138
138
|
declare function parseSelect(sql: string): SqlSelectStatement;
|
|
139
|
+
declare function assertNeverTokenKind(value: never): never;
|
|
139
140
|
//#endregion
|
|
140
|
-
export {
|
|
141
|
+
export { assertNeverTokenKind as _, SqlFromSource as a, SqlJoinKind as c, SqlOperand as d, SqlOrderByTerm as f, SqlSortDirection as g, SqlSelectStatement as h, SqlFromClause as i, SqlLiteral as l, SqlSelectItem as m, SqlAggregateFunction as n, SqlJoinClause as o, SqlPredicate as p, SqlColumnRef as r, SqlJoinCondition as s, SqlAggregateArgument as t, SqlNameRef as u, parseSelect as v };
|
|
@@ -136,5 +136,6 @@ interface SqlSelectStatement {
|
|
|
136
136
|
readonly orderBy: readonly SqlOrderByTerm[];
|
|
137
137
|
}
|
|
138
138
|
declare function parseSelect(sql: string): SqlSelectStatement;
|
|
139
|
+
declare function assertNeverTokenKind(value: never): never;
|
|
139
140
|
//#endregion
|
|
140
|
-
export {
|
|
141
|
+
export { assertNeverTokenKind as _, SqlFromSource as a, SqlJoinKind as c, SqlOperand as d, SqlOrderByTerm as f, SqlSortDirection as g, SqlSelectStatement as h, SqlFromClause as i, SqlLiteral as l, SqlSelectItem as m, SqlAggregateFunction as n, SqlJoinClause as o, SqlPredicate as p, SqlColumnRef as r, SqlJoinCondition as s, SqlAggregateArgument as t, SqlNameRef as u, parseSelect as v };
|
package/dist/ppt/write.cjs
CHANGED
|
@@ -11,6 +11,7 @@ function serialiseEmbeddedObject(document) {
|
|
|
11
11
|
case "formula":
|
|
12
12
|
case "drawing": return;
|
|
13
13
|
}
|
|
14
|
+
return assertNeverDocumentKind(document);
|
|
14
15
|
}
|
|
15
16
|
function writePptContent(content) {
|
|
16
17
|
if (content.kind !== "presentation") throw new Error(`writePptContent requires a presentation ContentDocument, got '${content.kind}'`);
|
|
@@ -19,5 +20,9 @@ function writePptContent(content) {
|
|
|
19
20
|
slides: content.slides
|
|
20
21
|
}, { serialiseEmbeddedObject });
|
|
21
22
|
}
|
|
23
|
+
function assertNeverDocumentKind(value) {
|
|
24
|
+
throw new Error(`documents.js: unhandled document ${JSON.stringify(value)}`);
|
|
25
|
+
}
|
|
22
26
|
//#endregion
|
|
27
|
+
exports.assertNeverDocumentKind = assertNeverDocumentKind;
|
|
23
28
|
exports.writePptContent = writePptContent;
|
package/dist/ppt/write.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/ppt/write.d.ts
|
|
3
3
|
declare function writePptContent(content: ContentDocument): Uint8Array<ArrayBuffer>;
|
|
4
|
+
declare function assertNeverDocumentKind(value: never): never;
|
|
4
5
|
//#endregion
|
|
5
|
-
export { writePptContent };
|
|
6
|
+
export { assertNeverDocumentKind, writePptContent };
|
package/dist/ppt/write.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContentDocument } from "document-schema.js";
|
|
2
2
|
//#region src/ppt/write.d.ts
|
|
3
3
|
declare function writePptContent(content: ContentDocument): Uint8Array<ArrayBuffer>;
|
|
4
|
+
declare function assertNeverDocumentKind(value: never): never;
|
|
4
5
|
//#endregion
|
|
5
|
-
export { writePptContent };
|
|
6
|
+
export { assertNeverDocumentKind, writePptContent };
|