data-finder-ts 0.1.0 → 0.1.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/chunk-3SSWFES4.js +448 -0
- package/dist/chunk-3SSWFES4.js.map +1 -0
- package/dist/chunk-5K2Z3YDY.js +393 -0
- package/dist/chunk-5K2Z3YDY.js.map +1 -0
- package/dist/chunk-6QTCGJWX.js +98 -0
- package/dist/chunk-6QTCGJWX.js.map +1 -0
- package/dist/chunk-DFYZVBII.js +652 -0
- package/dist/chunk-DFYZVBII.js.map +1 -0
- package/dist/chunk-EYXBYV2X.js +90 -0
- package/dist/chunk-EYXBYV2X.js.map +1 -0
- package/dist/chunk-FLEIUDZZ.js +14 -0
- package/dist/chunk-FLEIUDZZ.js.map +1 -0
- package/dist/chunk-V647VNMY.js +135 -0
- package/dist/chunk-V647VNMY.js.map +1 -0
- package/dist/datafinder/attribute.cjs +269 -0
- package/dist/datafinder/attribute.cjs.map +1 -0
- package/dist/datafinder/attribute.d.cts +45 -0
- package/dist/datafinder/attribute.d.ts +45 -0
- package/dist/datafinder/attribute.js +8 -0
- package/dist/datafinder/attribute.js.map +1 -0
- package/dist/datafinder/finder-registry.cjs +39 -0
- package/dist/datafinder/finder-registry.cjs.map +1 -0
- package/dist/datafinder/finder-registry.d.cts +4 -0
- package/dist/datafinder/finder-registry.d.ts +4 -0
- package/dist/datafinder/finder-registry.js +9 -0
- package/dist/datafinder/finder-registry.js.map +1 -0
- package/dist/datafinder/runner.cjs +1346 -0
- package/dist/datafinder/runner.cjs.map +1 -0
- package/dist/datafinder/runner.d.cts +33 -0
- package/dist/datafinder/runner.d.ts +33 -0
- package/dist/datafinder/runner.js +20 -0
- package/dist/datafinder/runner.js.map +1 -0
- package/dist/datafinder/sql-generator.cjs +1261 -0
- package/dist/datafinder/sql-generator.cjs.map +1 -0
- package/dist/datafinder/sql-generator.d.cts +17 -0
- package/dist/datafinder/sql-generator.d.ts +17 -0
- package/dist/datafinder/sql-generator.js +17 -0
- package/dist/datafinder/sql-generator.js.map +1 -0
- package/dist/datafinder/typed-attributes.cjs +751 -0
- package/dist/datafinder/typed-attributes.cjs.map +1 -0
- package/dist/datafinder/typed-attributes.d.cts +135 -0
- package/dist/datafinder/typed-attributes.d.ts +135 -0
- package/dist/datafinder/typed-attributes.js +25 -0
- package/dist/datafinder/typed-attributes.js.map +1 -0
- package/dist/index.cjs +1822 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +159 -0
- package/dist/index.js.map +1 -0
- package/dist/model/milestoning.cjs +145 -0
- package/dist/model/milestoning.cjs.map +1 -0
- package/dist/model/milestoning.d.cts +40 -0
- package/dist/model/milestoning.d.ts +40 -0
- package/dist/model/milestoning.js +18 -0
- package/dist/model/milestoning.js.map +1 -0
- package/dist/model/relational.cjs +514 -0
- package/dist/model/relational.cjs.map +1 -0
- package/dist/model/relational.d.cts +246 -0
- package/dist/model/relational.d.ts +246 -0
- package/dist/model/relational.js +91 -0
- package/dist/model/relational.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/datafinder/sql-generator.ts","../../src/model/relational.ts","../../src/datafinder/attribute.ts","../../src/model/milestoning.ts","../../src/datafinder/typed-attributes.ts","../../src/datafinder/finder.ts"],"sourcesContent":["import { Attribute } from './attribute';\nimport {\n RelationalOperationElement,\n Operation,\n NoOperation,\n ConstantOperation,\n StringConstantOperation,\n IntegerConstantOperation,\n FloatConstantOperation,\n DateConstantOperation,\n DateTimeConstantOperation,\n BooleanConstantOperation,\n DecimalConstantOperation,\n LogicalOperation,\n LogicalOperator,\n ComparisonOperation,\n ComparisonOperator,\n IsNullOperation,\n IsNotNullOperation,\n AggregateOperation,\n AggregateOperator,\n ScalarFunctionOperation,\n ScalarFunction,\n DateExtractOperation,\n DateArithmeticOperation,\n DateDiffOperation,\n WindowFunction,\n WindowFunctionOperation,\n WindowSpecification,\n Column,\n ColumnWithJoin,\n Table,\n JoinOperation,\n JoinTreeNodeOperation,\n SortOperation,\n SortDirection,\n CountAllOperation,\n UnaryOperation,\n} from '../model/relational';\nimport {\n MilestonedTable,\n BiTemporalColumns,\n BusinessDateAndProcessingTemporalColumns,\n ProcessingTemporalColumns,\n SingleBusinessDateColumn,\n} from '../model/milestoning';\nimport { DateAttribute, DateTimeAttribute } from './typed-attributes';\nimport { ExistsOperation, NotExistsOperation } from './finder';\n\nclass Alias {\n constructor(readonly element: RelationalOperationElement, readonly name: string) {}\n}\n\nclass TableAlias {\n constructor(readonly table: string, readonly alias: string) {}\n}\n\nclass TableAliasColumn extends RelationalOperationElement {\n constructor(readonly column: Column, readonly tableAlias: TableAlias) { super(); }\n}\n\nclass Join {\n constructor(\n readonly source: TableAliasColumn,\n readonly target: TableAliasColumn,\n readonly filterOp?: RelationalOperationElement,\n ) {}\n}\n\nclass SelectOperation {\n constructor(\n readonly display: (Attribute | RelationalOperationElement)[],\n readonly filter: RelationalOperationElement,\n readonly orderBy: SortOperation[] = [],\n readonly groupBy: Attribute[] = [],\n readonly limit?: number,\n readonly table?: Table,\n ) {}\n}\n\nfunction sqlFormatDatetime(value: Date): string {\n const pad = (n: number, w = 2) => String(n).padStart(w, '0');\n return `'${value.getUTCFullYear()}-${pad(value.getUTCMonth() + 1)}-${pad(value.getUTCDate())} ${pad(value.getUTCHours())}:${pad(value.getUTCMinutes())}:${pad(value.getUTCSeconds())}'`;\n}\n\nfunction sqlFormatDate(value: Date): string {\n const pad = (n: number) => String(n).padStart(2, '0');\n return `'${value.getUTCFullYear()}-${pad(value.getUTCMonth() + 1)}-${pad(value.getUTCDate())}'`;\n}\n\nconst LOGICAL_OPERATOR_STR: Record<LogicalOperator, string> = {\n [LogicalOperator.AND]: ' AND ',\n [LogicalOperator.OR]: ' OR ',\n};\n\nconst COMPARISON_OPERATOR_STR: Record<ComparisonOperator, string> = {\n [ComparisonOperator.EQUAL]: ' = ',\n [ComparisonOperator.NOT_EQUAL]: ' <> ',\n [ComparisonOperator.LESS_THAN]: ' < ',\n [ComparisonOperator.GREATER_THAN]: ' > ',\n [ComparisonOperator.LESS_THAN_OR_EQUAL_TO]: ' <= ',\n [ComparisonOperator.GREATER_THAN_OR_EQUAL_TO]: ' >= ',\n [ComparisonOperator.LIKE]: ' LIKE ',\n [ComparisonOperator.NOT_LIKE]: ' NOT LIKE ',\n};\n\nconst AGGREGATE_SQL_NAMES: Partial<Record<AggregateOperator, string>> = {\n [AggregateOperator.AVERAGE]: 'AVG',\n};\n\nconst WINDOW_SQL_NAMES: Record<WindowFunction, string> = {\n [WindowFunction.ROW_NUMBER]: 'ROW_NUMBER',\n [WindowFunction.RANK]: 'RANK',\n [WindowFunction.DENSE_RANK]: 'DENSE_RANK',\n [WindowFunction.NTILE]: 'NTILE',\n [WindowFunction.LAG]: 'LAG',\n [WindowFunction.LEAD]: 'LEAD',\n [WindowFunction.FIRST_VALUE]: 'FIRST_VALUE',\n [WindowFunction.LAST_VALUE]: 'LAST_VALUE',\n [WindowFunction.CUME_DIST]: 'CUME_DIST',\n [WindowFunction.PERCENT_RANK]: 'PERCENT_RANK',\n};\n\nconst SCALAR_SQL_NAMES: Record<ScalarFunction, string> = {\n [ScalarFunction.ABS]: 'ABS',\n [ScalarFunction.CEILING]: 'CEILING',\n [ScalarFunction.FLOOR]: 'FLOOR',\n [ScalarFunction.MOD]: 'MOD',\n [ScalarFunction.POWER]: 'POWER',\n [ScalarFunction.SQRT]: 'SQRT',\n [ScalarFunction.ROUND]: 'ROUND',\n [ScalarFunction.UPPER]: 'UPPER',\n [ScalarFunction.LOWER]: 'LOWER',\n [ScalarFunction.TRIM]: 'TRIM',\n [ScalarFunction.LTRIM]: 'LTRIM',\n [ScalarFunction.RTRIM]: 'RTRIM',\n [ScalarFunction.LENGTH]: 'LENGTH',\n [ScalarFunction.REVERSE]: 'REVERSE',\n [ScalarFunction.LEFT]: 'LEFT',\n [ScalarFunction.RIGHT]: 'RIGHT',\n [ScalarFunction.REPEAT]: 'REPEAT',\n [ScalarFunction.REPLACE]: 'REPLACE',\n [ScalarFunction.SUBSTRING]: 'SUBSTRING',\n};\n\nfunction constantValueString(op: ConstantOperation): string {\n if (op instanceof StringConstantOperation) return \"'\" + op.value + \"'\";\n if (op instanceof DateConstantOperation) return sqlFormatDate(op.value);\n if (op instanceof DateTimeConstantOperation) return sqlFormatDatetime(op.value);\n if (op instanceof IntegerConstantOperation) return String(op.value);\n if (op instanceof FloatConstantOperation) return String(op.value);\n if (op instanceof BooleanConstantOperation) return op.value ? 'TRUE' : 'FALSE';\n if (op instanceof DecimalConstantOperation) return String(op.value);\n throw new Error('Unknown constant operation');\n}\n\nfunction windowSpecToString(window: WindowSpecification): string {\n const parts: string[] = [];\n if (window.partitionBy.length > 0) {\n parts.push('PARTITION BY ' + window.partitionBy.map(p => sqlOperationToString(p)).join(', '));\n }\n if (window.orderBy.length > 0) {\n parts.push('ORDER BY ' + window.orderBy.map(s =>\n sqlOperationToString(s.column) + (s.direction === SortDirection.ASC ? ' ASC' : ' DESC'),\n ).join(', '));\n }\n return 'OVER (' + parts.join(' ') + ')';\n}\n\nfunction sqlOperationToString(operation: RelationalOperationElement): string {\n if (operation instanceof TableAliasColumn) {\n return operation.tableAlias.alias + '.' + operation.column.name;\n }\n if (operation instanceof WindowFunctionOperation) {\n const fn = WINDOW_SQL_NAMES[operation.func];\n const parts: string[] = [];\n if (operation.element !== null && operation.element !== undefined) {\n parts.push(sqlOperationToString(operation.element));\n }\n if (operation.secondArg !== undefined) parts.push(String(operation.secondArg));\n for (const arg of operation.extraArgs) {\n parts.push(typeof arg === 'string' ? \"'\" + arg + \"'\" : String(arg));\n }\n const sql = fn + '(' + parts.join(', ') + ')';\n return sql + (operation.window !== undefined ? ' ' + windowSpecToString(operation.window) : ' OVER ()');\n }\n if (operation instanceof AggregateOperation) {\n const fn = AGGREGATE_SQL_NAMES[operation.operator] ?? operation.operator;\n let sql = fn + '(' + sqlOperationToString(operation.element) + ')';\n if (operation.window !== undefined) {\n sql += ' ' + windowSpecToString(operation.window);\n }\n return sql;\n }\n if (operation instanceof ScalarFunctionOperation) {\n const fn = SCALAR_SQL_NAMES[operation.func];\n const parts: string[] = [sqlOperationToString(operation.element)];\n if (operation.secondArg !== undefined) parts.push(String(operation.secondArg));\n for (const arg of operation.extraArgs) {\n parts.push(typeof arg === 'string' ? \"'\" + arg + \"'\" : String(arg));\n }\n return fn + '(' + parts.join(', ') + ')';\n }\n if (operation instanceof DateExtractOperation) {\n return 'EXTRACT(' + operation.part + ' FROM ' + sqlOperationToString(operation.element) + ')';\n }\n if (operation instanceof DateArithmeticOperation) {\n const op = operation.isAdd ? '+' : '-';\n return sqlOperationToString(operation.element) + ' ' + op + ' INTERVAL ' + operation.n + ' ' + operation.unit;\n }\n if (operation instanceof DateDiffOperation) {\n const otherSql = sqlFormatDatetime(operation.other);\n return \"DATE_DIFF('\" + operation.unit.toLowerCase() + \"', \" + sqlOperationToString(operation.element) + ', ' + otherSql + ')';\n }\n if (operation instanceof CountAllOperation) return 'COUNT(*)';\n if (operation instanceof Alias) {\n return sqlOperationToString(operation.element) + ' AS \"' + operation.name + '\"';\n }\n throw new TypeError('Unknown operation in sqlOperationToString: ' + operation.constructor.name);\n}\n\nfunction findColumn(operation: RelationalOperationElement): ColumnWithJoin {\n if (operation instanceof UnaryOperation) return findColumn(operation.element);\n if (operation instanceof ColumnWithJoin) return operation;\n throw new TypeError('Cannot find ColumnWithJoin in: ' + operation.constructor.name);\n}\n\nfunction openEndClause(\n endAttr: DateTimeAttribute | DateAttribute,\n value: Date,\n infiniteDatetime?: string,\n): Operation {\n const gtOp = endAttr instanceof DateTimeAttribute ? endAttr.gt(value) : endAttr.gt(value);\n if (infiniteDatetime === undefined) {\n const colRef = new ColumnWithJoin(endAttr.column(), endAttr.parent());\n return new LogicalOperation(gtOp, LogicalOperator.OR, new IsNullOperation(colRef));\n }\n return gtOp;\n}\n\nfunction buildMilestoningFilterOperation(\n businessDate: Date | null,\n processingDatetime: Date | null,\n table: MilestonedTable,\n joinNode?: JoinTreeNodeOperation,\n): Operation | null {\n const mc = table.milestoningColumns;\n const ops: Operation[] = [];\n\n if (mc instanceof BiTemporalColumns) {\n if (businessDate !== null) {\n const dateFrom = new DateAttribute('business_date_from', mc.businessDateFromColumn.name, mc.businessDateFromColumn.type, mc.businessDateFromColumn.table!.qualifiedName, joinNode);\n const dateTo = new DateAttribute('business_date_to', mc.businessDateToColumn.name, mc.businessDateToColumn.type, mc.businessDateToColumn.table!.qualifiedName, joinNode);\n ops.push(new LogicalOperation(dateFrom.lte(businessDate), LogicalOperator.AND, openEndClause(dateTo, businessDate, mc.infiniteDatetime)));\n }\n if (processingDatetime !== null) {\n const startAt = new DateTimeAttribute('start_at', mc.startAtColumn.name, mc.startAtColumn.type, mc.startAtColumn.table!.qualifiedName, joinNode);\n const endAt = new DateTimeAttribute('end_at', mc.endAtColumn.name, mc.endAtColumn.type, mc.endAtColumn.table!.qualifiedName, joinNode);\n ops.push(new LogicalOperation(startAt.lte(processingDatetime), LogicalOperator.AND, openEndClause(endAt, processingDatetime, mc.infiniteDatetime)));\n }\n } else if (mc instanceof BusinessDateAndProcessingTemporalColumns) {\n if (businessDate !== null) {\n const businessAtt = new DateAttribute('business_date', mc.businessDateColumn.name, mc.businessDateColumn.type, mc.businessDateColumn.table!.qualifiedName, joinNode);\n ops.push(businessAtt.eq(businessDate));\n }\n if (processingDatetime !== null) {\n const startAt = new DateTimeAttribute('start_at', mc.startAtColumn.name, mc.startAtColumn.type, mc.startAtColumn.table!.qualifiedName, joinNode);\n const endAt = new DateTimeAttribute('end_at', mc.endAtColumn.name, mc.endAtColumn.type, mc.endAtColumn.table!.qualifiedName, joinNode);\n ops.push(new LogicalOperation(startAt.lte(processingDatetime), LogicalOperator.AND, openEndClause(endAt, processingDatetime, mc.infiniteDatetime)));\n }\n } else if (mc instanceof ProcessingTemporalColumns && processingDatetime !== null) {\n const startAt = new DateTimeAttribute('start_at', mc.startAtColumn.name, mc.startAtColumn.type, mc.startAtColumn.table!.qualifiedName, joinNode);\n const endAt = new DateTimeAttribute('end_at', mc.endAtColumn.name, mc.endAtColumn.type, mc.endAtColumn.table!.qualifiedName, joinNode);\n ops.push(new LogicalOperation(startAt.lte(processingDatetime), LogicalOperator.AND, openEndClause(endAt, processingDatetime, mc.infiniteDatetime)));\n } else if (mc instanceof SingleBusinessDateColumn && businessDate !== null) {\n const businessAtt = new DateAttribute('business_date', mc.businessDateColumn.name, mc.businessDateColumn.type, mc.businessDateColumn.table!.qualifiedName, joinNode);\n ops.push(businessAtt.eq(businessDate));\n }\n\n if (ops.length === 0) return null;\n if (ops.length === 1) return ops[0];\n return new LogicalOperation(ops[0], LogicalOperator.AND, ops[1]);\n}\n\nfunction buildQueryOperation(\n businessDate: Date | null,\n processingDatetime: Date | null,\n columns: (Attribute | RelationalOperationElement)[],\n table: Table,\n op: RelationalOperationElement,\n orderBy: SortOperation[] = [],\n groupBy: Attribute[] = [],\n limit?: number,\n): SelectOperation {\n let filter = op;\n\n if (table instanceof MilestonedTable) {\n const milestonedOp = buildMilestoningFilterOperation(businessDate, processingDatetime, table);\n if (milestonedOp !== null) {\n filter = filter instanceof NoOperation\n ? milestonedOp\n : new LogicalOperation(filter, LogicalOperator.AND, milestonedOp);\n }\n }\n\n const requiredJoins: JoinTreeNodeOperation[] = [];\n const requiredJoinIds = new Set<JoinTreeNodeOperation>();\n\n for (const col of columns) {\n if (col instanceof CountAllOperation) continue;\n let node: JoinTreeNodeOperation | undefined;\n if (col instanceof Attribute) {\n node = col.parent();\n } else {\n node = findColumn(col as RelationalOperationElement).parent;\n }\n if (node !== undefined && !requiredJoinIds.has(node)) {\n requiredJoinIds.add(node);\n requiredJoins.push(node);\n }\n }\n\n for (const node of requiredJoins) {\n if (node.join.target instanceof MilestonedTable) {\n const milestonedOp = buildMilestoningFilterOperation(businessDate, processingDatetime, node.join.target, node);\n if (milestonedOp !== null) {\n node.join.filter = milestonedOp;\n }\n }\n }\n\n return new SelectOperation(columns, filter, orderBy, groupBy, limit, table);\n}\n\nclass SQLQueryGenerator {\n private _select: Alias[] = [];\n private _from: Set<TableAlias> = new Set();\n private _join: Join[] = [];\n private _groupByParts: string[] = [];\n private _orderByParts: string[] = [];\n private _where = '';\n private _limit?: number;\n private _tableAliasIncr = 0;\n private _tableAliasesByTable = new Map<unknown, TableAlias>();\n private _addedJoinIds = new Set<JoinTreeNodeOperation>();\n private _rootTable?: Table;\n\n generate(select: SelectOperation): void {\n this._rootTable = select.table;\n if (this._rootTable !== undefined) {\n this._from.add(this._tableAliasForTable(this._rootTable.qualifiedName, this._rootTable.qualifiedName));\n }\n this.processSelect(select.display);\n this._where = this.buildFilter(select.filter);\n const groupByJoins = new Map<JoinTreeNodeOperation, JoinTreeNodeOperation>();\n for (const expr of select.groupBy) {\n this._collectRequiredJoins(expr, groupByJoins);\n }\n for (const node of groupByJoins.values()) {\n this._addJoin(node);\n }\n this._groupByParts = select.groupBy.map(a => this._attrToColString(a));\n this._orderByParts = select.orderBy.map(s =>\n this.buildFilter(s.column) + (s.direction === SortDirection.ASC ? ' ASC' : ' DESC'),\n );\n this._limit = select.limit;\n }\n\n private _attrToColString(attr: Attribute): string {\n const node = attr.parent();\n const ta = this._tableAliasForTable(attr.owner(), node ?? attr.owner());\n return ta.alias + '.' + attr.column().name;\n }\n\n private _collectRequiredJoins(op: RelationalOperationElement | null | undefined, out: Map<JoinTreeNodeOperation, JoinTreeNodeOperation>): void {\n if (op === null || op === undefined) return;\n if (op instanceof Attribute) {\n const p = op.parent();\n if (p !== undefined) out.set(p, p);\n } else if (op instanceof ColumnWithJoin) {\n if (op.parent !== undefined) out.set(op.parent, op.parent);\n } else if (op instanceof AggregateOperation) {\n this._collectRequiredJoins(op.element, out);\n if (op.window) this._collectRequiredJoins(op.window as unknown as RelationalOperationElement, out);\n } else if (op instanceof WindowFunctionOperation) {\n if (op.element) this._collectRequiredJoins(op.element, out);\n if (op.window) this._collectRequiredJoinsFromWindowSpec(op.window, out);\n } else if (op instanceof ScalarFunctionOperation || op instanceof DateExtractOperation ||\n op instanceof DateArithmeticOperation || op instanceof DateDiffOperation) {\n this._collectRequiredJoins((op as UnaryOperation).element, out);\n } else if (op instanceof SortOperation) {\n this._collectRequiredJoins(op.column, out);\n } else if (op instanceof LogicalOperation || op instanceof ComparisonOperation) {\n this._collectRequiredJoins((op as any).left, out);\n this._collectRequiredJoins((op as any).right, out);\n }\n }\n\n private _collectRequiredJoinsFromWindowSpec(window: WindowSpecification, out: Map<JoinTreeNodeOperation, JoinTreeNodeOperation>): void {\n for (const p of window.partitionBy) {\n this._collectRequiredJoins(p, out);\n }\n for (const s of window.orderBy) {\n this._collectRequiredJoins(s.column, out);\n }\n }\n\n private _rewriteWindowSpec(window: WindowSpecification): WindowSpecification {\n const partitionBy = window.partitionBy.map(p => this._rewriteOperation(p));\n const orderBy = window.orderBy.map(s => new SortOperation(this._rewriteOperation(s.column) as ColumnWithJoin, s.direction));\n return new WindowSpecification(partitionBy, orderBy);\n }\n\n private _rewriteOperation(op: RelationalOperationElement): RelationalOperationElement {\n if (op instanceof Attribute) {\n const ta = this._tableAliasForTable(op.owner(), op.parent() ?? op.owner());\n return new TableAliasColumn(op.column(), ta);\n }\n if (op instanceof ColumnWithJoin) {\n const ta = op.parent !== undefined\n ? this._tableAliasForTable(op.column.owner!, op.parent)\n : this._tableAliasForTable(op.column.owner!, op.column.owner!);\n return new TableAliasColumn(op.column, ta);\n }\n if (op instanceof Column) {\n const ta = this._tableAliasForTable(op.owner!, op.owner!);\n return new TableAliasColumn(op, ta);\n }\n if (op instanceof AggregateOperation) {\n return new AggregateOperation(\n this._rewriteOperation(op.element), op.operator, op.displayName,\n op.window ? this._rewriteWindowSpec(op.window) : undefined,\n );\n }\n if (op instanceof WindowFunctionOperation) {\n const el = op.element ? this._rewriteOperation(op.element) : null;\n return new WindowFunctionOperation(el, op.func, op.displayName, op.secondArg, [...op.extraArgs],\n op.window ? this._rewriteWindowSpec(op.window) : undefined);\n }\n if (op instanceof ScalarFunctionOperation) {\n return new ScalarFunctionOperation(this._rewriteOperation(op.element), op.func, op.displayName, op.secondArg, op.extraArgs);\n }\n if (op instanceof DateExtractOperation) {\n return new DateExtractOperation(this._rewriteOperation(op.element), op.part, op.displayName);\n }\n if (op instanceof DateArithmeticOperation) {\n return new DateArithmeticOperation(this._rewriteOperation(op.element), op.n, op.unit, op.isAdd, op.displayName);\n }\n if (op instanceof DateDiffOperation) {\n return new DateDiffOperation(this._rewriteOperation(op.element), (op as DateDiffOperation).other, (op as DateDiffOperation).unit, op.displayName);\n }\n return op;\n }\n\n private processSelect(cols: (Attribute | RelationalOperationElement)[]): void {\n const requiredJoins = new Map<JoinTreeNodeOperation, JoinTreeNodeOperation>();\n\n for (const col of cols) {\n this._collectRequiredJoins(col, requiredJoins);\n }\n for (const node of requiredJoins.values()) {\n this._addJoin(node);\n }\n\n for (const col of cols) {\n if (col instanceof Attribute) {\n const node = col.parent();\n let ta: TableAlias;\n if (node !== undefined) {\n ta = this._tableAliasForTable(col.owner(), node);\n } else {\n ta = this._tableAliasForTable(col.owner(), col.owner());\n this._from.add(ta);\n }\n this._select.push(new Alias(new TableAliasColumn(col.column(), ta), col.displayName()));\n } else if (col instanceof WindowFunctionOperation) {\n const rewritten = this._rewriteOperation(col) as WindowFunctionOperation;\n let alias: string;\n if (col.displayName) {\n alias = col.displayName;\n } else if ([WindowFunction.ROW_NUMBER, WindowFunction.RANK, WindowFunction.DENSE_RANK].includes(col.func)) {\n alias = col.func.replace(/_/g, ' ').replace(/\\b\\w/g, c => c.toUpperCase());\n } else if (col.element) {\n alias = col.func + ' ' + findColumn(col).column.name;\n } else {\n alias = col.func;\n }\n this._select.push(new Alias(rewritten, alias));\n } else if (col instanceof AggregateOperation) {\n const colNested = findColumn(col);\n const node = colNested.parent;\n let ta: TableAlias;\n if (node !== undefined) {\n ta = this._tableAliasForTable(colNested.column.owner!, node);\n } else {\n ta = this._tableAliasForTable(colNested.column.owner!, colNested.column.owner!);\n this._from.add(ta);\n }\n const alias = col.displayName ?? col.operator + ' ' + colNested.column.name;\n const rewrittenAgg = new AggregateOperation(\n new TableAliasColumn(colNested.column, ta), col.operator, undefined,\n col.window ? this._rewriteWindowSpec(col.window) : undefined,\n );\n this._select.push(new Alias(rewrittenAgg, alias));\n } else if (col instanceof ScalarFunctionOperation) {\n const colNested = findColumn(col);\n const node = colNested.parent;\n let ta: TableAlias;\n if (node !== undefined) {\n ta = this._tableAliasForTable(colNested.column.owner!, node);\n } else {\n ta = this._tableAliasForTable(colNested.column.owner!, colNested.column.owner!);\n this._from.add(ta);\n }\n const alias = col.displayName ?? col.func + ' ' + colNested.column.name;\n this._select.push(new Alias(\n new ScalarFunctionOperation(new TableAliasColumn(colNested.column, ta), col.func, undefined, col.secondArg, col.extraArgs),\n alias,\n ));\n } else if (col instanceof DateExtractOperation || col instanceof DateArithmeticOperation || col instanceof DateDiffOperation) {\n const colNested = findColumn(col as RelationalOperationElement);\n const node = colNested.parent;\n let ta: TableAlias;\n if (node !== undefined) {\n ta = this._tableAliasForTable(colNested.column.owner!, node);\n } else {\n ta = this._tableAliasForTable(colNested.column.owner!, colNested.column.owner!);\n this._from.add(ta);\n }\n const alias = (col as DateExtractOperation).displayName ?? colNested.column.name;\n let aliasedOp: RelationalOperationElement;\n if (col instanceof DateExtractOperation) {\n aliasedOp = new DateExtractOperation(new TableAliasColumn(colNested.column, ta), col.part);\n } else if (col instanceof DateArithmeticOperation) {\n aliasedOp = new DateArithmeticOperation(new TableAliasColumn(colNested.column, ta), col.n, col.unit, col.isAdd);\n } else {\n aliasedOp = new DateDiffOperation(new TableAliasColumn(colNested.column, ta), (col as DateDiffOperation).other, (col as DateDiffOperation).unit);\n }\n this._select.push(new Alias(aliasedOp, alias));\n } else if (col instanceof CountAllOperation) {\n const ta = this._tableAliasForTable(col.table, col.table);\n this._from.add(ta);\n this._select.push(new Alias(col, 'Count'));\n }\n }\n }\n\n private _addJoin(node: JoinTreeNodeOperation): void {\n if (this._addedJoinIds.has(node)) return;\n if (node.parent !== undefined) this._addJoin(node.parent);\n this._addedJoinIds.add(node);\n\n const join = node.join;\n const left = join.left;\n const srcTa = this._tableAliasForTable(left.owner!, node.parent ?? left.owner!);\n if (node.parent === undefined) this._from.add(srcTa);\n const sc = new TableAliasColumn(left, srcTa);\n const right = join.right;\n const tc = new TableAliasColumn(right, this._tableAliasForTable(right.owner!, node));\n this._join.push(new Join(sc, tc, join.filter));\n }\n\n buildFilter(op: RelationalOperationElement): string {\n if (op instanceof NoOperation) return '';\n if (op instanceof ExistsOperation) {\n const col = op.node.join.right;\n return this.buildFilter(new ColumnWithJoin(col, op.node)) + ' IS NOT NULL';\n }\n if (op instanceof NotExistsOperation) {\n const col = op.node.join.right;\n return this.buildFilter(new ColumnWithJoin(col, op.node)) + ' IS NULL';\n }\n if (op instanceof IsNotNullOperation) return this.buildFilter(op.element) + ' IS NOT NULL';\n if (op instanceof IsNullOperation) return this.buildFilter(op.element) + ' IS NULL';\n if (op instanceof LogicalOperation) {\n let left = this.buildFilter(op.left);\n let right = this.buildFilter(op.right);\n if (op.left instanceof LogicalOperation) left = '(' + left + ')';\n if (op.right instanceof LogicalOperation) right = '(' + right + ')';\n return left + LOGICAL_OPERATOR_STR[op.operator] + right;\n }\n if (op instanceof ComparisonOperation) {\n return this.buildFilter(op.left) + COMPARISON_OPERATOR_STR[op.operator] + this.buildFilter(op.right);\n }\n if (op instanceof ConstantOperation) return constantValueString(op);\n if (op instanceof ColumnWithJoin) {\n const node = op.parent;\n let ta: TableAlias;\n if (node !== undefined) {\n ta = this._tableAliasForTable(op.column.owner!, node);\n this._addJoin(node);\n } else {\n ta = this._tableAliasForTable(op.column.owner!, op.column.owner!);\n }\n return ta.alias + '.' + op.column.name;\n }\n if (op instanceof Column) {\n const ta = this._tableAliasForTable(op.owner!, op.owner!);\n return ta.alias + '.' + op.name;\n }\n throw new Error('Unknown operation in buildFilter: ' + op.constructor.name);\n }\n\n private _tableAliasForTable(table: string, key: unknown): TableAlias {\n if (this._tableAliasesByTable.has(key)) {\n return this._tableAliasesByTable.get(key)!;\n }\n const ta = new TableAlias(table, 't' + this._tableAliasIncr++);\n this._tableAliasesByTable.set(key, ta);\n return ta;\n }\n\n buildQueryString(): string {\n const joins = this._join.map(j =>\n ' LEFT OUTER JOIN ' + j.target.tableAlias.table + ' AS ' + j.target.tableAlias.alias +\n ' ON ' + j.source.tableAlias.alias + '.' + j.source.column.name +\n ' = ' + j.target.tableAlias.alias + '.' + j.target.column.name +\n (j.filterOp ? ' AND ' + this.buildFilter(j.filterOp) : ''),\n );\n\n return 'SELECT ' + this._select.map(ca => sqlOperationToString(ca)).join(',') +\n ' FROM ' + Array.from(this._from).map(ta => ta.table + ' AS ' + ta.alias).join(',') +\n joins.join('') +\n this._buildWhere() +\n this._buildGroupBy() +\n this._buildOrderBy() +\n this._buildLimit();\n }\n\n private _buildWhere(): string {\n return this._where.length > 0 ? ' WHERE ' + this._where : '';\n }\n private _buildGroupBy(): string {\n return this._groupByParts.length > 0 ? ' GROUP BY ' + this._groupByParts.join(', ') : '';\n }\n private _buildOrderBy(): string {\n return this._orderByParts.length > 0 ? ' ORDER BY ' + this._orderByParts.join(', ') : '';\n }\n private _buildLimit(): string {\n return this._limit !== undefined ? ' LIMIT ' + this._limit : '';\n }\n}\n\nexport function selectSqlToString(selectOperation: SelectOperation): string {\n const qg = new SQLQueryGenerator();\n qg.generate(selectOperation);\n return qg.buildQueryString();\n}\n\nexport function toSql(\n businessDate: Date | null,\n processingDatetime: Date | null,\n columns: (Attribute | RelationalOperationElement)[],\n table: Table,\n op: RelationalOperationElement,\n orderBy: SortOperation[] = [],\n groupBy: Attribute[] = [],\n limit?: number,\n): string {\n const selectOp = buildQueryOperation(businessDate, processingDatetime, columns, table, op, orderBy, groupBy, limit);\n return selectSqlToString(selectOp);\n}\n\nexport { buildQueryOperation, SelectOperation };\n","export enum ComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n LESS_THAN = 'LESS_THAN',\n GREATER_THAN = 'GREATER_THAN',\n LESS_THAN_OR_EQUAL_TO = 'LESS_THAN_OR_EQUAL_TO',\n GREATER_THAN_OR_EQUAL_TO = 'GREATER_THAN_OR_EQUAL_TO',\n LIKE = 'LIKE',\n NOT_LIKE = 'NOT_LIKE',\n}\n\nexport enum LogicalOperator {\n AND = 'AND',\n OR = 'OR',\n}\n\nexport enum AggregateOperator {\n COUNT = 'COUNT',\n SUM = 'SUM',\n MIN = 'MIN',\n MAX = 'MAX',\n AVERAGE = 'AVERAGE',\n}\n\nexport enum ScalarFunction {\n ABS = 'ABS',\n CEILING = 'CEILING',\n FLOOR = 'FLOOR',\n MOD = 'MOD',\n POWER = 'POWER',\n SQRT = 'SQRT',\n ROUND = 'ROUND',\n UPPER = 'UPPER',\n LOWER = 'LOWER',\n TRIM = 'TRIM',\n LTRIM = 'LTRIM',\n RTRIM = 'RTRIM',\n LENGTH = 'LENGTH',\n REVERSE = 'REVERSE',\n LEFT = 'LEFT',\n RIGHT = 'RIGHT',\n REPEAT = 'REPEAT',\n REPLACE = 'REPLACE',\n SUBSTRING = 'SUBSTRING',\n}\n\nexport enum DatePart {\n YEAR = 'YEAR',\n MONTH = 'MONTH',\n DAY = 'DAY',\n HOUR = 'HOUR',\n MINUTE = 'MINUTE',\n SECOND = 'SECOND',\n QUARTER = 'QUARTER',\n WEEK = 'WEEK',\n DOW = 'DOW',\n}\n\nexport enum SortDirection {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport abstract class RelationalOperationElement {}\n\nexport abstract class Operation extends RelationalOperationElement {\n andOp(other: RelationalOperationElement): Operation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n}\n\nexport class NoOperation extends Operation {\n andOp(other: RelationalOperationElement): Operation {\n return other as Operation;\n }\n}\n\nexport abstract class ConstantOperation extends RelationalOperationElement {}\n\nexport class IntegerConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class FloatConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class StringConstantOperation extends ConstantOperation {\n constructor(readonly value: string) { super(); }\n}\n\nexport class DateConstantOperation extends ConstantOperation {\n constructor(readonly value: Date) { super(); }\n}\n\nexport class DateTimeConstantOperation extends ConstantOperation {\n constructor(readonly value: Date) { super(); }\n}\n\nexport class DecimalConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class BooleanConstantOperation extends ConstantOperation {\n constructor(readonly value: boolean) { super(); }\n}\n\nexport abstract class UnaryOperation extends Operation {\n constructor(readonly element: RelationalOperationElement) { super(); }\n}\n\nexport abstract class BinaryOperation extends Operation {\n constructor(\n readonly left: RelationalOperationElement,\n readonly right: RelationalOperationElement,\n ) { super(); }\n}\n\nexport class IsNullOperation extends UnaryOperation {}\n\nexport class IsNotNullOperation extends UnaryOperation {}\n\nexport class ComparisonOperation extends BinaryOperation {\n constructor(\n left: RelationalOperationElement,\n readonly operator: ComparisonOperator,\n right: RelationalOperationElement,\n ) { super(left, right); }\n}\n\nexport class LogicalOperation extends BinaryOperation {\n constructor(\n left: RelationalOperationElement,\n readonly operator: LogicalOperator,\n right: RelationalOperationElement,\n ) { super(left, right); }\n}\n\nexport class WindowSpecification {\n constructor(\n readonly partitionBy: RelationalOperationElement[] = [],\n readonly orderBy: SortOperation[] = [],\n ) {}\n}\n\nexport class AggregateOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly operator: AggregateOperator,\n readonly displayName?: string,\n readonly window?: WindowSpecification,\n ) { super(element); }\n\n over(partitionBy?: RelationalOperationElement[], orderBy?: SortOperation[]): AggregateOperation {\n return new AggregateOperation(this.element, this.operator, this.displayName,\n new WindowSpecification(partitionBy ?? [], orderBy ?? []));\n }\n}\n\nexport enum WindowFunction {\n ROW_NUMBER = 'ROW_NUMBER',\n RANK = 'RANK',\n DENSE_RANK = 'DENSE_RANK',\n NTILE = 'NTILE',\n LAG = 'LAG',\n LEAD = 'LEAD',\n FIRST_VALUE = 'FIRST_VALUE',\n LAST_VALUE = 'LAST_VALUE',\n CUME_DIST = 'CUME_DIST',\n PERCENT_RANK = 'PERCENT_RANK',\n}\n\nexport class WindowFunctionOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement | null,\n readonly func: WindowFunction,\n readonly displayName?: string,\n readonly secondArg?: number,\n readonly extraArgs: (string | number)[] = [],\n readonly window?: WindowSpecification,\n ) { super(element as RelationalOperationElement); }\n\n over(partitionBy?: RelationalOperationElement[], orderBy?: SortOperation[]): WindowFunctionOperation {\n return new WindowFunctionOperation(this.element, this.func, this.displayName, this.secondArg,\n [...this.extraArgs], new WindowSpecification(partitionBy ?? [], orderBy ?? []));\n }\n}\n\nexport class ScalarFunctionOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly func: ScalarFunction,\n readonly displayName?: string,\n readonly secondArg?: number,\n readonly extraArgs: (string | number)[] = [],\n ) { super(element); }\n}\n\nexport class DateExtractOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly part: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class DateArithmeticOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly n: number,\n readonly unit: DatePart,\n readonly isAdd: boolean = true,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class DateDiffOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly other: Date,\n readonly unit: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class Column extends RelationalOperationElement {\n table?: Table;\n\n constructor(\n readonly name: string,\n readonly type: string,\n readonly owner?: string,\n readonly primaryKey: boolean = false,\n ) { super(); }\n}\n\nexport class ForeignKey {\n constructor(readonly column: Column, readonly references: Column) {}\n}\n\nexport abstract class DataStore {\n readonly schemas: Schema[] = [];\n\n constructor(readonly name: string) {}\n\n abstract namespace(schemaName: string): string;\n}\n\nexport class Database extends DataStore {\n constructor(name: string, readonly location?: string) { super(name); }\n\n namespace(schemaName: string): string { return schemaName; }\n}\n\nexport class DataCatalog extends DataStore {\n constructor(name: string) { super(name); }\n\n namespace(schemaName: string): string { return `${this.name}.${schemaName}`; }\n}\n\nexport class Schema {\n readonly tables: Table[] = [];\n\n constructor(readonly name: string, readonly datastore?: DataStore) {\n datastore?.schemas.push(this);\n }\n}\n\nexport class Table {\n private readonly _columnsByName: Map<string, Column> = new Map();\n readonly foreignKeys: ForeignKey[] = [];\n\n constructor(readonly name: string, columns: Column[], readonly schema?: Schema) {\n for (const col of columns) {\n if (this._columnsByName.has(col.name)) {\n throw new Error(`Duplicate column name '${col.name}' in table '${name}'`);\n }\n this._columnsByName.set(col.name, col);\n col.table = this;\n }\n schema?.tables.push(this);\n }\n\n get columns(): Column[] {\n return Array.from(this._columnsByName.values());\n }\n\n get qualifiedName(): string {\n if (!this.schema) return this.name;\n if (!this.schema.datastore) return `${this.schema.name}.${this.name}`;\n return `${this.schema.datastore.namespace(this.schema.name)}.${this.name}`;\n }\n}\n\nexport class JoinOperation {\n filter?: RelationalOperationElement;\n\n constructor(\n readonly name: string,\n readonly target: Table,\n readonly left: Column,\n readonly right: Column,\n filter?: RelationalOperationElement,\n ) {\n this.filter = filter;\n }\n}\n\nexport class JoinTreeNodeOperation {\n constructor(\n readonly join: JoinOperation,\n readonly parent?: JoinTreeNodeOperation,\n ) {}\n}\n\nexport class ColumnWithJoin extends RelationalOperationElement {\n constructor(\n readonly column: Column,\n readonly parent?: JoinTreeNodeOperation,\n ) { super(); }\n}\n\nexport class SortOperation {\n constructor(\n readonly column: ColumnWithJoin,\n readonly direction: SortDirection,\n ) {}\n}\n\nexport class CountAllOperation extends RelationalOperationElement {\n constructor(readonly table: string) { super(); }\n}\n","import {\n Column,\n AggregateOperation,\n AggregateOperator,\n ColumnWithJoin,\n SortOperation,\n SortDirection,\n IsNullOperation,\n IsNotNullOperation,\n JoinTreeNodeOperation,\n WindowFunction,\n WindowFunctionOperation,\n WindowSpecification,\n} from '../model/relational';\n\nexport abstract class Attribute {\n private readonly _displayName: string;\n private readonly _column: Column;\n private readonly _owner: string;\n private readonly _parent?: JoinTreeNodeOperation;\n\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) {\n this._displayName = displayName;\n this._column = new Column(columnName, columnDbType, owner);\n this._owner = owner;\n this._parent = parent;\n }\n\n column(): Column { return this._column; }\n owner(): string { return this._owner; }\n parent(): JoinTreeNodeOperation | undefined { return this._parent; }\n displayName(): string { return this._displayName; }\n\n cwj(): ColumnWithJoin {\n return new ColumnWithJoin(this._column, this._parent);\n }\n\n count(): AggregateOperation {\n return new AggregateOperation(\n new ColumnWithJoin(this._column, this._parent),\n AggregateOperator.COUNT,\n this._displayName + ' Count',\n );\n }\n\n ascending(): SortOperation {\n return new SortOperation(new ColumnWithJoin(this._column, this._parent), SortDirection.ASC);\n }\n\n descending(): SortOperation {\n return new SortOperation(new ColumnWithJoin(this._column, this._parent), SortDirection.DESC);\n }\n\n isNull(): IsNullOperation {\n return new IsNullOperation(new ColumnWithJoin(this._column, this._parent));\n }\n\n isNotNull(): IsNotNullOperation {\n return new IsNotNullOperation(new ColumnWithJoin(this._column, this._parent));\n }\n\n private _windowSpec(\n partitionBy?: ColumnWithJoin | ColumnWithJoin[],\n orderBy?: SortOperation | SortOperation[],\n ): WindowSpecification {\n const pb = partitionBy === undefined ? [] : Array.isArray(partitionBy) ? partitionBy : [partitionBy];\n const ob = orderBy === undefined ? [] : Array.isArray(orderBy) ? orderBy : [orderBy];\n return new WindowSpecification(pb, ob);\n }\n\n rank(opts: {\n method?: 'min' | 'dense' | 'first';\n pct?: boolean;\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n const { method = 'min', pct = false, partitionBy, orderBy } = opts;\n let func: WindowFunction;\n let name: string;\n if (pct) {\n if (method === 'max' as string) { func = WindowFunction.CUME_DIST; name = 'Cume Dist'; }\n else { func = WindowFunction.PERCENT_RANK; name = 'Percent Rank'; }\n } else if (method === 'first') { func = WindowFunction.ROW_NUMBER; name = 'Row Number'; }\n else if (method === 'dense') { func = WindowFunction.DENSE_RANK; name = 'Dense Rank'; }\n else { func = WindowFunction.RANK; name = 'Rank'; }\n return new WindowFunctionOperation(null, func, name, undefined, [], this._windowSpec(partitionBy, orderBy));\n }\n\n qcut(buckets: number, opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(null, WindowFunction.NTILE, 'Quantile', buckets, [],\n this._windowSpec(opts.partitionBy, opts.orderBy));\n }\n\n shift(periods = 1, opts: {\n fillValue?: string | number;\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n const extraArgs: (string | number)[] = opts.fillValue !== undefined ? [opts.fillValue] : [];\n const func = periods >= 0 ? WindowFunction.LAG : WindowFunction.LEAD;\n const label = periods >= 0 ? 'Lag' : 'Lead';\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n func,\n label + ' ' + this._displayName,\n Math.abs(periods),\n extraArgs,\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n first(opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n WindowFunction.FIRST_VALUE,\n 'First ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n last(opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n WindowFunction.LAST_VALUE,\n 'Last ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n}\n","import { Column, Table, Schema } from './relational';\n\nexport abstract class MilestoningColumns {\n abstract columns(): Column[];\n}\n\nexport class ProcessingTemporalColumns extends MilestoningColumns {\n constructor(\n readonly startAtColumn: Column,\n readonly endAtColumn: Column,\n readonly infiniteDatetime?: string,\n ) { super(); }\n\n columns(): Column[] { return [this.startAtColumn, this.endAtColumn]; }\n}\n\nexport class SingleBusinessDateColumn extends MilestoningColumns {\n constructor(readonly businessDateColumn: Column) { super(); }\n\n columns(): Column[] { return [this.businessDateColumn]; }\n}\n\nexport class BusinessDateAndProcessingTemporalColumns extends MilestoningColumns {\n constructor(\n readonly businessDateColumn: Column,\n readonly startAtColumn: Column,\n readonly endAtColumn: Column,\n readonly infiniteDatetime?: string,\n ) { super(); }\n\n columns(): Column[] {\n return [this.businessDateColumn, this.startAtColumn, this.endAtColumn];\n }\n}\n\nexport class BiTemporalColumns extends MilestoningColumns {\n constructor(\n readonly businessDateFromColumn: Column,\n readonly businessDateToColumn: Column,\n readonly startAtColumn: Column,\n readonly endAtColumn: Column,\n readonly infiniteDatetime?: string,\n ) { super(); }\n\n columns(): Column[] {\n return [\n this.businessDateFromColumn,\n this.businessDateToColumn,\n this.startAtColumn,\n this.endAtColumn,\n ];\n }\n}\n\nexport class MilestonedTable extends Table {\n constructor(\n name: string,\n columns: Column[],\n readonly milestoningColumns: MilestoningColumns,\n schema?: Schema,\n ) {\n super(name, columns, schema);\n for (const col of milestoningColumns.columns()) {\n col.table = this;\n }\n }\n}\n","import { Attribute } from './attribute';\nimport {\n ComparisonOperation,\n ComparisonOperator,\n Operation,\n StringConstantOperation,\n FloatConstantOperation,\n IntegerConstantOperation,\n DateConstantOperation,\n DateTimeConstantOperation,\n BooleanConstantOperation,\n DecimalConstantOperation,\n AggregateOperation,\n AggregateOperator,\n ScalarFunction,\n ScalarFunctionOperation,\n DatePart,\n DateExtractOperation,\n DateArithmeticOperation,\n DateDiffOperation,\n JoinTreeNodeOperation,\n} from '../model/relational';\n\nexport class StringAttribute extends Attribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n upper(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.UPPER, 'Upper ' + this.displayName());\n }\n lower(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LOWER, 'Lower ' + this.displayName());\n }\n strip(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.TRIM, 'Strip ' + this.displayName());\n }\n lstrip(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LTRIM, 'LStrip ' + this.displayName());\n }\n rstrip(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.RTRIM, 'RStrip ' + this.displayName());\n }\n length(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LENGTH, 'Length ' + this.displayName());\n }\n reverse(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REVERSE, 'Reverse ' + this.displayName());\n }\n left(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LEFT, 'Left ' + this.displayName(), n);\n }\n right(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.RIGHT, 'Right ' + this.displayName(), n);\n }\n repeat(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REPEAT, 'Repeat ' + this.displayName(), n);\n }\n replace(fromStr: string, toStr: string): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REPLACE, 'Replace ' + this.displayName(), undefined, [fromStr, toStr]);\n }\n substring(start: number, length?: number): ScalarFunctionOperation {\n // Python convention: 0-based start; SQL SUBSTRING is 1-based, so add 1\n const args: (number)[] = length !== undefined ? [start + 1, length] : [start + 1];\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.SUBSTRING, 'Substring ' + this.displayName(), undefined, args);\n }\n\n eq(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new StringConstantOperation(value));\n }\n ne(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new StringConstantOperation(value));\n }\n contains(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`%${value}%`));\n }\n startsWith(prefix: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`${prefix}%`));\n }\n endsWith(suffix: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`%${suffix}`));\n }\n notContains(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_LIKE, new StringConstantOperation(`%${value}%`));\n }\n}\n\nexport abstract class NumericAttribute extends Attribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n sum(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.SUM, this.displayName() + ' Sum');\n }\n min(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.MIN, this.displayName() + ' Min');\n }\n max(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.MAX, this.displayName() + ' Max');\n }\n average(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.AVERAGE, this.displayName() + ' Average');\n }\n abs(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.ABS, 'Abs ' + this.displayName());\n }\n ceil(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.CEILING, 'Ceil ' + this.displayName());\n }\n floor(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.FLOOR, 'Floor ' + this.displayName());\n }\n sqrt(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.SQRT, 'Sqrt ' + this.displayName());\n }\n mod(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.MOD, 'Mod ' + this.displayName(), n);\n }\n power(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.POWER, 'Power ' + this.displayName(), n);\n }\n round(d?: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.ROUND, 'Round ' + this.displayName(), d);\n }\n}\n\nexport class DoubleAttribute extends NumericAttribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new FloatConstantOperation(value));\n }\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new FloatConstantOperation(value));\n }\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new FloatConstantOperation(value));\n }\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new FloatConstantOperation(value));\n }\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new FloatConstantOperation(value));\n }\n lte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN_OR_EQUAL_TO, new FloatConstantOperation(value));\n }\n}\n\nexport const FloatAttribute = DoubleAttribute;\nexport type FloatAttribute = DoubleAttribute;\n\nexport class DecimalAttribute extends NumericAttribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DecimalConstantOperation(value));\n }\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DecimalConstantOperation(value));\n }\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DecimalConstantOperation(value));\n }\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DecimalConstantOperation(value));\n }\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DecimalConstantOperation(value));\n }\n lte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN_OR_EQUAL_TO, new DecimalConstantOperation(value));\n }\n}\n\nexport class IntegerAttribute extends NumericAttribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new IntegerConstantOperation(value));\n }\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new IntegerConstantOperation(value));\n }\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new IntegerConstantOperation(value));\n }\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new IntegerConstantOperation(value));\n }\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new IntegerConstantOperation(value));\n }\n lte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN_OR_EQUAL_TO, new IntegerConstantOperation(value));\n }\n}\n\nexport class BooleanAttribute extends Attribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: boolean): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new BooleanConstantOperation(value));\n }\n isTrue(): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new BooleanConstantOperation(true));\n }\n isFalse(): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new BooleanConstantOperation(false));\n }\n}\n\nfunction parseDate(value: Date | string): Date {\n if (value instanceof Date) return value;\n const d = new Date(value);\n if (isNaN(d.getTime())) throw new Error(`Cannot parse date: ${value}`);\n return d;\n}\n\nexport class DateAttribute extends Attribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DateConstantOperation(parseDate(value)));\n }\n ne(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DateConstantOperation(parseDate(value)));\n }\n gt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DateConstantOperation(parseDate(value)));\n }\n lt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DateConstantOperation(parseDate(value)));\n }\n gte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DateConstantOperation(parseDate(value)));\n }\n lte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN_OR_EQUAL_TO, new DateConstantOperation(parseDate(value)));\n }\n\n year(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.YEAR, 'Year ' + this.displayName()); }\n month(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MONTH, 'Month ' + this.displayName()); }\n day(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DAY, 'Day ' + this.displayName()); }\n quarter(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.QUARTER, 'Quarter ' + this.displayName()); }\n week(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.WEEK, 'Week ' + this.displayName()); }\n dayOfWeek(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DOW, 'Day Of Week ' + this.displayName()); }\n\n addDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, true, 'Add Days ' + this.displayName()); }\n addMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, true, 'Add Months ' + this.displayName()); }\n addYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, true, 'Add Years ' + this.displayName()); }\n subtractDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, false, 'Subtract Days ' + this.displayName()); }\n subtractMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, false, 'Subtract Months ' + this.displayName()); }\n subtractYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, false, 'Subtract Years ' + this.displayName()); }\n\n diffDays(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.DAY, 'Diff Days ' + this.displayName()); }\n diffMonths(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MONTH, 'Diff Months ' + this.displayName()); }\n diffYears(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.YEAR, 'Diff Years ' + this.displayName()); }\n}\n\nexport class DateTimeAttribute extends Attribute {\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) { super(displayName, columnName, columnDbType, owner, parent); }\n\n eq(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DateTimeConstantOperation(parseDate(value)));\n }\n ne(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DateTimeConstantOperation(parseDate(value)));\n }\n gt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DateTimeConstantOperation(parseDate(value)));\n }\n lt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DateTimeConstantOperation(parseDate(value)));\n }\n gte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DateTimeConstantOperation(parseDate(value)));\n }\n lte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN_OR_EQUAL_TO, new DateTimeConstantOperation(parseDate(value)));\n }\n\n year(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.YEAR, 'Year ' + this.displayName()); }\n month(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MONTH, 'Month ' + this.displayName()); }\n day(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DAY, 'Day ' + this.displayName()); }\n hour(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.HOUR, 'Hour ' + this.displayName()); }\n minute(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MINUTE, 'Minute ' + this.displayName()); }\n second(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.SECOND, 'Second ' + this.displayName()); }\n quarter(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.QUARTER, 'Quarter ' + this.displayName()); }\n week(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.WEEK, 'Week ' + this.displayName()); }\n dayOfWeek(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DOW, 'Day Of Week ' + this.displayName()); }\n\n addDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, true, 'Add Days ' + this.displayName()); }\n addMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, true, 'Add Months ' + this.displayName()); }\n addYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, true, 'Add Years ' + this.displayName()); }\n addHours(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.HOUR, true, 'Add Hours ' + this.displayName()); }\n addMinutes(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MINUTE, true, 'Add Minutes ' + this.displayName()); }\n addSeconds(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.SECOND, true, 'Add Seconds ' + this.displayName()); }\n subtractDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, false, 'Subtract Days ' + this.displayName()); }\n subtractMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, false, 'Subtract Months ' + this.displayName()); }\n subtractYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, false, 'Subtract Years ' + this.displayName()); }\n subtractHours(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.HOUR, false, 'Subtract Hours ' + this.displayName()); }\n subtractMinutes(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MINUTE, false, 'Subtract Minutes ' + this.displayName()); }\n subtractSeconds(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.SECOND, false, 'Subtract Seconds ' + this.displayName()); }\n\n diffDays(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.DAY, 'Diff Days ' + this.displayName()); }\n diffMonths(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MONTH, 'Diff Months ' + this.displayName()); }\n diffYears(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.YEAR, 'Diff Years ' + this.displayName()); }\n diffHours(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.HOUR, 'Diff Hours ' + this.displayName()); }\n diffMinutes(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MINUTE, 'Diff Minutes ' + this.displayName()); }\n diffSeconds(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.SECOND, 'Diff Seconds ' + this.displayName()); }\n}\n","import { RelationalOperationElement, LogicalOperation, LogicalOperator, JoinTreeNodeOperation } from '../model/relational';\n\nexport class ExistsOperation extends RelationalOperationElement {\n constructor(readonly node: JoinTreeNodeOperation) { super(); }\n\n andOp(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n}\n\nexport class NotExistsOperation extends RelationalOperationElement {\n constructor(readonly node: JoinTreeNodeOperation) { super(); }\n\n andOp(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n}\n\nexport class RelatedFinder {\n constructor(private readonly _node: JoinTreeNodeOperation) {}\n\n exists(): ExistsOperation {\n return new ExistsOperation(this._node);\n }\n\n notExists(): NotExistsOperation {\n return new NotExistsOperation(this._node);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+DO,IAAe,6BAAf,MAA0C;AAAC;AAE3C,IAAe,YAAf,cAAiC,2BAA2B;AAAA,EACjE,MAAM,OAA8C;AAClD,WAAO,IAAI,iBAAiB,MAAM,iBAAqB,KAAK;AAAA,EAC9D;AACF;AAEO,IAAM,c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cAAc,IACnB,KAAK,YAAY;AAAA,EACrB;AAAA,EAEQ,cAAsB;AAC5B,WAAO,KAAK,OAAO,SAAS,IAAI,YAAY,KAAK,SAAS;AAAA,EAC5D;AAAA,EACQ,gBAAwB;AAC9B,WAAO,KAAK,cAAc,SAAS,IAAI,eAAe,KAAK,cAAc,KAAK,IAAI,IAAI;AAAA,EACxF;AAAA,EACQ,gBAAwB;AAC9B,WAAO,KAAK,cAAc,SAAS,IAAI,eAAe,KAAK,cAAc,KAAK,IAAI,IAAI;AAAA,EACxF;AAAA,EACQ,cAAsB;AAC5B,WAAO,KAAK,WAAW,SAAY,YAAY,KAAK,SAAS;AAAA,EAC/D;AACF;AAEO,SAAS,kBAAkB,iBAA0C;AAC1E,QAAM,KAAK,IAAI,kBAAkB;AACjC,KAAG,SAAS,eAAe;AAC3B,SAAO,GAAG,iBAAiB;AAC7B;AAEO,SAAS,MACd,cACA,oBACA,SACA,OACA,IACA,UAA2B,CAAC,GAC5B,UAAuB,CAAC,GACxB,OACQ;AACR,QAAM,WAAW,oBAAoB,cAAc,oBAAoB,SAAS,OAAO,IAAI,SAAS,SAAS,KAAK;AAClH,SAAO,kBAAkB,QAAQ;AACnC;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attribute } from './attribute.cjs';
|
|
2
|
+
import { RelationalOperationElement, SortOperation, Table } from '../model/relational.cjs';
|
|
3
|
+
|
|
4
|
+
declare class SelectOperation {
|
|
5
|
+
readonly display: (Attribute | RelationalOperationElement)[];
|
|
6
|
+
readonly filter: RelationalOperationElement;
|
|
7
|
+
readonly orderBy: SortOperation[];
|
|
8
|
+
readonly groupBy: Attribute[];
|
|
9
|
+
readonly limit?: number | undefined;
|
|
10
|
+
readonly table?: Table | undefined;
|
|
11
|
+
constructor(display: (Attribute | RelationalOperationElement)[], filter: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number | undefined, table?: Table | undefined);
|
|
12
|
+
}
|
|
13
|
+
declare function buildQueryOperation(businessDate: Date | null, processingDatetime: Date | null, columns: (Attribute | RelationalOperationElement)[], table: Table, op: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number): SelectOperation;
|
|
14
|
+
declare function selectSqlToString(selectOperation: SelectOperation): string;
|
|
15
|
+
declare function toSql(businessDate: Date | null, processingDatetime: Date | null, columns: (Attribute | RelationalOperationElement)[], table: Table, op: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number): string;
|
|
16
|
+
|
|
17
|
+
export { SelectOperation, buildQueryOperation, selectSqlToString, toSql };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attribute } from './attribute.js';
|
|
2
|
+
import { RelationalOperationElement, SortOperation, Table } from '../model/relational.js';
|
|
3
|
+
|
|
4
|
+
declare class SelectOperation {
|
|
5
|
+
readonly display: (Attribute | RelationalOperationElement)[];
|
|
6
|
+
readonly filter: RelationalOperationElement;
|
|
7
|
+
readonly orderBy: SortOperation[];
|
|
8
|
+
readonly groupBy: Attribute[];
|
|
9
|
+
readonly limit?: number | undefined;
|
|
10
|
+
readonly table?: Table | undefined;
|
|
11
|
+
constructor(display: (Attribute | RelationalOperationElement)[], filter: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number | undefined, table?: Table | undefined);
|
|
12
|
+
}
|
|
13
|
+
declare function buildQueryOperation(businessDate: Date | null, processingDatetime: Date | null, columns: (Attribute | RelationalOperationElement)[], table: Table, op: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number): SelectOperation;
|
|
14
|
+
declare function selectSqlToString(selectOperation: SelectOperation): string;
|
|
15
|
+
declare function toSql(businessDate: Date | null, processingDatetime: Date | null, columns: (Attribute | RelationalOperationElement)[], table: Table, op: RelationalOperationElement, orderBy?: SortOperation[], groupBy?: Attribute[], limit?: number): string;
|
|
16
|
+
|
|
17
|
+
export { SelectOperation, buildQueryOperation, selectSqlToString, toSql };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SelectOperation,
|
|
3
|
+
buildQueryOperation,
|
|
4
|
+
selectSqlToString,
|
|
5
|
+
toSql
|
|
6
|
+
} from "../chunk-DFYZVBII.js";
|
|
7
|
+
import "../chunk-EYXBYV2X.js";
|
|
8
|
+
import "../chunk-5K2Z3YDY.js";
|
|
9
|
+
import "../chunk-V647VNMY.js";
|
|
10
|
+
import "../chunk-3SSWFES4.js";
|
|
11
|
+
export {
|
|
12
|
+
SelectOperation,
|
|
13
|
+
buildQueryOperation,
|
|
14
|
+
selectSqlToString,
|
|
15
|
+
toSql
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=sql-generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|