@memberjunction/generic-database-provider 6.2.0-edge.1 → 6.2.0-edge.3
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/GenericDatabaseProvider.d.ts +78 -2
- package/dist/GenericDatabaseProvider.d.ts.map +1 -1
- package/dist/GenericDatabaseProvider.js +214 -25
- package/dist/GenericDatabaseProvider.js.map +1 -1
- package/dist/countOnlyBatch.d.ts +79 -0
- package/dist/countOnlyBatch.d.ts.map +1 -0
- package/dist/countOnlyBatch.js +153 -0
- package/dist/countOnlyBatch.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/queryCompositionEngine.d.ts +45 -8
- package/dist/queryCompositionEngine.d.ts.map +1 -1
- package/dist/queryCompositionEngine.js +161 -36
- package/dist/queryCompositionEngine.js.map +1 -1
- package/dist/queryPagingEngine.d.ts +113 -99
- package/dist/queryPagingEngine.d.ts.map +1 -1
- package/dist/queryPagingEngine.js +222 -261
- package/dist/queryPagingEngine.js.map +1 -1
- package/dist/renderPipeline.d.ts +24 -1
- package/dist/renderPipeline.d.ts.map +1 -1
- package/dist/renderPipeline.js +33 -4
- package/dist/renderPipeline.js.map +1 -1
- package/package.json +14 -14
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coalesces the COUNT queries of an all-`count_only` RunViews batch into ONE
|
|
3
|
+
* SQL statement.
|
|
4
|
+
*
|
|
5
|
+
* Each view in the batch still runs the full `InternalRunView` path — entity
|
|
6
|
+
* resolution, CanRead, saved-view WhereClause, ExtraFilter screening, RLS +
|
|
7
|
+
* API-key row filters, materialized-view swap — so no security gate is
|
|
8
|
+
* re-implemented here. The only thing that changes is the last step: instead
|
|
9
|
+
* of every view executing its own `SELECT COUNT(*) ...` on the pool, each one
|
|
10
|
+
* hands its fully-built count SQL to {@link CountOnlyBatchCoalescer.Execute}
|
|
11
|
+
* and waits. Once every view in the batch has either registered its SQL or
|
|
12
|
+
* finished without one (early failure, external entity, …), the coalescer runs
|
|
13
|
+
*
|
|
14
|
+
* ```sql
|
|
15
|
+
* SELECT 0 AS "BatchIndex", "TotalRowCount" FROM (<count SQL 0>) b0
|
|
16
|
+
* UNION ALL
|
|
17
|
+
* SELECT 1, "TotalRowCount" FROM (<count SQL 1>) b1
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* and resolves each waiting view with its own row. If the combined statement
|
|
21
|
+
* fails (one branch with a bad filter must not blank every count), each count
|
|
22
|
+
* is re-run individually so failures stay per-view. A connection failure is not
|
|
23
|
+
* re-run: every waiting view is rejected with it.
|
|
24
|
+
*
|
|
25
|
+
* Framework-free and database-free so it can be unit tested with a fake
|
|
26
|
+
* executor.
|
|
27
|
+
*/
|
|
28
|
+
/** One row of a COUNT query, the shape `InternalRunView` already consumes. */
|
|
29
|
+
export interface CountOnlyRow {
|
|
30
|
+
TotalRowCount: number;
|
|
31
|
+
}
|
|
32
|
+
/** Executes a SQL string and returns its rows (bound to the provider's ExecuteSQL). */
|
|
33
|
+
export type CountSQLExecutor = (sql: string) => Promise<Record<string, unknown>[]>;
|
|
34
|
+
export declare class CountOnlyBatchCoalescer {
|
|
35
|
+
private readonly size;
|
|
36
|
+
private readonly execute;
|
|
37
|
+
private readonly quoteIdentifier;
|
|
38
|
+
private readonly isConnectionError;
|
|
39
|
+
private readonly pending;
|
|
40
|
+
private readonly arrived;
|
|
41
|
+
private flushed;
|
|
42
|
+
/**
|
|
43
|
+
* @param size number of views in the batch
|
|
44
|
+
* @param execute runs one SQL statement
|
|
45
|
+
* @param quoteIdentifier dialect-correct identifier quoting (PG folds unquoted case)
|
|
46
|
+
* @param isConnectionError true for a failure of the connection rather than of the query
|
|
47
|
+
*/
|
|
48
|
+
constructor(size: number, execute: CountSQLExecutor, quoteIdentifier: (name: string) => string, isConnectionError?: (error: unknown) => boolean);
|
|
49
|
+
/**
|
|
50
|
+
* Called by view `index` in place of executing its count SQL. Resolves with
|
|
51
|
+
* that view's count rows once the batch flushes.
|
|
52
|
+
*/
|
|
53
|
+
Execute(index: number, sql: string): Promise<CountOnlyRow[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Called when view `index` has finished (success or failure). A view that
|
|
56
|
+
* never registered a count (failed before the count step, external entity)
|
|
57
|
+
* must still be counted as arrived, or the batch would wait forever.
|
|
58
|
+
*/
|
|
59
|
+
MarkSettled(index: number): void;
|
|
60
|
+
/** Builds the combined statement. Exposed for tests. */
|
|
61
|
+
BuildCombinedSQL(items: ReadonlyArray<{
|
|
62
|
+
index: number;
|
|
63
|
+
sql: string;
|
|
64
|
+
}>): string;
|
|
65
|
+
private markArrived;
|
|
66
|
+
private flush;
|
|
67
|
+
private resolveFromCombinedRows;
|
|
68
|
+
private settleIndividually;
|
|
69
|
+
private executeSingle;
|
|
70
|
+
private assertIndex;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* True when a RunViews batch qualifies for coalescing: at least two items, and
|
|
74
|
+
* every one of them is `count_only`. Mixed batches keep the per-view path.
|
|
75
|
+
*/
|
|
76
|
+
export declare function IsCoalescibleCountBatch(params: ReadonlyArray<{
|
|
77
|
+
ResultType?: string;
|
|
78
|
+
} | null | undefined>): boolean;
|
|
79
|
+
//# sourceMappingURL=countOnlyBatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countOnlyBatch.d.ts","sourceRoot":"","sources":["../src/countOnlyBatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,8EAA8E;AAC9E,MAAM,WAAW,YAAY;IACzB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,uFAAuF;AACvF,MAAM,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;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ch still runs the full `InternalRunView` path — entity
|
|
6
|
+
* resolution, CanRead, saved-view WhereClause, ExtraFilter screening, RLS +
|
|
7
|
+
* API-key row filters, materialized-view swap — so no security gate is
|
|
8
|
+
* re-implemented here. The only thing that changes is the last step: instead
|
|
9
|
+
* of every view executing its own `SELECT COUNT(*) ...` on the pool, each one
|
|
10
|
+
* hands its fully-built count SQL to {@link CountOnlyBatchCoalescer.Execute}
|
|
11
|
+
* and waits. Once every view in the batch has either registered its SQL or
|
|
12
|
+
* finished without one (early failure, external entity, …), the coalescer runs
|
|
13
|
+
*
|
|
14
|
+
* ```sql
|
|
15
|
+
* SELECT 0 AS "BatchIndex", "TotalRowCount" FROM (<count SQL 0>) b0
|
|
16
|
+
* UNION ALL
|
|
17
|
+
* SELECT 1, "TotalRowCount" FROM (<count SQL 1>) b1
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* and resolves each waiting view with its own row. If the combined statement
|
|
21
|
+
* fails (one branch with a bad filter must not blank every count), each count
|
|
22
|
+
* is re-run individually so failures stay per-view. A connection failure is not
|
|
23
|
+
* re-run: every waiting view is rejected with it.
|
|
24
|
+
*
|
|
25
|
+
* Framework-free and database-free so it can be unit tested with a fake
|
|
26
|
+
* executor.
|
|
27
|
+
*/
|
|
28
|
+
export class CountOnlyBatchCoalescer {
|
|
29
|
+
/**
|
|
30
|
+
* @param size number of views in the batch
|
|
31
|
+
* @param execute runs one SQL statement
|
|
32
|
+
* @param quoteIdentifier dialect-correct identifier quoting (PG folds unquoted case)
|
|
33
|
+
* @param isConnectionError true for a failure of the connection rather than of the query
|
|
34
|
+
*/
|
|
35
|
+
constructor(size, execute, quoteIdentifier, isConnectionError = () => false) {
|
|
36
|
+
this.size = size;
|
|
37
|
+
this.execute = execute;
|
|
38
|
+
this.quoteIdentifier = quoteIdentifier;
|
|
39
|
+
this.isConnectionError = isConnectionError;
|
|
40
|
+
this.pending = [];
|
|
41
|
+
this.arrived = new Set();
|
|
42
|
+
this.flushed = false;
|
|
43
|
+
if (size < 1)
|
|
44
|
+
throw new Error('CountOnlyBatchCoalescer: size must be >= 1');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Called by view `index` in place of executing its count SQL. Resolves with
|
|
48
|
+
* that view's count rows once the batch flushes.
|
|
49
|
+
*/
|
|
50
|
+
Execute(index, sql) {
|
|
51
|
+
this.assertIndex(index);
|
|
52
|
+
if (this.flushed) {
|
|
53
|
+
// Defensive: a late registration after flush runs on its own.
|
|
54
|
+
return this.executeSingle(sql);
|
|
55
|
+
}
|
|
56
|
+
return new Promise((resolve, reject) => {
|
|
57
|
+
this.pending.push({ index, sql, resolve, reject });
|
|
58
|
+
this.markArrived(index);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Called when view `index` has finished (success or failure). A view that
|
|
63
|
+
* never registered a count (failed before the count step, external entity)
|
|
64
|
+
* must still be counted as arrived, or the batch would wait forever.
|
|
65
|
+
*/
|
|
66
|
+
MarkSettled(index) {
|
|
67
|
+
this.assertIndex(index);
|
|
68
|
+
this.markArrived(index);
|
|
69
|
+
}
|
|
70
|
+
/** Builds the combined statement. Exposed for tests. */
|
|
71
|
+
BuildCombinedSQL(items) {
|
|
72
|
+
const batchIndex = this.quoteIdentifier('BatchIndex');
|
|
73
|
+
const total = this.quoteIdentifier('TotalRowCount');
|
|
74
|
+
return items
|
|
75
|
+
.map((item) => `SELECT ${item.index} AS ${batchIndex}, ${total} FROM (${item.sql}) ${this.quoteIdentifier(`b${item.index}`)}`)
|
|
76
|
+
.join('\nUNION ALL\n');
|
|
77
|
+
}
|
|
78
|
+
markArrived(index) {
|
|
79
|
+
this.arrived.add(index);
|
|
80
|
+
if (!this.flushed && this.arrived.size >= this.size) {
|
|
81
|
+
this.flushed = true;
|
|
82
|
+
void this.flush();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async flush() {
|
|
86
|
+
const items = [...this.pending];
|
|
87
|
+
if (items.length === 0)
|
|
88
|
+
return;
|
|
89
|
+
if (items.length === 1) {
|
|
90
|
+
await this.settleIndividually(items);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
let rows;
|
|
94
|
+
try {
|
|
95
|
+
rows = await this.execute(this.BuildCombinedSQL(items));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
if (this.isConnectionError(error)) {
|
|
99
|
+
// The database is unreachable, not one branch bad: every view gets the error.
|
|
100
|
+
for (const item of items)
|
|
101
|
+
item.reject(error);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
// One bad branch fails the whole UNION ALL — re-run each count on its
|
|
105
|
+
// own so every other view still gets its number and the failing one
|
|
106
|
+
// gets its own error (surfaced by InternalRunView as Success:false).
|
|
107
|
+
await this.settleIndividually(items);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.resolveFromCombinedRows(items, rows);
|
|
111
|
+
}
|
|
112
|
+
resolveFromCombinedRows(items, rows) {
|
|
113
|
+
const byIndex = new Map();
|
|
114
|
+
for (const row of rows ?? []) {
|
|
115
|
+
const index = Number(row['BatchIndex']);
|
|
116
|
+
byIndex.set(index, { TotalRowCount: Number(row['TotalRowCount'] ?? 0) });
|
|
117
|
+
}
|
|
118
|
+
for (const item of items) {
|
|
119
|
+
const row = byIndex.get(item.index);
|
|
120
|
+
if (row)
|
|
121
|
+
item.resolve([row]);
|
|
122
|
+
else
|
|
123
|
+
item.reject(new Error(`Count batch returned no row for view ${item.index}`));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
async settleIndividually(items) {
|
|
127
|
+
await Promise.all(items.map(async (item) => {
|
|
128
|
+
try {
|
|
129
|
+
item.resolve(await this.executeSingle(item.sql));
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
item.reject(error);
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
async executeSingle(sql) {
|
|
137
|
+
const rows = await this.execute(sql);
|
|
138
|
+
return (rows ?? []).map((r) => ({ TotalRowCount: Number(r['TotalRowCount'] ?? 0) }));
|
|
139
|
+
}
|
|
140
|
+
assertIndex(index) {
|
|
141
|
+
if (!Number.isInteger(index) || index < 0 || index >= this.size) {
|
|
142
|
+
throw new Error(`CountOnlyBatchCoalescer: index ${index} out of range 0..${this.size - 1}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* True when a RunViews batch qualifies for coalescing: at least two items, and
|
|
148
|
+
* every one of them is `count_only`. Mixed batches keep the per-view path.
|
|
149
|
+
*/
|
|
150
|
+
export function IsCoalescibleCountBatch(params) {
|
|
151
|
+
return params.length >= 2 && params.every((p) => p?.ResultType === 'count_only');
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=countOnlyBatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countOnlyBatch.js","sourceRoot":"","sources":["../src/countOnlyBatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAiBH,MAAM,OAAO,uBAAuB;IAKhC;;;;;OAKG;IACH,YACqB,IAAY,EACZ,OAAyB,EACzB,eAAyC,EACzC,oBAAiD,GAAG,EAAE,CAAC,KAAK;QAH5D,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAkB;QACzB,oBAAe,GAAf,eAAe,CAA0B;QACzC,sBAAiB,GAAjB,iBAAiB,CAA2C;QAdhE,YAAO,GAAmB,EAAE,CAAC;QAC7B,YAAO,GAAG,IAAI,GAAG,EAAU,CAAC;QACrC,YAAO,GAAG,KAAK,CAAC;QAcpB,IAAI,IAAI,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChF,CAAC;IAED;;;OAGG;IACI,OAAO,CAAC,KAAa,EAAE,GAAW;QACrC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CA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AC,kCAAkC,KAAK,oBAAoB,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;QAChG,CAAC;IACL,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAiE;IACrG,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,YAAY,CAAC,CAAC;AACrF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ export { SystemUserFieldAccessCheck, LoadSystemUserFieldAccessCheck } from './Sy
|
|
|
10
10
|
export { SqlLoggingOptions, SqlLoggingSession } from './types.js';
|
|
11
11
|
export { SqlLoggingSessionImpl } from './SqlLogger.js';
|
|
12
12
|
export { QueryCompositionEngine, CompositionCTEInfo, CompositionResult } from './queryCompositionEngine.js';
|
|
13
|
+
export { CountOnlyBatchCoalescer, IsCoalescibleCountBatch } from './countOnlyBatch.js';
|
|
14
|
+
export type { CountOnlyRow, CountSQLExecutor } from './countOnlyBatch.js';
|
|
13
15
|
export { QueryPagingEngine, PagingWrappedSQL } from './queryPagingEngine.js';
|
|
16
|
+
export type { RowCapOutcome, RowCapMethod, RowCapResult } from './queryPagingEngine.js';
|
|
14
17
|
export { RenderPipeline, RenderContext, RenderResult, RenderTrace, CompositionDiagnostic } from './renderPipeline.js';
|
|
15
18
|
export { SymbolTable } from './symbolTable.js';
|
|
16
19
|
export { AnalyzeTopLevelOrderBy, HasTopLevelOrderBy, ExtractOrderBy, ParseToIR, RenderIR } from '@memberjunction/sql-parser';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGvH,OAAO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AM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC7E,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC7H,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { SystemUserFieldAccessLossReason, FindSystemUserFieldAccessViolations, S
|
|
|
12
12
|
export { SystemUserFieldAccessCheck, LoadSystemUserFieldAccessCheck } from './SystemUserFieldAccessCheck.js';
|
|
13
13
|
export { SqlLoggingSessionImpl } from './SqlLogger.js';
|
|
14
14
|
export { QueryCompositionEngine } from './queryCompositionEngine.js';
|
|
15
|
+
export { CountOnlyBatchCoalescer, IsCoalescibleCountBatch } from './countOnlyBatch.js';
|
|
15
16
|
export { QueryPagingEngine } from './queryPagingEngine.js';
|
|
16
17
|
export { RenderPipeline } from './renderPipeline.js';
|
|
17
18
|
export { SymbolTable } from './symbolTable.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAA0B,MAAM,8BAA8B,CAAC;AACvH,0FAA0F;AAC1F,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AAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EACH,+BAA+B,EAC/B,mCAAmC,EAEnC,mBAAmB,GAEtB,MAAM,4BAA4B,CAAC;AACpC,4FAA4F;AAC5F,+CAA+C;AAC/C,OAAO,EAAE,0BAA0B,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AAE7G,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAyC,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAoB,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAmE,MAAM,qBAAqB,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,uEAAuE;AACvE,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -95,13 +95,23 @@ export declare class QueryCompositionEngine {
|
|
|
95
95
|
/**
|
|
96
96
|
* Checks whether SQL contains any {{query:"..."}} composition tokens.
|
|
97
97
|
* Use this as a fast guard before calling ResolveComposition().
|
|
98
|
-
* Only
|
|
98
|
+
* Only tokens that are SQL count: not those inside a comment, a string literal or a
|
|
99
|
+
* bracket-quoted identifier.
|
|
99
100
|
*/
|
|
100
|
-
HasCompositionTokens(sql: string): boolean;
|
|
101
|
+
HasCompositionTokens(sql: string, platform?: DatabasePlatform): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* `sql` with every comment, string literal and bracket-quoted identifier blanked out to
|
|
104
|
+
* spaces of the same length, so a composition token found in the result is real SQL and sits
|
|
105
|
+
* at the same position in the original.
|
|
106
|
+
*/
|
|
107
|
+
private maskNonSQL;
|
|
108
|
+
/** Replaces the first occurrence of `token` that is real SQL, leaving comments and literals as written. */
|
|
109
|
+
private replaceToken;
|
|
101
110
|
/**
|
|
102
111
|
* Parses all {{query:"..."}} tokens from SQL without resolving them.
|
|
103
112
|
* Useful for dependency extraction during the save pipeline.
|
|
104
|
-
* Only
|
|
113
|
+
* Only tokens that are SQL count: not those inside a comment, a string literal or a
|
|
114
|
+
* bracket-quoted identifier.
|
|
105
115
|
*
|
|
106
116
|
* Uses MJLexer for structured tokenization instead of regex, providing
|
|
107
117
|
* full parsing of category paths, query names, and parameter lists.
|
|
@@ -109,7 +119,7 @@ export declare class QueryCompositionEngine {
|
|
|
109
119
|
* @param sql - The SQL text to parse
|
|
110
120
|
* @returns Array of parsed token metadata
|
|
111
121
|
*/
|
|
112
|
-
ParseCompositionTokens(sql: string): ParsedCompositionToken[];
|
|
122
|
+
ParseCompositionTokens(sql: string, platform?: DatabasePlatform): ParsedCompositionToken[];
|
|
113
123
|
/**
|
|
114
124
|
* Resolves all {{query:"..."}} composition tokens in the given SQL into CTEs.
|
|
115
125
|
*
|
|
@@ -209,6 +219,33 @@ export declare class QueryCompositionEngine {
|
|
|
209
219
|
* `__tests__/skip-failure-regressions.test.ts` and `SKIP-QUERY-RENDERING-BUGS.md`.
|
|
210
220
|
*/
|
|
211
221
|
private assembleCTEs;
|
|
222
|
+
/**
|
|
223
|
+
* Takes a statement's trailing query-hint clause off ({@link SQLDialect.QueryHintKeyword},
|
|
224
|
+
* `OPTION (…)` on SQL Server), returning the hints in it. A CTE body cannot carry query hints;
|
|
225
|
+
* they belong to the statement the dependency is composed into. A dialect without a hint
|
|
226
|
+
* clause leaves the statement as it is.
|
|
227
|
+
*/
|
|
228
|
+
private splitQueryHints;
|
|
229
|
+
/**
|
|
230
|
+
* Adds query hints to a statement: into its own hint clause when it has one, otherwise as a
|
|
231
|
+
* new clause (`OPTION (…)` on SQL Server) after its last token, ahead of any trailing
|
|
232
|
+
* semicolon or comment. A hint already present, compared ignoring case and spacing, is not
|
|
233
|
+
* added twice. Hints only come from a dialect with a hint clause, so one is always named.
|
|
234
|
+
*/
|
|
235
|
+
private appendQueryHints;
|
|
236
|
+
/**
|
|
237
|
+
* Finds a statement's top-level trailing query-hint clause (`OPTION (…)` on SQL Server): where
|
|
238
|
+
* the keyword starts, where the list inside the parentheses starts and ends, and the hints in
|
|
239
|
+
* it split at top-level commas. `null` when the dialect has no hint clause or there is none.
|
|
240
|
+
*/
|
|
241
|
+
private findOptionList;
|
|
242
|
+
/** Hints with repeats removed, comparing case- and spacing-insensitively; first spelling kept. */
|
|
243
|
+
private distinctHints;
|
|
244
|
+
/**
|
|
245
|
+
* A dependency's statement without the semicolons before or after it (`;WITH …`, `… ;`),
|
|
246
|
+
* which a CTE body cannot hold.
|
|
247
|
+
*/
|
|
248
|
+
private withoutStatementSemicolons;
|
|
212
249
|
/**
|
|
213
250
|
* Validates that no CTE body still contains an illegal top-level ORDER BY
|
|
214
251
|
* after stripping. Throws a diagnostic error with the dep name, category
|
|
@@ -242,11 +279,11 @@ export declare class QueryCompositionEngine {
|
|
|
242
279
|
*/
|
|
243
280
|
private renameSQLIdentifier;
|
|
244
281
|
/**
|
|
245
|
-
* Extracts inner CTE definitions from SQL that starts with a WITH clause
|
|
282
|
+
* Extracts inner CTE definitions from SQL that starts with a WITH clause, and whether the
|
|
283
|
+
* clause is `WITH RECURSIVE`.
|
|
246
284
|
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* AST parsing fails (e.g. SQL contains Nunjucks template tokens).
|
|
285
|
+
* Splits by position ({@link SplitLeadingCTEs}) so each definition is kept as written; when
|
|
286
|
+
* that cannot read the clause, falls back to {@link SQLParser.ExtractCTEs}.
|
|
250
287
|
*
|
|
251
288
|
* @param sql SQL starting with a WITH clause
|
|
252
289
|
* @param dialect SQL dialect for AST parsing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryCompositionEngine.d.ts","sourceRoot":"","sources":["../src/queryCompositionEngine.ts"],"names":[],"mappings":"AAGA,OAAO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