@iamkirbki/database-handler-core 4.3.0 → 4.4.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/abstract/Controller.d.ts +17 -0
- package/dist/abstract/Controller.d.ts.map +1 -0
- package/dist/abstract/Controller.js +47 -0
- package/dist/abstract/Model.d.ts +33 -19
- package/dist/abstract/Model.d.ts.map +1 -1
- package/dist/abstract/Model.js +177 -120
- package/dist/abstract/SchemaTableBuilder.d.ts +1 -1
- package/dist/abstract/SchemaTableBuilder.d.ts.map +1 -1
- package/dist/abstract/model/ModelRelation.d.ts +23 -0
- package/dist/abstract/model/ModelRelation.d.ts.map +1 -0
- package/dist/abstract/model/ModelRelation.js +130 -0
- package/dist/base/Query.d.ts +10 -13
- package/dist/base/Query.d.ts.map +1 -1
- package/dist/base/Query.js +68 -26
- package/dist/base/Record.d.ts +4 -2
- package/dist/base/Record.d.ts.map +1 -1
- package/dist/base/Record.js +24 -14
- package/dist/base/Table.d.ts +12 -7
- package/dist/base/Table.d.ts.map +1 -1
- package/dist/base/Table.js +87 -47
- package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.d.ts +4 -0
- package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.d.ts.map +1 -0
- package/dist/helpers/Errors/AdapterErrors/AdapterNotFoundError.js +6 -0
- package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.d.ts +4 -0
- package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.d.ts.map +1 -0
- package/dist/helpers/Errors/AdapterErrors/ConnectionFailedError.js +6 -0
- package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.d.ts +4 -0
- package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.d.ts.map +1 -0
- package/dist/helpers/Errors/AdapterErrors/NoDefaultAdapterError.js +6 -0
- package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.d.ts +4 -0
- package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.d.ts.map +1 -0
- package/dist/helpers/Errors/ExpressionErrors/InvalidExpressionParametersError.js +6 -0
- package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.d.ts +4 -0
- package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.d.ts.map +1 -0
- package/dist/helpers/Errors/ExpressionErrors/UnknownExpressionTypeError.js +6 -0
- package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.d.ts +4 -0
- package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.d.ts.map +1 -0
- package/dist/helpers/Errors/ExpressionErrors/UnsupportedQueryPhaseError.js +6 -0
- package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.d.ts +4 -0
- package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.d.ts.map +1 -0
- package/dist/helpers/Errors/QueryErrors/UnexpectedEmptyQueryError.js +6 -0
- package/dist/helpers/Errors/TableErrors/UnknownTableError.d.ts +4 -0
- package/dist/helpers/Errors/TableErrors/UnknownTableError.d.ts.map +1 -0
- package/dist/helpers/Errors/TableErrors/UnknownTableError.js +6 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.d.ts +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseDeleteQueryBuilder.js +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.d.ts +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseInsertQueryBuilder.js +11 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.d.ts +11 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseSelectQueryBuilder.js +27 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.d.ts +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/BaseQueryBuilders/BaseUpdateQueryBuilder.js +1 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.d.ts +9 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/JsonAggregateExpression.js +102 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.d.ts +8 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/SpatialDistanceExpression.js +63 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.d.ts +8 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/ExpressionBuilders/TextRelevanceExpression.js +49 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.d.ts +19 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ExpressionDecorator.js +60 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.d.ts +9 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/GroupByDecorator.js +27 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.d.ts +15 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/JoinDecorator.js +74 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.d.ts +10 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/LimitDecorator.js +29 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.d.ts +9 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/OrderByDecorator.js +27 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.d.ts +8 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/QueryDecorator.js +5 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.d.ts +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/ValuesDecorator.js +17 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.d.ts +9 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryDecorators/WhereDecorator.js +29 -0
- package/dist/helpers/QueryBuilders/QueryExpressionBuilder.d.ts +54 -0
- package/dist/helpers/QueryBuilders/QueryExpressionBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryExpressionBuilder.js +102 -0
- package/dist/helpers/QueryBuilders/QueryStatementBuilder.d.ts +16 -0
- package/dist/helpers/QueryBuilders/QueryStatementBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/QueryStatementBuilder.js +169 -0
- package/dist/helpers/QueryBuilders/SqlRenderer.d.ts +15 -0
- package/dist/helpers/QueryBuilders/SqlRenderer.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/SqlRenderer.js +79 -0
- package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.d.ts +160 -0
- package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.d.ts.map +1 -0
- package/dist/helpers/QueryBuilders/oldQueryStatementBuilder.js +217 -0
- package/dist/interfaces/IExpressionBuilder.d.ts +7 -0
- package/dist/interfaces/IExpressionBuilder.d.ts.map +1 -0
- package/dist/interfaces/IExpressionBuilder.js +1 -0
- package/dist/interfaces/IQueryBuilder.d.ts +5 -0
- package/dist/interfaces/IQueryBuilder.d.ts.map +1 -0
- package/dist/interfaces/IQueryBuilder.js +1 -0
- package/dist/interfaces/ISchemaBuilder.d.ts +1 -1
- package/dist/interfaces/ISchemaBuilder.d.ts.map +1 -1
- package/dist/runtime/Container.d.ts +3 -0
- package/dist/runtime/Container.d.ts.map +1 -1
- package/dist/runtime/Container.js +12 -2
- package/dist/runtime/QueryCache.d.ts +12 -0
- package/dist/runtime/QueryCache.d.ts.map +1 -0
- package/dist/runtime/QueryCache.js +26 -0
- package/dist/runtime/Repository.d.ts +13 -7
- package/dist/runtime/Repository.d.ts.map +1 -1
- package/dist/runtime/Repository.js +114 -70
- package/dist/types/expressions.d.ts +154 -0
- package/dist/types/expressions.d.ts.map +1 -0
- package/dist/types/expressions.js +6 -0
- package/dist/types/factories.d.ts +7 -0
- package/dist/types/factories.d.ts.map +1 -0
- package/dist/types/factories.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/model.d.ts +8 -8
- package/dist/types/model.d.ts.map +1 -1
- package/dist/types/query.d.ts +63 -1
- package/dist/types/query.d.ts.map +1 -1
- package/package.json +11 -3
- package/dist/helpers/QueryStatementBuilder.d.ts +0 -304
- package/dist/helpers/QueryStatementBuilder.d.ts.map +0 -1
- package/dist/helpers/QueryStatementBuilder.js +0 -417
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import SpatialDistanceExpression from "./ExpressionBuilders/SpatialDistanceExpression.js";
|
|
2
|
+
import { UnknownExpressionTypeError } from "../Errors/ExpressionErrors/UnknownExpressionTypeError.js";
|
|
3
|
+
import TextRelevanceExpression from "./ExpressionBuilders/TextRelevanceExpression.js";
|
|
4
|
+
import JsonAggregateExpression from "./ExpressionBuilders/JsonAggregateExpression.js";
|
|
5
|
+
/**
|
|
6
|
+
* A normalized, intermediate representation of a query expression.
|
|
7
|
+
*
|
|
8
|
+
* Expressions are NOT SQL strings directly — they are metadata-rich
|
|
9
|
+
* building blocks that later stages of the query builder can reason about.
|
|
10
|
+
*
|
|
11
|
+
* This is what allows:
|
|
12
|
+
* - base vs projection expressions
|
|
13
|
+
* - conditional query wrapping
|
|
14
|
+
* - expression-driven WHERE / ORDER BY injection
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Central factory and orchestration layer for query expressions.
|
|
18
|
+
*
|
|
19
|
+
* This class is intentionally:
|
|
20
|
+
* - static
|
|
21
|
+
* - registry-driven
|
|
22
|
+
* - dumb about SQL execution
|
|
23
|
+
*
|
|
24
|
+
* Its ONLY job is to translate abstract expressions
|
|
25
|
+
* into structured SQL fragments with metadata.
|
|
26
|
+
*/
|
|
27
|
+
class QueryExpressionBuilder {
|
|
28
|
+
static getExpressionDefaultRequirements(type) {
|
|
29
|
+
return this.expressionDefaults.get(type);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Registers a new expression builder at runtime.
|
|
33
|
+
*
|
|
34
|
+
* This is your “escape hatch” when core expressions
|
|
35
|
+
* are not enough.
|
|
36
|
+
*
|
|
37
|
+
* @param type - expression.type value
|
|
38
|
+
* @param builder - function that converts expression → expressionClause
|
|
39
|
+
*/
|
|
40
|
+
static registerExpressionBuilder(type, builder) {
|
|
41
|
+
this.expressionBuilders.set(type, builder);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Converts high-level expression definitions into normalized clauses.
|
|
45
|
+
*
|
|
46
|
+
* Any expression without a registered builder is ignored
|
|
47
|
+
* (with a error, because silence is how bugs breed).
|
|
48
|
+
*/
|
|
49
|
+
static buildExpressionsPart(expressions) {
|
|
50
|
+
const queryParts = [];
|
|
51
|
+
expressions.forEach(expression => {
|
|
52
|
+
const builder = this.expressionBuilders.get(expression.type);
|
|
53
|
+
if (builder) {
|
|
54
|
+
queryParts.push(builder(expression));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw new UnknownExpressionTypeError(expression.type);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
return queryParts;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Registry mapping expression "type" → builder function.
|
|
65
|
+
*
|
|
66
|
+
* This allows:
|
|
67
|
+
* - zero switch statements
|
|
68
|
+
* - easy plugin-style extension
|
|
69
|
+
* - no touching core logic to add new expressions
|
|
70
|
+
*/
|
|
71
|
+
QueryExpressionBuilder.expressionBuilders = new Map([
|
|
72
|
+
[
|
|
73
|
+
'spatialDistance',
|
|
74
|
+
(expr) => new SpatialDistanceExpression().build(expr)
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
'textRelevance',
|
|
78
|
+
(expr) => new TextRelevanceExpression().build(expr)
|
|
79
|
+
],
|
|
80
|
+
[
|
|
81
|
+
'jsonAggregate',
|
|
82
|
+
(expr) => new JsonAggregateExpression().build(expr)
|
|
83
|
+
]
|
|
84
|
+
// Future examples:
|
|
85
|
+
// ['jsonAggregation', (expr) => QueryExpressionBuilder.BuildJsonAggregation(expr)]
|
|
86
|
+
// ['windowFunction', (expr) => QueryExpressionBuilder.BuildWindowFunction(expr)]
|
|
87
|
+
]);
|
|
88
|
+
QueryExpressionBuilder.expressionDefaults = new Map([
|
|
89
|
+
[
|
|
90
|
+
'spatialDistance',
|
|
91
|
+
new SpatialDistanceExpression().defaultRequirements
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
'textRelevance',
|
|
95
|
+
new TextRelevanceExpression().defaultRequirements
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
'jsonAggregate',
|
|
99
|
+
new JsonAggregateExpression().defaultRequirements
|
|
100
|
+
]
|
|
101
|
+
]);
|
|
102
|
+
export default QueryExpressionBuilder;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QueryWhereCondition, QueryComparisonParameters, QueryLayers, TableColumnInfo } from "../../types/index.js";
|
|
2
|
+
export default class QueryStatementBuilder {
|
|
3
|
+
private _layers;
|
|
4
|
+
private _contexts;
|
|
5
|
+
private _tableColumnsCache;
|
|
6
|
+
private _valueClauseKeywords;
|
|
7
|
+
constructor(queryLayers: QueryLayers, tableColumnInformation?: Map<string, TableColumnInfo[]>);
|
|
8
|
+
build(): Promise<string>;
|
|
9
|
+
private buildBaseLayer;
|
|
10
|
+
private buildPrettyLayer;
|
|
11
|
+
private buildFinalLayer;
|
|
12
|
+
static normalizeAndQualifyConditions(where: QueryWhereCondition, tableName: string, normalizeBlacklist?: string[], valueClauseKeywords?: Set<string>): QueryComparisonParameters[];
|
|
13
|
+
static normalizeQueryConditions(where: QueryWhereCondition): QueryComparisonParameters[];
|
|
14
|
+
private addUnique;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=QueryStatementBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryStatementBuilder.d.ts","sourceRoot":"","sources":["../../../src/helpers/QueryBuilders/QueryStatementBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,yBAAyB,EACzB,WAAW,EAEX,eAAe,EAClB,MAAM,sBAAsB,CAAC;AAY9B,MAAM,CAAC,OAAO,OAAO,qBAAqB;IACtC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,SAAS,CAIV;IAEP,OAAO,CAAC,kBAAkB,CAA6C;IACvE,OAAO,CAAC,oBAAoB,CAA0B;gBAE1C,WAAW,EAAE,WAAW,EAAE,sBAAsB,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;IAQhF,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;YAcvB,cAAc;YAyCd,gBAAgB;YAgDhB,eAAe;WAiBf,6BAA6B,CACvC,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,MAAM,EACjB,kBAAkB,GAAE,MAAM,EAAO,EACjC,mBAAmB,GAAE,GAAG,CAAC,MAAM,CAAa,GAC7C,yBAAyB,EAAE;WAqBhB,wBAAwB,CAClC,KAAK,EAAE,mBAAmB,GAC3B,yBAAyB,EAAE;IAa9B,OAAO,CAAC,SAAS;CAWpB"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import BaseSelectQueryBuilder from "./BaseQueryBuilders/BaseSelectQueryBuilder.js";
|
|
11
|
+
import ExpressionDecorator from "./QueryDecorators/ExpressionDecorator.js";
|
|
12
|
+
import QueryExpressionBuilder from "./QueryExpressionBuilder.js";
|
|
13
|
+
import WhereDecorator from "./QueryDecorators/WhereDecorator.js";
|
|
14
|
+
import JoinDecorator from "./QueryDecorators/JoinDecorator.js";
|
|
15
|
+
import GroupByDecorator from "./QueryDecorators/GroupByDecorator.js";
|
|
16
|
+
import OrderByDecorator from "./QueryDecorators/OrderByDecorator.js";
|
|
17
|
+
import LimitDecorator from "./QueryDecorators/LimitDecorator.js";
|
|
18
|
+
import SqlRenderer from "./SqlRenderer.js";
|
|
19
|
+
export default class QueryStatementBuilder {
|
|
20
|
+
constructor(queryLayers, tableColumnInformation) {
|
|
21
|
+
this._contexts = {};
|
|
22
|
+
this._tableColumnsCache = new Map();
|
|
23
|
+
this._valueClauseKeywords = new Set();
|
|
24
|
+
this._layers = queryLayers;
|
|
25
|
+
if (tableColumnInformation) {
|
|
26
|
+
this._tableColumnsCache = tableColumnInformation;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
build() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let sql = yield this.buildBaseLayer();
|
|
32
|
+
if (this._layers.pretty) {
|
|
33
|
+
sql = yield this.buildPrettyLayer(sql);
|
|
34
|
+
}
|
|
35
|
+
if (this._layers.final) {
|
|
36
|
+
sql = yield this.buildFinalLayer(sql);
|
|
37
|
+
}
|
|
38
|
+
return sql;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
buildBaseLayer() {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
var _d, _e;
|
|
45
|
+
if (!this._layers.base.from) {
|
|
46
|
+
throw new Error("Base layer must specify 'from' table name.");
|
|
47
|
+
}
|
|
48
|
+
let builder = new BaseSelectQueryBuilder(this._layers.base.from, this._layers.base.select || [], this._layers.base.joinsSelect || [], this._layers.base.expressionsSelect || []);
|
|
49
|
+
if (this._layers.base.joins && this._layers.base.joins.length > 0) {
|
|
50
|
+
builder = new JoinDecorator(builder, { base: this._layers.base, pretty: this._layers.pretty, final: this._layers.final }, this._tableColumnsCache);
|
|
51
|
+
}
|
|
52
|
+
if (this._layers.base.expressions && this._layers.base.expressions.length > 0) {
|
|
53
|
+
const expressions = QueryExpressionBuilder.buildExpressionsPart(this._layers.base.expressions || []);
|
|
54
|
+
builder = new ExpressionDecorator(builder, expressions || []);
|
|
55
|
+
if (builder instanceof ExpressionDecorator) {
|
|
56
|
+
this._valueClauseKeywords = new Set([...this._valueClauseKeywords, ...builder.valueClauseKeywords]);
|
|
57
|
+
(_a = (_d = this._layers).pretty) !== null && _a !== void 0 ? _a : (_d.pretty = {});
|
|
58
|
+
(_b = (_e = this._layers).final) !== null && _b !== void 0 ? _b : (_e.final = {});
|
|
59
|
+
this._layers.pretty.where = this.addUnique(this._layers.pretty.where, builder.whereClauses);
|
|
60
|
+
this._layers.pretty.groupBy = this.addUnique(this._layers.pretty.groupBy, builder.groupByClauses);
|
|
61
|
+
this._layers.pretty.having = this.addUnique(this._layers.pretty.having, builder.havingClauses);
|
|
62
|
+
this._layers.base.orderBy = this.addUnique((_c = this._layers.base.orderBy) === null || _c === void 0 ? void 0 : _c.map(ob => ({ column: `${ob.column}`, direction: ob.direction })), builder.orderByClauses);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (this._layers.base.where) {
|
|
66
|
+
builder = new WhereDecorator(builder, this._layers.base.joins ? QueryStatementBuilder.normalizeAndQualifyConditions(this._layers.base.where, this._layers.base.from) : this._layers.base.where);
|
|
67
|
+
}
|
|
68
|
+
if (this._layers.base.orderBy) {
|
|
69
|
+
builder = new OrderByDecorator(builder, this._layers.base.orderBy);
|
|
70
|
+
}
|
|
71
|
+
this._contexts.base = yield builder.build();
|
|
72
|
+
const renderer = new SqlRenderer(this._contexts.base);
|
|
73
|
+
return renderer.build();
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
buildPrettyLayer(sql) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
79
|
+
var _h;
|
|
80
|
+
let builder = new BaseSelectQueryBuilder(`( ${sql} ) AS BASE_QUERY`, [...((_a = this._contexts.base) === null || _a === void 0 ? void 0 : _a.select) || [], ...((_b = this._layers.pretty) === null || _b === void 0 ? void 0 : _b.select) || []], ((_d = (_c = this._contexts.base) === null || _c === void 0 ? void 0 : _c.joinsSelect) === null || _d === void 0 ? void 0 : _d.map(j => j.split("AS")[1].trim())) || []);
|
|
81
|
+
if (this._layers.pretty) {
|
|
82
|
+
const expressions = ((_e = this._layers.pretty.expressions) === null || _e === void 0 ? void 0 : _e.length)
|
|
83
|
+
? QueryExpressionBuilder.buildExpressionsPart(this._layers.pretty.expressions)
|
|
84
|
+
: [];
|
|
85
|
+
if (expressions.length > 0) {
|
|
86
|
+
builder = new ExpressionDecorator(builder, expressions);
|
|
87
|
+
if (builder instanceof ExpressionDecorator) {
|
|
88
|
+
this._layers.pretty.where = this.addUnique(this._layers.pretty.where, builder.whereClauses);
|
|
89
|
+
this._layers.pretty.groupBy = this.addUnique(this._layers.pretty.groupBy, builder.groupByClauses);
|
|
90
|
+
this._layers.pretty.having = this.addUnique(this._layers.pretty.having, builder.havingClauses);
|
|
91
|
+
(_f = (_h = this._layers).final) !== null && _f !== void 0 ? _f : (_h.final = {});
|
|
92
|
+
this._layers.final.orderBy = this.addUnique((_g = this._layers.final.orderBy) === null || _g === void 0 ? void 0 : _g.map(ob => ({ column: `BASE_QUERY.${ob.column}`, direction: ob.direction })), builder.orderByClauses);
|
|
93
|
+
}
|
|
94
|
+
if (this._layers.pretty.where) {
|
|
95
|
+
builder = new WhereDecorator(builder, QueryStatementBuilder.normalizeAndQualifyConditions(this._layers.pretty.where, "BASE_QUERY", [], this._valueClauseKeywords));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else if (this._layers.pretty.where) {
|
|
99
|
+
builder = new WhereDecorator(builder, QueryStatementBuilder.normalizeAndQualifyConditions(this._layers.pretty.where, "BASE_QUERY", [], this._valueClauseKeywords));
|
|
100
|
+
}
|
|
101
|
+
if (this._layers.pretty.groupBy) {
|
|
102
|
+
builder = new GroupByDecorator(builder, this._layers.pretty.groupBy);
|
|
103
|
+
}
|
|
104
|
+
if (this._layers.pretty.having) {
|
|
105
|
+
builder = new WhereDecorator(builder, QueryStatementBuilder.normalizeAndQualifyConditions(this._layers.pretty.having, "BASE_QUERY"));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
this._contexts.pretty = yield builder.build();
|
|
109
|
+
const renderer = new SqlRenderer(this._contexts.pretty);
|
|
110
|
+
return renderer.build();
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
buildFinalLayer(sql) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
var _a;
|
|
116
|
+
let builder = new BaseSelectQueryBuilder(`( ${sql} ) AS PRETTY_QUERY`, ((_a = this._layers.final) === null || _a === void 0 ? void 0 : _a.select) || []);
|
|
117
|
+
if (this._layers.final) {
|
|
118
|
+
if (this._layers.final.orderBy) {
|
|
119
|
+
builder = new OrderByDecorator(builder, this._layers.final.orderBy);
|
|
120
|
+
}
|
|
121
|
+
if (this._layers.final.limit) {
|
|
122
|
+
builder = new LimitDecorator(builder, this._layers.final.limit, this._layers.final.offset);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
this._contexts.final = yield builder.build();
|
|
126
|
+
const renderer = new SqlRenderer(this._contexts.final);
|
|
127
|
+
return renderer.build();
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
static normalizeAndQualifyConditions(where, tableName, normalizeBlacklist = [], valueClauseKeywords = new Set()) {
|
|
131
|
+
const conditions = this.normalizeQueryConditions(where);
|
|
132
|
+
return conditions.map((condition) => {
|
|
133
|
+
const shouldSkipQualification = normalizeBlacklist.some((blk) => condition.column.includes(blk)) ||
|
|
134
|
+
condition.column.includes(".");
|
|
135
|
+
const isValueClauseKeyword = valueClauseKeywords.has(condition.column);
|
|
136
|
+
if (isValueClauseKeyword) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
return Object.assign(Object.assign({}, condition), { column: shouldSkipQualification
|
|
140
|
+
? condition.column
|
|
141
|
+
: `${tableName}.${condition.column}` });
|
|
142
|
+
}).filter(cond => cond !== undefined);
|
|
143
|
+
}
|
|
144
|
+
static normalizeQueryConditions(where) {
|
|
145
|
+
if (Array.isArray(where)) {
|
|
146
|
+
return where;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
return Object.entries(where).map(([column, value]) => ({
|
|
150
|
+
column,
|
|
151
|
+
operator: "=",
|
|
152
|
+
value,
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
// Copilot moment maybe refactor this later
|
|
157
|
+
addUnique(target, values) {
|
|
158
|
+
if (!(values === null || values === void 0 ? void 0 : values.length))
|
|
159
|
+
return target !== null && target !== void 0 ? target : [];
|
|
160
|
+
const set = new Set((target !== null && target !== void 0 ? target : []).map(v => JSON.stringify(v)));
|
|
161
|
+
for (const v of values) {
|
|
162
|
+
const key = JSON.stringify(v);
|
|
163
|
+
if (!set.has(key))
|
|
164
|
+
set.add(key);
|
|
165
|
+
}
|
|
166
|
+
return Array.from(set).map(s => JSON.parse(s));
|
|
167
|
+
}
|
|
168
|
+
;
|
|
169
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { QueryContext } from "../../types/query.js";
|
|
2
|
+
export default class SqlRenderer {
|
|
3
|
+
private _context;
|
|
4
|
+
constructor(context: QueryContext);
|
|
5
|
+
build(): string;
|
|
6
|
+
private renderSelect;
|
|
7
|
+
private renderFrom;
|
|
8
|
+
private renderWhere;
|
|
9
|
+
private buildWhereWithOperators;
|
|
10
|
+
private renderOrderBy;
|
|
11
|
+
private renderGroupBy;
|
|
12
|
+
private renderLimit;
|
|
13
|
+
private renderOffset;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SqlRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqlRenderer.d.ts","sourceRoot":"","sources":["../../../src/helpers/QueryBuilders/SqlRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE/E,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAe;gBAEnB,OAAO,EAAE,YAAY;IAI1B,KAAK,IAAI,MAAM;IAatB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,uBAAuB;IAW/B,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;CAOvB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export default class SqlRenderer {
|
|
2
|
+
constructor(context) {
|
|
3
|
+
this._context = context;
|
|
4
|
+
}
|
|
5
|
+
build() {
|
|
6
|
+
var _a;
|
|
7
|
+
return [
|
|
8
|
+
this.renderSelect(),
|
|
9
|
+
this.renderFrom(),
|
|
10
|
+
(_a = this._context.joins) === null || _a === void 0 ? void 0 : _a.join(" "),
|
|
11
|
+
this.renderWhere(),
|
|
12
|
+
this.renderGroupBy(),
|
|
13
|
+
this.renderOrderBy(),
|
|
14
|
+
this.renderLimit(),
|
|
15
|
+
this.renderOffset()
|
|
16
|
+
].map(e => e === null || e === void 0 ? void 0 : e.trim()).filter(e => e !== "").join(" ");
|
|
17
|
+
}
|
|
18
|
+
renderSelect() {
|
|
19
|
+
const selects = [];
|
|
20
|
+
if (this._context.select && this._context.select.length > 0) {
|
|
21
|
+
selects.push(...this._context.select);
|
|
22
|
+
}
|
|
23
|
+
else if (!this._context.joinsSelect || this._context.joinsSelect.length === 0) {
|
|
24
|
+
selects.push('*');
|
|
25
|
+
}
|
|
26
|
+
selects.push(...(this._context.joinsSelect || []));
|
|
27
|
+
selects.push(...(this._context.expressionSelect || []));
|
|
28
|
+
return selects.length > 0 ? `SELECT ${selects.join(", ")}` : "SELECT *";
|
|
29
|
+
}
|
|
30
|
+
renderFrom() {
|
|
31
|
+
return this._context.from ? `FROM ${this._context.from}` : "";
|
|
32
|
+
}
|
|
33
|
+
renderWhere() {
|
|
34
|
+
var _a;
|
|
35
|
+
if (!((_a = this._context.conditions) === null || _a === void 0 ? void 0 : _a.where) ||
|
|
36
|
+
Object.keys(this._context.conditions.where).length === 0) {
|
|
37
|
+
return "";
|
|
38
|
+
}
|
|
39
|
+
return `WHERE ${this.buildWhereWithOperators(this._context.conditions.where)}`;
|
|
40
|
+
}
|
|
41
|
+
buildWhereWithOperators(where) {
|
|
42
|
+
return where
|
|
43
|
+
.map((condition) => {
|
|
44
|
+
var _a;
|
|
45
|
+
const colName = condition.column.trim();
|
|
46
|
+
const paramName = colName.includes(".") ? (_a = colName.split(".").pop()) === null || _a === void 0 ? void 0 : _a.trim() : colName;
|
|
47
|
+
return `${colName} ${condition.operator} @${paramName}`;
|
|
48
|
+
})
|
|
49
|
+
.filter(Boolean)
|
|
50
|
+
.join(" AND ");
|
|
51
|
+
}
|
|
52
|
+
renderOrderBy() {
|
|
53
|
+
if (!this._context.orderBy || this._context.orderBy.length === 0) {
|
|
54
|
+
return "";
|
|
55
|
+
}
|
|
56
|
+
const orderByClauses = this._context.orderBy.map(ob => {
|
|
57
|
+
return `${ob.column} ${ob.direction}`;
|
|
58
|
+
});
|
|
59
|
+
return `ORDER BY ${orderByClauses.join(", ")}`;
|
|
60
|
+
}
|
|
61
|
+
renderGroupBy() {
|
|
62
|
+
if (!this._context.groupBy || this._context.groupBy.length === 0) {
|
|
63
|
+
return "";
|
|
64
|
+
}
|
|
65
|
+
return `GROUP BY ${this._context.groupBy.join(", ")}`;
|
|
66
|
+
}
|
|
67
|
+
renderLimit() {
|
|
68
|
+
if (!this._context.limit) {
|
|
69
|
+
return "";
|
|
70
|
+
}
|
|
71
|
+
return `LIMIT ${this._context.limit}`;
|
|
72
|
+
}
|
|
73
|
+
renderOffset() {
|
|
74
|
+
if (!this._context.offset) {
|
|
75
|
+
return "";
|
|
76
|
+
}
|
|
77
|
+
return `OFFSET ${this._context.offset}`;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { ExtraQueryParameters, QueryWhereCondition, QueryIsEqualParameter } from "../../types/index.js";
|
|
2
|
+
/** Utility class for building SQL query strings */
|
|
3
|
+
export default class oldQueryStatementBuilder {
|
|
4
|
+
/**
|
|
5
|
+
* Build an INSERT SQL statement with named parameter placeholders
|
|
6
|
+
*
|
|
7
|
+
* @param table - The table to insert into
|
|
8
|
+
* @param record - Object containing column names and their placeholder values
|
|
9
|
+
* @returns Complete INSERT SQL statement string with @fieldName placeholders
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const query = QueryStatementBuilder.BuildInsert(usersTable, {
|
|
14
|
+
* name: 'John',
|
|
15
|
+
* email: 'john@example.com',
|
|
16
|
+
* age: 30
|
|
17
|
+
* });
|
|
18
|
+
* // "INSERT INTO users (name, email, age) VALUES (@name, @email, @age)"
|
|
19
|
+
*
|
|
20
|
+
* // Note: The actual values will be bound separately using the Parameters object
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
static BuildInsert(tableName: string, record: QueryIsEqualParameter): string;
|
|
24
|
+
/**
|
|
25
|
+
* Build an UPDATE SQL statement with SET clause and WHERE conditions
|
|
26
|
+
*
|
|
27
|
+
* @param table - The table to update
|
|
28
|
+
* @param record - Object containing columns to update with their placeholder values
|
|
29
|
+
* @param where - Object containing WHERE conditions for targeting specific rows
|
|
30
|
+
* @returns Complete UPDATE SQL statement string with @fieldName placeholders
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const query = QueryStatementBuilder.BuildUpdate(
|
|
35
|
+
* usersTable,
|
|
36
|
+
* { name: 'John Doe', age: 31 },
|
|
37
|
+
* { id: 1 }
|
|
38
|
+
* );
|
|
39
|
+
* // "UPDATE users SET name = @name, age = @age WHERE id = @id"
|
|
40
|
+
*
|
|
41
|
+
* // Multiple WHERE conditions
|
|
42
|
+
* const query = QueryStatementBuilder.BuildUpdate(
|
|
43
|
+
* usersTable,
|
|
44
|
+
* { status: 'inactive' },
|
|
45
|
+
* { status: 'active', last_login: '2023-01-01' }
|
|
46
|
+
* );
|
|
47
|
+
* // "UPDATE users SET status = @status WHERE status = @status AND last_login = @last_login"
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
static BuildUpdate(tableName: string, record: QueryWhereCondition, where: QueryWhereCondition): string;
|
|
51
|
+
/**
|
|
52
|
+
* Build a DELETE SQL statement with WHERE conditions
|
|
53
|
+
*
|
|
54
|
+
* @param table - The table to delete from
|
|
55
|
+
* @param where - Object containing WHERE conditions for targeting specific rows to delete
|
|
56
|
+
* @returns Complete DELETE SQL statement string with @fieldName placeholders
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const query = QueryStatementBuilder.BuildDelete(usersTable, { id: 1 });
|
|
61
|
+
* // "DELETE FROM users WHERE id = @id"
|
|
62
|
+
*
|
|
63
|
+
* // Multiple WHERE conditions
|
|
64
|
+
* const query = QueryStatementBuilder.BuildDelete(usersTable, {
|
|
65
|
+
* status: 'deleted',
|
|
66
|
+
* last_login: '2020-01-01'
|
|
67
|
+
* });
|
|
68
|
+
* // "DELETE FROM users WHERE status = @status AND last_login = @last_login"
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
static BuildDelete(tableName: string, where: QueryWhereCondition): string;
|
|
72
|
+
/**
|
|
73
|
+
* Build a COUNT SQL statement to count rows, optionally with WHERE conditions
|
|
74
|
+
*
|
|
75
|
+
* @param table - The table to count rows from
|
|
76
|
+
* @param where - Optional object containing WHERE conditions to filter counted rows
|
|
77
|
+
* @returns Complete COUNT SQL statement string with @fieldName placeholders
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* // Count all rows
|
|
82
|
+
* const query = QueryStatementBuilder.BuildCount(usersTable);
|
|
83
|
+
* // "SELECT COUNT(*) as count FROM users"
|
|
84
|
+
*
|
|
85
|
+
* // Count with conditions
|
|
86
|
+
* const query = QueryStatementBuilder.BuildCount(usersTable, {
|
|
87
|
+
* status: 'active',
|
|
88
|
+
* age: 25
|
|
89
|
+
* });
|
|
90
|
+
* // "SELECT COUNT(*) as count FROM users WHERE status = @status AND age = @age"
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
static BuildCount(tableName: string, where?: QueryWhereCondition): string;
|
|
94
|
+
/**
|
|
95
|
+
* Build a WHERE clause from parameter conditions (helper method)
|
|
96
|
+
*
|
|
97
|
+
* Joins multiple conditions with AND operator.
|
|
98
|
+
* Returns empty string if no conditions are provided.
|
|
99
|
+
*
|
|
100
|
+
* @param where - Optional object containing WHERE conditions
|
|
101
|
+
* @returns WHERE clause string with @fieldName placeholders, or empty string if no conditions
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* // Single condition
|
|
106
|
+
* const whereClause = QueryStatementBuilder.BuildWhere({ id: 1 });
|
|
107
|
+
* // "WHERE id = @id"
|
|
108
|
+
*
|
|
109
|
+
* // Multiple conditions (joined with AND)
|
|
110
|
+
* const whereClause = QueryStatementBuilder.BuildWhere({
|
|
111
|
+
* status: 'active',
|
|
112
|
+
* age: 25,
|
|
113
|
+
* role: 'admin'
|
|
114
|
+
* });
|
|
115
|
+
* // "WHERE status = @status AND age = @age AND role = @role"
|
|
116
|
+
*
|
|
117
|
+
* // No conditions
|
|
118
|
+
* const whereClause = QueryStatementBuilder.BuildWhere();
|
|
119
|
+
* // ""
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
static BuildWhere(where?: QueryWhereCondition): string;
|
|
123
|
+
private static buildWhereWithOperators;
|
|
124
|
+
private static buildWhereSimple;
|
|
125
|
+
/**
|
|
126
|
+
* Build query options clause (ORDER BY, LIMIT, OFFSET) (helper method)
|
|
127
|
+
*
|
|
128
|
+
* Processes query options and builds the corresponding SQL clauses.
|
|
129
|
+
* Returns empty string if no options are provided.
|
|
130
|
+
*
|
|
131
|
+
* @param options - Object containing orderBy, limit, and/or offset options
|
|
132
|
+
* @returns Query options clause as a string
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* // All options
|
|
137
|
+
* const optionsClause = QueryStatementBuilder.BuildQueryOptions({
|
|
138
|
+
* orderBy: 'created_at DESC',
|
|
139
|
+
* limit: 10,
|
|
140
|
+
* offset: 20
|
|
141
|
+
* });
|
|
142
|
+
* // "ORDER BY created_at DESC LIMIT 10 OFFSET 20"
|
|
143
|
+
*
|
|
144
|
+
* // Just ordering
|
|
145
|
+
* const optionsClause = QueryStatementBuilder.BuildQueryOptions({
|
|
146
|
+
* orderBy: 'name ASC'
|
|
147
|
+
* });
|
|
148
|
+
* // "ORDER BY name ASC"
|
|
149
|
+
*
|
|
150
|
+
* // Pagination only
|
|
151
|
+
* const optionsClause = QueryStatementBuilder.BuildQueryOptions({
|
|
152
|
+
* limit: 25,
|
|
153
|
+
* offset: 50
|
|
154
|
+
* });
|
|
155
|
+
* // "LIMIT 25 OFFSET 50"
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
static BuildQueryOptions(options: ExtraQueryParameters): string;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=oldQueryStatementBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oldQueryStatementBuilder.d.ts","sourceRoot":"","sources":["../../../src/helpers/QueryBuilders/oldQueryStatementBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAA6B,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEnI,mDAAmD;AACnD,MAAM,CAAC,OAAO,OAAO,wBAAwB;IACzC;;;;;;;;;;;;;;;;;;OAkBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,GAAG,MAAM;IAYnF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM;IAW7G;;;;;;;;;;;;;;;;;;;OAmBG;WACW,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,GAAG,MAAM;IAShF;;;;;;;;;;;;;;;;;;;;OAoBG;WACW,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,mBAAmB,GAAG,MAAM;IAQhF;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;WACW,UAAU,CAAC,KAAK,CAAC,EAAE,mBAAmB,GAAG,MAAM;IAgB7D,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAStC,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAK/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;WACW,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;CAiBzE"}
|