@memberjunction/core 5.11.0 → 5.12.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/dist/generic/QueryCache.d.ts +41 -7
- package/dist/generic/QueryCache.d.ts.map +1 -1
- package/dist/generic/QueryCache.js +146 -12
- package/dist/generic/QueryCache.js.map +1 -1
- package/dist/generic/QueryCacheManager.d.ts +105 -0
- package/dist/generic/QueryCacheManager.d.ts.map +1 -0
- package/dist/generic/QueryCacheManager.js +314 -0
- package/dist/generic/QueryCacheManager.js.map +1 -0
- package/dist/generic/interfaces.d.ts +10 -0
- package/dist/generic/interfaces.d.ts.map +1 -1
- package/dist/generic/interfaces.js.map +1 -1
- package/dist/generic/queryCompositionEngine.d.ts +7 -0
- package/dist/generic/queryCompositionEngine.d.ts.map +1 -1
- package/dist/generic/queryCompositionEngine.js +41 -5
- package/dist/generic/queryCompositionEngine.js.map +1 -1
- package/dist/generic/queryInfoInterfaces.d.ts +6 -0
- package/dist/generic/queryInfoInterfaces.d.ts.map +1 -1
- package/dist/generic/queryPagingEngine.d.ts +110 -0
- package/dist/generic/queryPagingEngine.d.ts.map +1 -0
- package/dist/generic/queryPagingEngine.js +335 -0
- package/dist/generic/queryPagingEngine.js.map +1 -0
- package/dist/generic/runQuery.d.ts +8 -0
- package/dist/generic/runQuery.d.ts.map +1 -1
- package/dist/generic/runQuery.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { DatabasePlatform } from './platformSQL.js';
|
|
2
|
+
/**
|
|
3
|
+
* Result of wrapping SQL with paging directives.
|
|
4
|
+
*/
|
|
5
|
+
export interface PagingWrappedSQL {
|
|
6
|
+
/** SQL that returns the paged data rows */
|
|
7
|
+
DataSQL: string;
|
|
8
|
+
/** SQL that returns the total row count (without paging) */
|
|
9
|
+
CountSQL: string;
|
|
10
|
+
/** The computed offset (same as startRow input) */
|
|
11
|
+
Offset: number;
|
|
12
|
+
/** The page size (same as maxRows input) */
|
|
13
|
+
PageSize: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Handles server-side pagination for query SQL by wrapping resolved SQL in CTEs
|
|
17
|
+
* and applying platform-specific OFFSET/FETCH or LIMIT/OFFSET clauses.
|
|
18
|
+
*
|
|
19
|
+
* Works with arbitrary SQL including pre-existing CTEs from the composition engine.
|
|
20
|
+
* The approach:
|
|
21
|
+
* 1. Parse the SQL to separate CTE prefix from the main SELECT
|
|
22
|
+
* 2. Extract and remove any ORDER BY from the main SELECT
|
|
23
|
+
* 3. Strip any TOP N clause from the main SELECT
|
|
24
|
+
* 4. Wrap the main SELECT as a new CTE (`__paged`)
|
|
25
|
+
* 5. Emit a data query with ORDER BY + platform paging
|
|
26
|
+
* 6. Emit a count query over the same CTE
|
|
27
|
+
*/
|
|
28
|
+
export declare class QueryPagingEngine {
|
|
29
|
+
/**
|
|
30
|
+
* Wraps resolved SQL with CTE-based paging for server-side pagination.
|
|
31
|
+
*
|
|
32
|
+
* @param resolvedSQL The fully-resolved SQL (after composition + Nunjucks)
|
|
33
|
+
* @param startRow 0-based row offset
|
|
34
|
+
* @param maxRows Maximum rows to return (page size)
|
|
35
|
+
* @param platform Target database platform
|
|
36
|
+
* @returns DataSQL for paged results and CountSQL for total row count
|
|
37
|
+
*/
|
|
38
|
+
static WrapWithPaging(resolvedSQL: string, startRow: number, maxRows: number, platform: DatabasePlatform): PagingWrappedSQL;
|
|
39
|
+
/**
|
|
40
|
+
* Determines whether the given params indicate paging should be applied.
|
|
41
|
+
* Paging is active when both StartRow is defined (>= 0) and MaxRows > 0.
|
|
42
|
+
*/
|
|
43
|
+
static ShouldPage(startRow: number | undefined, maxRows: number | undefined): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Splits SQL into a CTE prefix (everything in the WITH chain) and the main
|
|
46
|
+
* SELECT statement. Handles nested parentheses to avoid splitting inside CTEs.
|
|
47
|
+
*
|
|
48
|
+
* Returns `ctePrefix` as the full `WITH ... AS (...)` chain (no trailing comma),
|
|
49
|
+
* and `mainSelect` as the final SELECT.
|
|
50
|
+
*/
|
|
51
|
+
static splitCTEAndSelect(sql: string): {
|
|
52
|
+
ctePrefix: string;
|
|
53
|
+
mainSelect: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Extracts the ORDER BY clause from the end of a SQL statement.
|
|
57
|
+
* Only matches ORDER BY that is NOT inside parentheses (i.e., top-level).
|
|
58
|
+
*/
|
|
59
|
+
static extractOrderBy(sql: string): {
|
|
60
|
+
sqlWithoutOrder: string;
|
|
61
|
+
orderByClause: string | null;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Strips a TOP N clause from a SELECT statement.
|
|
65
|
+
* Handles `SELECT TOP N`, `SELECT TOP (N)`, and `SELECT DISTINCT TOP N`.
|
|
66
|
+
*/
|
|
67
|
+
static stripTopClause(sql: string): {
|
|
68
|
+
sql: string;
|
|
69
|
+
topRemoved: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Quotes an identifier for the target platform.
|
|
73
|
+
*/
|
|
74
|
+
private static quoteIdentifier;
|
|
75
|
+
/**
|
|
76
|
+
* Builds the platform-specific paging clause.
|
|
77
|
+
*/
|
|
78
|
+
private static buildPagingClause;
|
|
79
|
+
/**
|
|
80
|
+
* Remaps ORDER BY expressions so they reference the projected column names
|
|
81
|
+
* from the SELECT list rather than table-qualified aliases (e.g. `r.Total`
|
|
82
|
+
* becomes `TotalRevenue` if the SELECT has `r.Total AS TotalRevenue`).
|
|
83
|
+
*
|
|
84
|
+
* This is necessary because the outer query is `SELECT * FROM [__paged]`
|
|
85
|
+
* where the original table aliases no longer exist.
|
|
86
|
+
*/
|
|
87
|
+
static remapOrderByToProjectedNames(orderByClause: string, selectSQL: string): string;
|
|
88
|
+
/**
|
|
89
|
+
* Parses the SELECT list from a SQL statement and builds a map of
|
|
90
|
+
* normalized expression → projected column name.
|
|
91
|
+
*
|
|
92
|
+
* For `SELECT au.Name AS UserName, COALESCE(rc.Count, 0) AS Total`
|
|
93
|
+
* returns Map { "AU.NAME" → "UserName", "COALESCE(RC.COUNT, 0)" → "Total" }
|
|
94
|
+
*
|
|
95
|
+
* Also indexes the stripped (no table prefix) versions:
|
|
96
|
+
* { "COALESCE(COUNT, 0)" → "Total", "NAME" → "UserName" }
|
|
97
|
+
*/
|
|
98
|
+
private static buildSelectAliasMap;
|
|
99
|
+
/**
|
|
100
|
+
* Splits a SQL fragment by commas that are not inside parentheses.
|
|
101
|
+
*/
|
|
102
|
+
private static splitAtTopLevelCommas;
|
|
103
|
+
/**
|
|
104
|
+
* Default ORDER BY when the original SQL has none.
|
|
105
|
+
* SQL Server requires ORDER BY for OFFSET/FETCH. We use (SELECT NULL) as a
|
|
106
|
+
* neutral ordering that satisfies the syntax without imposing any sort.
|
|
107
|
+
*/
|
|
108
|
+
private static defaultOrderBy;
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=queryPagingEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryPagingEngine.d.ts","sourceRoot":"","sources":["../../src/generic/queryPagingEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,iBAAiB;IAE1B;;;;;;;;OAQG;IACH,MAAM,CAAC,cAAc,CACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,gBAAgB,GAC3B,gBAAgB;IAsCnB;;;OAGG;IACH,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO;IAQrF;;;;;;OAMG;IACH,MAAM,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE;IAkEhF;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;IA+B7F;;;OAGG;IACH,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE;IAcxE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAO9B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;;;;;;OAOG;IACH,MAAM,CAAC,4BAA4B,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM;IA6CrF;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAwDlC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAkBpC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;CAQhC"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles server-side pagination for query SQL by wrapping resolved SQL in CTEs
|
|
3
|
+
* and applying platform-specific OFFSET/FETCH or LIMIT/OFFSET clauses.
|
|
4
|
+
*
|
|
5
|
+
* Works with arbitrary SQL including pre-existing CTEs from the composition engine.
|
|
6
|
+
* The approach:
|
|
7
|
+
* 1. Parse the SQL to separate CTE prefix from the main SELECT
|
|
8
|
+
* 2. Extract and remove any ORDER BY from the main SELECT
|
|
9
|
+
* 3. Strip any TOP N clause from the main SELECT
|
|
10
|
+
* 4. Wrap the main SELECT as a new CTE (`__paged`)
|
|
11
|
+
* 5. Emit a data query with ORDER BY + platform paging
|
|
12
|
+
* 6. Emit a count query over the same CTE
|
|
13
|
+
*/
|
|
14
|
+
export class QueryPagingEngine {
|
|
15
|
+
/**
|
|
16
|
+
* Wraps resolved SQL with CTE-based paging for server-side pagination.
|
|
17
|
+
*
|
|
18
|
+
* @param resolvedSQL The fully-resolved SQL (after composition + Nunjucks)
|
|
19
|
+
* @param startRow 0-based row offset
|
|
20
|
+
* @param maxRows Maximum rows to return (page size)
|
|
21
|
+
* @param platform Target database platform
|
|
22
|
+
* @returns DataSQL for paged results and CountSQL for total row count
|
|
23
|
+
*/
|
|
24
|
+
static WrapWithPaging(resolvedSQL, startRow, maxRows, platform) {
|
|
25
|
+
// Parse the SQL into CTE prefix + main SELECT
|
|
26
|
+
const { ctePrefix, mainSelect } = QueryPagingEngine.splitCTEAndSelect(resolvedSQL);
|
|
27
|
+
// Extract ORDER BY from the main SELECT
|
|
28
|
+
const { sqlWithoutOrder, orderByClause } = QueryPagingEngine.extractOrderBy(mainSelect);
|
|
29
|
+
// Strip TOP clause from the main SELECT (SQL Server habit)
|
|
30
|
+
const { sql: cleanSelect } = QueryPagingEngine.stripTopClause(sqlWithoutOrder);
|
|
31
|
+
// Build the CTE chain: existing CTEs + __paged
|
|
32
|
+
const pagingCTEName = QueryPagingEngine.quoteIdentifier('__paged', platform);
|
|
33
|
+
const existingCTEs = ctePrefix ? ctePrefix + ',\n' : 'WITH ';
|
|
34
|
+
const cteChain = `${existingCTEs}${pagingCTEName} AS (\n${cleanSelect}\n)`;
|
|
35
|
+
// Determine ORDER BY for the outer query, remapping table-qualified
|
|
36
|
+
// references to projected column names since the outer query is
|
|
37
|
+
// SELECT * FROM [__paged] where table aliases don't exist.
|
|
38
|
+
const rawOrderBy = orderByClause || QueryPagingEngine.defaultOrderBy(platform);
|
|
39
|
+
const outerOrderBy = orderByClause
|
|
40
|
+
? QueryPagingEngine.remapOrderByToProjectedNames(rawOrderBy, cleanSelect)
|
|
41
|
+
: rawOrderBy;
|
|
42
|
+
// Build platform-specific data query
|
|
43
|
+
const pagingClause = QueryPagingEngine.buildPagingClause(startRow, maxRows, platform);
|
|
44
|
+
const dataSQL = `${cteChain}\nSELECT * FROM ${pagingCTEName}\nORDER BY ${outerOrderBy}\n${pagingClause}`;
|
|
45
|
+
// Build count query (no ORDER BY needed)
|
|
46
|
+
const countSQL = `${cteChain}\nSELECT COUNT(*) AS TotalRowCount FROM ${pagingCTEName}`;
|
|
47
|
+
return {
|
|
48
|
+
DataSQL: dataSQL,
|
|
49
|
+
CountSQL: countSQL,
|
|
50
|
+
Offset: startRow,
|
|
51
|
+
PageSize: maxRows,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Determines whether the given params indicate paging should be applied.
|
|
56
|
+
* Paging is active when both StartRow is defined (>= 0) and MaxRows > 0.
|
|
57
|
+
*/
|
|
58
|
+
static ShouldPage(startRow, maxRows) {
|
|
59
|
+
return maxRows != null && maxRows > 0 && startRow != null && startRow >= 0;
|
|
60
|
+
}
|
|
61
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
62
|
+
// Internal helpers
|
|
63
|
+
// ────────────────────────────────────────────────────────────────────────
|
|
64
|
+
/**
|
|
65
|
+
* Splits SQL into a CTE prefix (everything in the WITH chain) and the main
|
|
66
|
+
* SELECT statement. Handles nested parentheses to avoid splitting inside CTEs.
|
|
67
|
+
*
|
|
68
|
+
* Returns `ctePrefix` as the full `WITH ... AS (...)` chain (no trailing comma),
|
|
69
|
+
* and `mainSelect` as the final SELECT.
|
|
70
|
+
*/
|
|
71
|
+
static splitCTEAndSelect(sql) {
|
|
72
|
+
const trimmed = sql.trim();
|
|
73
|
+
// Check if SQL starts with WITH (case-insensitive)
|
|
74
|
+
if (!/^WITH\s/i.test(trimmed)) {
|
|
75
|
+
return { ctePrefix: '', mainSelect: trimmed };
|
|
76
|
+
}
|
|
77
|
+
// Walk through the SQL tracking parenthesis depth to find where CTEs end
|
|
78
|
+
// and the final SELECT begins. CTEs are: WITH name AS (...), name AS (...)
|
|
79
|
+
// The final SELECT is the statement after the last CTE closing paren + optional comma.
|
|
80
|
+
let depth = 0;
|
|
81
|
+
let lastCTEEnd = -1;
|
|
82
|
+
let i = 0;
|
|
83
|
+
// Skip past "WITH "
|
|
84
|
+
const withMatch = trimmed.match(/^WITH\s+/i);
|
|
85
|
+
if (!withMatch) {
|
|
86
|
+
return { ctePrefix: '', mainSelect: trimmed };
|
|
87
|
+
}
|
|
88
|
+
i = withMatch[0].length;
|
|
89
|
+
while (i < trimmed.length) {
|
|
90
|
+
const ch = trimmed[i];
|
|
91
|
+
if (ch === '(') {
|
|
92
|
+
depth++;
|
|
93
|
+
}
|
|
94
|
+
else if (ch === ')') {
|
|
95
|
+
depth--;
|
|
96
|
+
if (depth === 0) {
|
|
97
|
+
lastCTEEnd = i;
|
|
98
|
+
// Look ahead: is there a comma (another CTE) or the final SELECT?
|
|
99
|
+
const rest = trimmed.substring(i + 1).trimStart();
|
|
100
|
+
if (rest.startsWith(',')) {
|
|
101
|
+
// More CTEs — advance past the comma
|
|
102
|
+
i = trimmed.indexOf(',', i + 1) + 1;
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
// This is the end of the CTE chain
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else if (ch === "'" && depth > 0) {
|
|
110
|
+
// Skip string literals inside CTEs
|
|
111
|
+
i++;
|
|
112
|
+
while (i < trimmed.length && trimmed[i] !== "'") {
|
|
113
|
+
if (trimmed[i] === "'" && i + 1 < trimmed.length && trimmed[i + 1] === "'") {
|
|
114
|
+
i += 2; // escaped quote
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
i++;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
i++;
|
|
122
|
+
}
|
|
123
|
+
if (lastCTEEnd === -1) {
|
|
124
|
+
// Couldn't parse CTEs — treat entire thing as mainSelect
|
|
125
|
+
return { ctePrefix: '', mainSelect: trimmed };
|
|
126
|
+
}
|
|
127
|
+
const ctePrefix = trimmed.substring(0, lastCTEEnd + 1).trim();
|
|
128
|
+
const mainSelect = trimmed.substring(lastCTEEnd + 1).trim();
|
|
129
|
+
return { ctePrefix, mainSelect };
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Extracts the ORDER BY clause from the end of a SQL statement.
|
|
133
|
+
* Only matches ORDER BY that is NOT inside parentheses (i.e., top-level).
|
|
134
|
+
*/
|
|
135
|
+
static extractOrderBy(sql) {
|
|
136
|
+
// Find the last top-level ORDER BY
|
|
137
|
+
const upperSQL = sql.toUpperCase();
|
|
138
|
+
let depth = 0;
|
|
139
|
+
let lastOrderByPos = -1;
|
|
140
|
+
for (let i = 0; i < sql.length; i++) {
|
|
141
|
+
const ch = sql[i];
|
|
142
|
+
if (ch === '(')
|
|
143
|
+
depth++;
|
|
144
|
+
else if (ch === ')')
|
|
145
|
+
depth--;
|
|
146
|
+
else if (depth === 0 && i + 8 <= sql.length) {
|
|
147
|
+
const slice = upperSQL.substring(i, i + 8);
|
|
148
|
+
if (slice === 'ORDER BY') {
|
|
149
|
+
// Verify it's a word boundary (preceded by whitespace or start)
|
|
150
|
+
if (i === 0 || /\s/.test(sql[i - 1])) {
|
|
151
|
+
lastOrderByPos = i;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (lastOrderByPos === -1) {
|
|
157
|
+
return { sqlWithoutOrder: sql, orderByClause: null };
|
|
158
|
+
}
|
|
159
|
+
const orderByClause = sql.substring(lastOrderByPos + 9).trim(); // 9 = "ORDER BY ".length
|
|
160
|
+
const sqlWithoutOrder = sql.substring(0, lastOrderByPos).trim();
|
|
161
|
+
return { sqlWithoutOrder, orderByClause };
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Strips a TOP N clause from a SELECT statement.
|
|
165
|
+
* Handles `SELECT TOP N`, `SELECT TOP (N)`, and `SELECT DISTINCT TOP N`.
|
|
166
|
+
*/
|
|
167
|
+
static stripTopClause(sql) {
|
|
168
|
+
// Match SELECT [DISTINCT] TOP (N) or TOP N
|
|
169
|
+
const topRegex = /^(SELECT\s+(?:DISTINCT\s+)?)TOP\s+(?:\(\s*\d+\s*\)|\d+)\s+/i;
|
|
170
|
+
const match = sql.match(topRegex);
|
|
171
|
+
if (!match) {
|
|
172
|
+
return { sql, topRemoved: false };
|
|
173
|
+
}
|
|
174
|
+
// Replace TOP clause, keeping SELECT [DISTINCT]
|
|
175
|
+
const cleaned = match[1] + sql.substring(match[0].length);
|
|
176
|
+
return { sql: cleaned, topRemoved: true };
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Quotes an identifier for the target platform.
|
|
180
|
+
*/
|
|
181
|
+
static quoteIdentifier(name, platform) {
|
|
182
|
+
if (platform === 'postgresql') {
|
|
183
|
+
return `"${name}"`;
|
|
184
|
+
}
|
|
185
|
+
return `[${name}]`;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Builds the platform-specific paging clause.
|
|
189
|
+
*/
|
|
190
|
+
static buildPagingClause(startRow, maxRows, platform) {
|
|
191
|
+
if (platform === 'postgresql') {
|
|
192
|
+
return `LIMIT ${maxRows} OFFSET ${startRow}`;
|
|
193
|
+
}
|
|
194
|
+
// SQL Server
|
|
195
|
+
return `OFFSET ${startRow} ROWS FETCH NEXT ${maxRows} ROWS ONLY`;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Remaps ORDER BY expressions so they reference the projected column names
|
|
199
|
+
* from the SELECT list rather than table-qualified aliases (e.g. `r.Total`
|
|
200
|
+
* becomes `TotalRevenue` if the SELECT has `r.Total AS TotalRevenue`).
|
|
201
|
+
*
|
|
202
|
+
* This is necessary because the outer query is `SELECT * FROM [__paged]`
|
|
203
|
+
* where the original table aliases no longer exist.
|
|
204
|
+
*/
|
|
205
|
+
static remapOrderByToProjectedNames(orderByClause, selectSQL) {
|
|
206
|
+
const aliasMap = QueryPagingEngine.buildSelectAliasMap(selectSQL);
|
|
207
|
+
// Split ORDER BY into terms at top-level commas
|
|
208
|
+
const terms = QueryPagingEngine.splitAtTopLevelCommas(orderByClause);
|
|
209
|
+
const remapped = terms.map(term => {
|
|
210
|
+
const trimmed = term.trim();
|
|
211
|
+
// Separate direction suffix (ASC, DESC, NULLS FIRST, NULLS LAST)
|
|
212
|
+
const dirMatch = trimmed.match(/\s+(ASC|DESC)(\s+NULLS\s+(FIRST|LAST))?\s*$/i);
|
|
213
|
+
const expr = dirMatch ? trimmed.substring(0, dirMatch.index).trim() : trimmed;
|
|
214
|
+
const direction = dirMatch ? dirMatch[0] : '';
|
|
215
|
+
// Normalize whitespace for comparison
|
|
216
|
+
const normalizedExpr = expr.replace(/\s+/g, ' ').trim();
|
|
217
|
+
// 1. Try exact match against SELECT expressions
|
|
218
|
+
const exactMatch = aliasMap.get(normalizedExpr.toUpperCase());
|
|
219
|
+
if (exactMatch) {
|
|
220
|
+
return exactMatch + direction;
|
|
221
|
+
}
|
|
222
|
+
// 2. Try stripping table alias prefixes from the expression
|
|
223
|
+
// e.g., COALESCE(rc.ChangeCount, 0) → COALESCE(ChangeCount, 0)
|
|
224
|
+
const stripped = normalizedExpr.replace(/\b[a-zA-Z_]\w*\./g, '');
|
|
225
|
+
const strippedMatch = aliasMap.get(stripped.toUpperCase());
|
|
226
|
+
if (strippedMatch) {
|
|
227
|
+
return strippedMatch + direction;
|
|
228
|
+
}
|
|
229
|
+
// 3. If expr itself is a simple table.column, strip the prefix
|
|
230
|
+
// and check if the bare column is a projected name
|
|
231
|
+
const dotMatch = expr.match(/^[a-zA-Z_]\w*\.([a-zA-Z_]\w*)$/);
|
|
232
|
+
if (dotMatch) {
|
|
233
|
+
return dotMatch[1] + direction;
|
|
234
|
+
}
|
|
235
|
+
// 4. Fallback: strip all table prefixes and hope for the best
|
|
236
|
+
return stripped + direction;
|
|
237
|
+
});
|
|
238
|
+
return remapped.join(', ');
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Parses the SELECT list from a SQL statement and builds a map of
|
|
242
|
+
* normalized expression → projected column name.
|
|
243
|
+
*
|
|
244
|
+
* For `SELECT au.Name AS UserName, COALESCE(rc.Count, 0) AS Total`
|
|
245
|
+
* returns Map { "AU.NAME" → "UserName", "COALESCE(RC.COUNT, 0)" → "Total" }
|
|
246
|
+
*
|
|
247
|
+
* Also indexes the stripped (no table prefix) versions:
|
|
248
|
+
* { "COALESCE(COUNT, 0)" → "Total", "NAME" → "UserName" }
|
|
249
|
+
*/
|
|
250
|
+
static buildSelectAliasMap(selectSQL) {
|
|
251
|
+
const map = new Map();
|
|
252
|
+
// Strip leading SQL comments (-- line comments and /* block comments */)
|
|
253
|
+
const stripped = selectSQL.replace(/^(\s*(--[^\n]*\n|\/\*[\s\S]*?\*\/))*\s*/i, '');
|
|
254
|
+
// Extract the column list between SELECT [DISTINCT] and the first top-level FROM
|
|
255
|
+
const selectMatch = stripped.match(/^SELECT\s+(?:DISTINCT\s+)?/i);
|
|
256
|
+
if (!selectMatch)
|
|
257
|
+
return map;
|
|
258
|
+
const afterSelect = stripped.substring(selectMatch[0].length);
|
|
259
|
+
// Find top-level FROM
|
|
260
|
+
const upperAfter = afterSelect.toUpperCase();
|
|
261
|
+
let depth = 0;
|
|
262
|
+
let fromPos = -1;
|
|
263
|
+
for (let i = 0; i < afterSelect.length; i++) {
|
|
264
|
+
const ch = afterSelect[i];
|
|
265
|
+
if (ch === '(')
|
|
266
|
+
depth++;
|
|
267
|
+
else if (ch === ')')
|
|
268
|
+
depth--;
|
|
269
|
+
else if (depth === 0 && i + 5 <= afterSelect.length) {
|
|
270
|
+
if (upperAfter.substring(i, i + 5) === 'FROM ' || upperAfter.substring(i, i + 5) === 'FROM\n' || upperAfter.substring(i, i + 5) === 'FROM\t') {
|
|
271
|
+
if (i === 0 || /\s/.test(afterSelect[i - 1])) {
|
|
272
|
+
fromPos = i;
|
|
273
|
+
break;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
const columnList = fromPos === -1 ? afterSelect : afterSelect.substring(0, fromPos);
|
|
279
|
+
const items = QueryPagingEngine.splitAtTopLevelCommas(columnList);
|
|
280
|
+
for (const item of items) {
|
|
281
|
+
const trimmed = item.trim();
|
|
282
|
+
if (!trimmed)
|
|
283
|
+
continue;
|
|
284
|
+
// Check for AS alias (case insensitive, must be word-bounded)
|
|
285
|
+
const asMatch = trimmed.match(/\s+AS\s+(\[?\w+\]?)\s*$/i);
|
|
286
|
+
if (asMatch) {
|
|
287
|
+
const expr = trimmed.substring(0, asMatch.index).trim();
|
|
288
|
+
const alias = asMatch[1].replace(/[[\]]/g, ''); // strip brackets
|
|
289
|
+
const normalizedExpr = expr.replace(/\s+/g, ' ').toUpperCase();
|
|
290
|
+
map.set(normalizedExpr, alias);
|
|
291
|
+
// Also index the stripped version (no table prefixes)
|
|
292
|
+
const strippedExpr = normalizedExpr.replace(/\b[A-Z_]\w*\./g, '');
|
|
293
|
+
if (strippedExpr !== normalizedExpr) {
|
|
294
|
+
map.set(strippedExpr, alias);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return map;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Splits a SQL fragment by commas that are not inside parentheses.
|
|
302
|
+
*/
|
|
303
|
+
static splitAtTopLevelCommas(sql) {
|
|
304
|
+
const parts = [];
|
|
305
|
+
let depth = 0;
|
|
306
|
+
let start = 0;
|
|
307
|
+
for (let i = 0; i < sql.length; i++) {
|
|
308
|
+
const ch = sql[i];
|
|
309
|
+
if (ch === '(')
|
|
310
|
+
depth++;
|
|
311
|
+
else if (ch === ')')
|
|
312
|
+
depth--;
|
|
313
|
+
else if (ch === ',' && depth === 0) {
|
|
314
|
+
parts.push(sql.substring(start, i));
|
|
315
|
+
start = i + 1;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
parts.push(sql.substring(start));
|
|
319
|
+
return parts;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Default ORDER BY when the original SQL has none.
|
|
323
|
+
* SQL Server requires ORDER BY for OFFSET/FETCH. We use (SELECT NULL) as a
|
|
324
|
+
* neutral ordering that satisfies the syntax without imposing any sort.
|
|
325
|
+
*/
|
|
326
|
+
static defaultOrderBy(platform) {
|
|
327
|
+
if (platform === 'postgresql') {
|
|
328
|
+
// PostgreSQL allows LIMIT/OFFSET without ORDER BY, but for consistency
|
|
329
|
+
// we still add a neutral order
|
|
330
|
+
return '1';
|
|
331
|
+
}
|
|
332
|
+
return '(SELECT NULL)';
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=queryPagingEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryPagingEngine.js","sourceRoot":"","sources":["../../src/generic/queryPagingEngine.ts"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,iBAAiB;IAE1B;;;;;;;;OAQG;IACH,MAAM,CAAC,cAAc,CACjB,WAAmB,EACnB,QAAgB,EAChB,OAAe,EACf,QAA0B;QAE1B,8CAA8C;QAC9C,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAEnF,wCAAwC;QACxC,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;QAExF,2DAA2D;QAC3D,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAA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G,CAAC,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;gBACjC,CAAC;YACL,CAAC;QACL,CAAC;QAED,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,qBAAqB,CAAC,GAAW;QAC5C,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,KAAK,GAAG,CAAC,CAAC;QAEd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,EAAE,KAAK,GAAG;gBAAE,KAAK,EAAE,CAAC;iBACnB,IAAI,EAAE,KAAK,GAAG;gBAAE,KAAK,EAAE,CAAC;iBACxB,IAAI,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;gBACjC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;gBACpC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;YAClB,CAAC;QACL,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,cAAc,CAAC,QAA0B;QACpD,IAAI,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC5B,uEAAuE;YACvE,+BAA+B;YAC/B,OAAO,GAAG,CAAC;QACf,CAAC;QACD,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ"}
|
|
@@ -77,6 +77,14 @@ export type RunQueryParams = {
|
|
|
77
77
|
* 2. Otherwise the LocalCacheManager's default TTL will be used (typically 5 minutes)
|
|
78
78
|
*/
|
|
79
79
|
CacheLocalTTL?: number;
|
|
80
|
+
/**
|
|
81
|
+
* Optional TTL (time-to-live) in minutes for server-side caching of ad-hoc SQL queries.
|
|
82
|
+
* When set to a value > 0 and the query uses the `SQL` field (ad-hoc mode), results
|
|
83
|
+
* will be cached using a hash of the SQL string as the cache key.
|
|
84
|
+
* Subsequent identical SQL executions within the TTL window return cached results.
|
|
85
|
+
* Has no effect on saved queries (they use QueryInfo.CacheConfig instead).
|
|
86
|
+
*/
|
|
87
|
+
AdhocCacheTTLMinutes?: number;
|
|
80
88
|
};
|
|
81
89
|
/**
|
|
82
90
|
* Class used to run a query and return the results.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runQuery.d.ts","sourceRoot":"","sources":["../../src/generic/runQuery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAE5B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;;;OA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W,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC;IAK9F;;;;;;;OAOG;IACU,UAAU,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,WAAW,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAKpG,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAiC;IAClE;;;;;OAKG;IACH,WAAkB,QAAQ,IAAI,iBAAiB,CAM9C;IACD;;;;;OAKG;IACH,WAAkB,QAAQ,CAAC,KAAK,EAAE,iBAAiB,EAMlD;CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runQuery.js","sourceRoot":"","sources":["../../src/generic/runQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"runQuery.js","sourceRoot":"","sources":["../../src/generic/runQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AA8FlD;;;;GAIG;AACH,MAAM,OAAO,QAAQ;IAEjB;;OAEG;IACH,YAAY,WAAqC,IAAI;QACjD,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACH,IAAW,aAAa;QACpB,OAAO,IAAI,CAAC,SAAS,IAAI,QAAQ,CAAC,QAAQ,CAAC;IAC/C,CAAC;IACD;;;;;;;;OAQG;IACI,KAAK,CAAC,QAAQ,CAAC,MAAsB,EAAE,WAAsB;QAChE,qFAAqF;QACrF,OAAO,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,UAAU,CAAC,MAAwB,EAAE,WAAsB;QACpE,qFAAqF;QACrF,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC9D,CAAC;aAEc,uBAAkB,GAAW,qBAAqB,CAAC;IAClE;;;;;OAKG;IACI,MAAM,KAAK,QAAQ;QACtB,MAAM,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;QACnD,IAAI,CAAC;YACD,OAAO,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;;YAEtC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IACtF,CAAC;IACD;;;;;OAKG;IACI,MAAM,KAAK,QAAQ,CAAC,KAAwB;QAC/C,MAAM,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,oBAAoB,EAAE,CAAC;QACnD,IAAI,CAAC;YACD,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC;;YAEvC,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IACtF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,11 +16,13 @@ export * from "./generic/logging.js";
|
|
|
16
16
|
export * from "./generic/queryInfo.js";
|
|
17
17
|
export * from "./generic/queryInfoInterfaces.js";
|
|
18
18
|
export * from "./generic/queryCompositionEngine.js";
|
|
19
|
+
export * from "./generic/queryPagingEngine.js";
|
|
19
20
|
export * from "./generic/querySQLFilters.js";
|
|
20
21
|
export * from "./generic/runQuerySQLFilterImplementations.js";
|
|
21
22
|
export * from "./generic/libraryInfo.js";
|
|
22
23
|
export * from "./generic/QueryCacheConfig.js";
|
|
23
24
|
export * from "./generic/QueryCache.js";
|
|
25
|
+
export * from "./generic/QueryCacheManager.js";
|
|
24
26
|
export * from "./generic/explorerNavigationItem.js";
|
|
25
27
|
export * from "./generic/compositeKey.js";
|
|
26
28
|
export * from "./generic/authEvaluator.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,cAAc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B,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAE3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,wBAAwB,CAAC;AAEvC,wBAAgB,WAAW,CAAC,QAAQ,KAAA,QAMnC"}
|
package/dist/index.js
CHANGED
|
@@ -21,11 +21,13 @@ export * from "./generic/logging.js";
|
|
|
21
21
|
export * from "./generic/queryInfo.js";
|
|
22
22
|
export * from "./generic/queryInfoInterfaces.js";
|
|
23
23
|
export * from "./generic/queryCompositionEngine.js";
|
|
24
|
+
export * from "./generic/queryPagingEngine.js";
|
|
24
25
|
export * from "./generic/querySQLFilters.js";
|
|
25
26
|
export * from "./generic/runQuerySQLFilterImplementations.js";
|
|
26
27
|
export * from "./generic/libraryInfo.js";
|
|
27
28
|
export * from "./generic/QueryCacheConfig.js";
|
|
28
29
|
export * from "./generic/QueryCache.js";
|
|
30
|
+
export * from "./generic/QueryCacheManager.js";
|
|
29
31
|
export * from "./generic/explorerNavigationItem.js";
|
|
30
32
|
export * from "./generic/compositeKey.js";
|
|
31
33
|
export * from "./generic/authEvaluator.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,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;A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json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.12.0",
|
|
5
5
|
"description": "MemberJunction: Core Library including Metadata, Application, Entity Retrieval and Manipulation, and Utilities",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"vitest": "^3.1.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/global": "5.
|
|
29
|
+
"@memberjunction/global": "5.12.0",
|
|
30
30
|
"rxjs": "^7.8.2",
|
|
31
31
|
"zod": "~3.24.4",
|
|
32
32
|
"debug": "^4.4.3"
|