data-finder-ts 0.1.3 → 0.1.5
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/README.md +17 -55
- package/dist/chunk-BGEX377Q.js +230 -0
- package/dist/chunk-BGEX377Q.js.map +1 -0
- package/dist/chunk-BKPWV3OF.js +962 -0
- package/dist/chunk-BKPWV3OF.js.map +1 -0
- package/dist/{chunk-EYXBYV2X.js → chunk-GPHWC533.js} +2 -2
- package/dist/chunk-KAK75RVS.js +198 -0
- package/dist/chunk-KAK75RVS.js.map +1 -0
- package/dist/chunk-MGEL5RWM.js +628 -0
- package/dist/chunk-MGEL5RWM.js.map +1 -0
- package/dist/chunk-PF6EJZHB.js +1015 -0
- package/dist/chunk-PF6EJZHB.js.map +1 -0
- package/dist/datafinder/attribute.cjs +595 -18
- package/dist/datafinder/attribute.cjs.map +1 -1
- package/dist/datafinder/attribute.d.cts +73 -10
- package/dist/datafinder/attribute.d.ts +73 -10
- package/dist/datafinder/attribute.js +2 -2
- package/dist/datafinder/runner.cjs +1589 -288
- package/dist/datafinder/runner.cjs.map +1 -1
- package/dist/datafinder/runner.d.cts +41 -7
- package/dist/datafinder/runner.d.ts +41 -7
- package/dist/datafinder/runner.js +12 -6
- package/dist/datafinder/sql-generator.cjs +1484 -281
- package/dist/datafinder/sql-generator.cjs.map +1 -1
- package/dist/datafinder/sql-generator.d.cts +19 -14
- package/dist/datafinder/sql-generator.d.ts +19 -14
- package/dist/datafinder/sql-generator.js +9 -7
- package/dist/datafinder/typed-attributes.cjs +856 -93
- package/dist/datafinder/typed-attributes.cjs.map +1 -1
- package/dist/datafinder/typed-attributes.d.cts +3 -135
- package/dist/datafinder/typed-attributes.d.ts +3 -135
- package/dist/datafinder/typed-attributes.js +3 -3
- package/dist/dialect-CogGPm_y.d.cts +38 -0
- package/dist/dialect-aaG1bDi5.d.ts +38 -0
- package/dist/index.cjs +2080 -480
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +119 -14
- package/dist/index.d.ts +119 -14
- package/dist/index.js +362 -12
- package/dist/index.js.map +1 -1
- package/dist/model/milestoning.cjs +529 -0
- package/dist/model/milestoning.cjs.map +1 -1
- package/dist/model/milestoning.js +2 -2
- package/dist/model/relational.cjs +608 -12
- package/dist/model/relational.cjs.map +1 -1
- package/dist/model/relational.d.cts +456 -47
- package/dist/model/relational.d.ts +456 -47
- package/dist/model/relational.js +61 -3
- package/dist/typed-attributes-CUTf_6Ru.d.ts +328 -0
- package/dist/typed-attributes-CdWXq_78.d.cts +328 -0
- package/package.json +5 -2
- package/dist/chunk-3SSWFES4.js +0 -448
- package/dist/chunk-3SSWFES4.js.map +0 -1
- package/dist/chunk-5K2Z3YDY.js +0 -393
- package/dist/chunk-5K2Z3YDY.js.map +0 -1
- package/dist/chunk-6QTCGJWX.js +0 -98
- package/dist/chunk-6QTCGJWX.js.map +0 -1
- package/dist/chunk-DFYZVBII.js +0 -652
- package/dist/chunk-DFYZVBII.js.map +0 -1
- package/dist/chunk-V647VNMY.js +0 -135
- package/dist/chunk-V647VNMY.js.map +0 -1
- /package/dist/{chunk-EYXBYV2X.js.map → chunk-GPHWC533.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/model/relational.ts"],"sourcesContent":["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\n/** The character that makes the next one literal in a LIKE pattern built from a value (`contains`, `startsWith`, ...). */\nexport const LIKE_ESCAPE = '!';\n\n/**\n * `value` as part of a LIKE pattern that matches it literally: `%`, `_` and the escape character itself\n * would otherwise be wildcards.\n */\nexport function escapeLike(value: string): string {\n return value.replaceAll(LIKE_ESCAPE, LIKE_ESCAPE + LIKE_ESCAPE).replaceAll('%', LIKE_ESCAPE + '%').replaceAll('_', LIKE_ESCAPE + '_');\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 STRING_AGG = 'STRING_AGG',\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n STDDEV_SAMP = 'STDDEV_SAMP',\n STDDEV_POP = 'STDDEV_POP',\n VAR_SAMP = 'VAR_SAMP',\n VAR_POP = 'VAR_POP',\n BOOL_AND = 'BOOL_AND',\n BOOL_OR = 'BOOL_OR',\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 COALESCE = 'COALESCE',\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\n/**\n * Something that can be a column of the result, so can be given a name there:\n * `f.price().sum().alias('Total')`. The name is held by an `Alias` that wraps the column.\n */\nexport interface Aliasable {\n alias(name: string): Alias;\n}\n\n/** Something the result can be ordered by: `f.id().count().ascending()`. */\nexport interface Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation;\n /** Sort by this expression, largest first. */\n descending(): SortOperation;\n}\n\nexport abstract class Operation extends RelationalOperationElement implements Aliasable {\n /** Name this column in the result: `f.price().sum().alias('Total')`, `f.age().gt(30).alias('Adult')`. */\n alias(name: string): Alias { return new Alias(this, name); }\n\n and(other: RelationalOperationElement): Operation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n\n /** Combine with `other` using OR. A chain reads left to right: `a.or(b).and(c)` is `(a OR b) AND c`. */\n or(other: RelationalOperationElement): Operation {\n return new LogicalOperation(this, LogicalOperator.OR, other);\n }\n}\n\nexport class NoOperation extends Operation {\n and(other: RelationalOperationElement): Operation {\n return other as Operation;\n }\n\n /** No filter matches every row, so OR-ing anything with it still matches every row. */\n or(_other: RelationalOperationElement): Operation {\n return this;\n }\n}\n\nexport abstract class ConstantOperation extends RelationalOperationElement implements Aliasable, Sortable {\n /** Name this column in the result. */\n alias(name: string): Alias { return new Alias(this, name); }\n\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n}\n\n/** A constant that is a number, so it can be an operand of arithmetic: `constant(100).minus(f.price())`. */\nexport abstract class NumericConstantOperation extends ConstantOperation {\n abstract readonly value: number;\n\n arithmeticOperand(): RelationalOperationElement { return this; }\n}\n\nexport class IntegerConstantOperation extends NumericConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class FloatConstantOperation extends NumericConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class StringConstantOperation extends ConstantOperation {\n constructor(readonly value: string) { super(); }\n}\n\n/** Matches a zone-less calendar date such as `2024-06-01`. */\nexport const DATE_ONLY_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/**\n * A calendar date, held as UTC midnight. JavaScript has no date-only type, so this marks a `Date`\n * that was given as a date rather than a timestamp, and is rendered as a date literal (`'2024-06-01'`)\n * instead of a timestamp literal (`'2024-06-01 00:00:00'`).\n */\nexport class DateOnly extends Date {}\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 NumericConstantOperation {\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\n/** The element is one of `values` (`element IN (...)`). */\nexport class InOperation extends UnaryOperation {\n constructor(element: RelationalOperationElement, readonly values: ConstantOperation[]) { super(element); }\n}\n\n/** The element is none of `values` (`element NOT IN (...)`). */\nexport class NotInOperation extends UnaryOperation {\n constructor(element: RelationalOperationElement, readonly values: ConstantOperation[]) { super(element); }\n}\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 implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n constructor(\n element: RelationalOperationElement,\n readonly operator: AggregateOperator,\n readonly displayName?: string,\n readonly window?: WindowSpecification,\n /** For STRING_AGG: what goes between the values. */\n readonly separator?: string,\n /** For STRING_AGG: the order the values are joined in. */\n readonly orderBy: SortOperation[] = [],\n ) { super(element); }\n\n arithmeticOperand(): RelationalOperationElement { return this; }\n comparisonOperand(): RelationalOperationElement { return this; }\n\n over(partitionBy?: RelationalOperationElement[], orderBy?: SortOperation[]): AggregateOperation {\n return new AggregateOperation(this.element, this.operator, this.displayName,\n new WindowSpecification(partitionBy ?? [], orderBy ?? []), this.separator, this.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 implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\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 implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n constructor(\n element: RelationalOperationElement,\n readonly func: ScalarFunction,\n readonly displayName?: string,\n readonly secondArg?: number,\n readonly extraArgs: (string | number | boolean)[] = [],\n ) { super(element); }\n\n /** This expression as an operand of a comparison. */\n comparisonOperand(): RelationalOperationElement { return this; }\n\n arithmeticOperand(): RelationalOperationElement { return this; }\n\n /** Only a function that gives a number can be used in arithmetic. */\n assertNumeric(): void {\n if (!NUMERIC_FUNCTIONS.has(this.func)) {\n throw new TypeError(`${this.func} does not give a number, so it cannot be used in arithmetic`);\n }\n }\n}\n\n/** The functions that give a number, which arithmetic and `Numeric` functions apply to. */\nexport const NUMERIC_FUNCTIONS: ReadonlySet<ScalarFunction> = new Set([\n ScalarFunction.ABS, ScalarFunction.CEILING, ScalarFunction.FLOOR, ScalarFunction.MOD,\n ScalarFunction.POWER, ScalarFunction.SQRT, ScalarFunction.ROUND, ScalarFunction.LENGTH,\n]);\n\nexport class DateExtractOperation extends UnaryOperation implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n constructor(\n element: RelationalOperationElement,\n readonly part: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n}\n\n/** The first day of the week, month, quarter or year that the date falls in, as a date. */\nexport class DateTruncOperation extends UnaryOperation implements Sortable {\n constructor(\n element: RelationalOperationElement,\n readonly part: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n\n /** Sort by this expression, earliest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, latest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n comparisonOperand(): RelationalOperationElement { return this; }\n}\n\nexport class DateArithmeticOperation extends UnaryOperation implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\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 implements Sortable {\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\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 /** Whether the column may hold NULL. As in Legend, a primary key is never null. */\n readonly nullable: boolean;\n\n constructor(\n readonly name: string,\n readonly type: string,\n readonly owner?: string,\n readonly primaryKey: boolean = false,\n nullable: boolean = true,\n ) {\n super();\n this.nullable = nullable && !primaryKey;\n }\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 /** Property-equality filters on the join target (property id -> value), set by a related finder given a filter. */\n filterKwargs: Record<string, unknown> = {};\n /** Maps property ids to [column, type, table] for `filterKwargs`. */\n filterColumnMap: Record<string, [string, string, string]> = {};\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 * True when the property this step follows is to-many, so a value read through it repeats the row. As in\n * Pure, that is the multiplicity of the property, not something the join itself says.\n */\n readonly many: boolean = false,\n /** True when the property this step follows can be missing (its lower bound is 0). */\n readonly optional: boolean = false,\n ) {}\n}\n\nexport class ColumnWithJoin extends RelationalOperationElement {\n /**\n * `embedded` is an alternate reference to a flat (denormalized) column on the owning table that\n * holds the same value without the join; the SQL generator uses it when the join can be elided.\n */\n constructor(\n readonly column: Column,\n readonly parent?: JoinTreeNodeOperation,\n readonly embedded?: ColumnWithJoin,\n private readonly _optional: boolean = false,\n ) { super(); }\n\n /** Whether the value can be missing: its property is optional, or a navigation on the way to it is. */\n get optional(): boolean {\n for (let node = this.parent; node !== undefined; node = node.parent) {\n if (node.optional) return true;\n }\n return this._optional;\n }\n}\n\nexport class SortOperation {\n constructor(\n /** What the rows are ordered by: a column, or an expression such as an aggregate. */\n readonly column: RelationalOperationElement,\n readonly direction: SortDirection,\n ) {}\n}\n\nexport class CountAllOperation extends RelationalOperationElement implements Aliasable, Sortable {\n /** Name this column in the result. */\n alias(name: string): Alias { return new Alias(this, name); }\n\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n constructor(readonly table: string) { super(); }\n\n comparisonOperand(): RelationalOperationElement { return this; }\n}\n\n/**\n * A column of the result under another name, wrapping the column it names. Only things that can be a\n * column of the result have `alias()` (an `Attribute`, an aggregate, a function, a constant, ...), so a\n * filter cannot be aliased; aliasing an alias replaces its name.\n */\nexport class Alias extends RelationalOperationElement implements Aliasable, Sortable {\n constructor(readonly element: RelationalOperationElement, readonly name: string) { super(); }\n\n alias(name: string): Alias { return new Alias(this.element, name); }\n\n /** Sorts by the column the alias names. */\n ascending(): SortOperation { return new SortOperation(this.element, SortDirection.ASC); }\n\n /** Sorts by the column the alias names. */\n descending(): SortOperation { return new SortOperation(this.element, SortDirection.DESC); }\n}\n\n/** `CASE WHEN condition THEN then ELSE fallback END`; without a `fallback` the value is NULL. */\nexport class CaseOperation extends Operation {\n constructor(\n readonly condition: RelationalOperationElement,\n readonly then: RelationalOperationElement,\n readonly fallback?: RelationalOperationElement,\n readonly displayName?: string,\n ) { super(); }\n}\n\n/** Returned by `RelatedFinder.exists()`. A backend translates it to a join-presence check. */\nexport class ExistsOperation extends RelationalOperationElement implements Aliasable {\n /** Name this column in the result. */\n alias(name: string): Alias { return new Alias(this, name); }\n\n constructor(readonly node: JoinTreeNodeOperation) { super(); }\n\n and(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n\n or(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.OR, other);\n }\n}\n\n/** Returned by `RelatedFinder.notExists()`. A backend translates it to a join-absence check. */\nexport class NotExistsOperation extends RelationalOperationElement implements Aliasable {\n /** Name this column in the result. */\n alias(name: string): Alias { return new Alias(this, name); }\n\n constructor(readonly node: JoinTreeNodeOperation) { super(); }\n\n and(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n\n or(other: RelationalOperationElement): LogicalOperation {\n return new LogicalOperation(this, LogicalOperator.OR, other);\n }\n}\n\nexport class SelectOperation {\n constructor(\n readonly display: RelationalOperationElement[],\n readonly filter: RelationalOperationElement,\n readonly orderBy: SortOperation[] = [],\n readonly groupBy: RelationalOperationElement[] = [],\n readonly limit?: number,\n readonly table?: Table,\n /**\n * Extra ON conditions for this query's joins (milestoning and property filters), keyed by join node.\n * Held here rather than on the shared JoinOperation, so queries that use the same node can't affect each other.\n */\n readonly joinFilters: ReadonlyMap<JoinTreeNodeOperation, Operation> = new Map(),\n /** Whether each distinct row is returned once (`SELECT DISTINCT`). */\n readonly distinct: boolean = false,\n /** How many rows to skip before the first one returned. */\n readonly offset?: number,\n /** Keeps the groups that satisfy it (`HAVING`). */\n readonly having?: Operation,\n ) {}\n}\n\n/** Whether `op` holds an aggregate, a window function or a count. */\nexport function containsAggregateOrWindow(op: unknown): boolean {\n if (op instanceof AggregateOperation || op instanceof WindowFunctionOperation || op instanceof CountAllOperation) return true;\n if (op instanceof BinaryOperation) return containsAggregateOrWindow(op.left) || containsAggregateOrWindow(op.right);\n if (op instanceof UnaryOperation || op instanceof Alias) return containsAggregateOrWindow(op.element);\n return false;\n}\n\n/** Whether `op` collapses rows: an aggregate or a count. Window functions keep every row. */\nexport function containsAggregate(op: unknown): boolean {\n if (op instanceof AggregateOperation || op instanceof CountAllOperation) return true;\n if (op instanceof BinaryOperation) return containsAggregate(op.left) || containsAggregate(op.right);\n if (op instanceof UnaryOperation || op instanceof Alias) return containsAggregate(op.element);\n return false;\n}\n\n/** A plain value as the constant it compares with. */\nexport function valueOperand(value: unknown): ConstantOperation {\n if (typeof value === 'boolean') return new BooleanConstantOperation(value);\n if (typeof value === 'number' && Number.isFinite(value)) {\n return Number.isInteger(value) ? new IntegerConstantOperation(value) : new FloatConstantOperation(value);\n }\n if (typeof value === 'string') return new StringConstantOperation(value);\n if (value instanceof DateOnly) return new DateConstantOperation(value); // before Date: DateOnly is a Date\n if (value instanceof Date) return new DateTimeConstantOperation(value);\n throw new TypeError(`A value to compare with is a boolean, a finite number, a string or a date, not ${value === null ? 'null' : typeof value}`);\n}\n\n/** The thing to compare or calculate with: an expression as it is, an attribute as its column, a value as a constant. */\nexport function operandOf(other: unknown): RelationalOperationElement {\n if (other instanceof RelationalOperationElement) return other;\n if (typeof (other as { cwj?: unknown } | null)?.cwj === 'function') return (other as { cwj(): ColumnWithJoin }).cwj();\n return valueOperand(other);\n}\n\n/**\n * Comparisons for an expression, as for a column: `f.name().toUpperCase().eq('ACME')`, `f.name().length().gt(10)`.\n * The other side is a value or another expression. Each gives a filter. Mixed into the expressions that have it.\n */\nexport abstract class Comparable {\n abstract comparisonOperand(): RelationalOperationElement;\n\n private _compared(operator: ComparisonOperator, other: unknown): ComparisonOperation {\n return new ComparisonOperation(this.comparisonOperand(), operator, operandOf(other));\n }\n\n /** Filter to rows where this expression equals `other`. */\n eq(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.EQUAL, other); }\n /** Filter to rows where this expression does not equal `other`. */\n ne(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.NOT_EQUAL, other); }\n /** Filter to rows where this expression is less than `other`. */\n lt(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.LESS_THAN, other); }\n /** Filter to rows where this expression is at most `other`. */\n lte(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.LESS_THAN_OR_EQUAL_TO, other); }\n /** Filter to rows where this expression is greater than `other`. */\n gt(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.GREATER_THAN, other); }\n /** Filter to rows where this expression is at least `other`. */\n gte(other: unknown): ComparisonOperation { return this._compared(ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, other); }\n}\n\n/** Whether a standard deviation or variance is the sample one (`ddof` 1) or the population one (0). */\nexport function sample(ddof: number): boolean {\n if (ddof !== 0 && ddof !== 1) throw new RangeError(`ddof is 0 (population) or 1 (sample), not ${ddof}`);\n return ddof === 1;\n}\n\n/**\n * Pattern tests on an expression that holds text, as on a column: `f.name().toUpperCase().startsWith('AC')`,\n * `f.name().join(',').contains('John')`. Mixed into the expressions that have it.\n */\nexport abstract class StringPredicates {\n abstract comparisonOperand(): RelationalOperationElement;\n\n private _like(pattern: string): ComparisonOperation {\n return new ComparisonOperation(this.comparisonOperand(), ComparisonOperator.LIKE, new StringConstantOperation(pattern));\n }\n\n /** Filter to rows where this text contains `value`. */\n contains(value: string): ComparisonOperation { return this._like(`%${escapeLike(value)}%`); }\n /** Filter to rows where this text starts with `prefix`. */\n startsWith(prefix: string): ComparisonOperation { return this._like(`${escapeLike(prefix)}%`); }\n /** Filter to rows where this text ends with `suffix`. */\n endsWith(suffix: string): ComparisonOperation { return this._like(`%${escapeLike(suffix)}`); }\n}\n\n/**\n * Aggregates of an expression, as a column has them: `f.price().times(f.quantity()).sum()`, `constant(1).sum()`,\n * `when(f.price().gt(10)).then(5.0).otherwise(1.0).sum()`. Mixed into the expressions that have it.\n */\nexport abstract class Aggregates {\n private _aggregate(operator: AggregateOperator, label: string): AggregateOperation {\n return new AggregateOperation(this as unknown as RelationalOperationElement, operator, label + ' Expression');\n }\n\n /** Sum of the values in the group. */\n sum(): AggregateOperation { return this._aggregate(AggregateOperator.SUM, 'Sum'); }\n /** Smallest value in the group. */\n min(): AggregateOperation { return this._aggregate(AggregateOperator.MIN, 'Min'); }\n /** Largest value in the group. */\n max(): AggregateOperation { return this._aggregate(AggregateOperator.MAX, 'Max'); }\n /** Arithmetic mean of the values in the group. */\n average(): AggregateOperation { return this._aggregate(AggregateOperator.AVERAGE, 'Average'); }\n /** Number of non-null values in the group. */\n count(): AggregateOperation { return this._aggregate(AggregateOperator.COUNT, 'Count'); }\n /** Standard deviation of the values in the group: the sample one by default, `ddof = 0` for the population one. */\n std(ddof = 1): AggregateOperation {\n return this._aggregate(sample(ddof) ? AggregateOperator.STDDEV_SAMP : AggregateOperator.STDDEV_POP, 'Std');\n }\n /** Variance of the values in the group: the sample one by default, `ddof = 0` for the population one. */\n var(ddof = 1): AggregateOperation {\n return this._aggregate(sample(ddof) ? AggregateOperator.VAR_SAMP : AggregateOperator.VAR_POP, 'Var');\n }\n}\n\n/**\n * Aggregates of a condition: `f.quantity().gt(20).all()` is true for a group where every row holds, `.any()` where at\n * least one does. Mixed into the conditions.\n */\nexport abstract class BooleanAggregates {\n /** True for a group where every row satisfies the condition. */\n all(): AggregateOperation {\n return new AggregateOperation(this as unknown as RelationalOperationElement, AggregateOperator.BOOL_AND, 'All Expression');\n }\n /** True for a group where at least one row satisfies the condition. */\n any(): AggregateOperation {\n return new AggregateOperation(this as unknown as RelationalOperationElement, AggregateOperator.BOOL_OR, 'Any Expression');\n }\n}\n\n/**\n * Mix the methods of the base classes into `derived`, the TypeScript handbook's way to inherit from more than\n * one class: the type side comes from an `interface Derived extends Base {}` beside the class.\n */\nexport function applyMixins(derived: { prototype: object }, bases: { prototype: object }[]): void {\n for (const base of bases) {\n for (const name of Object.getOwnPropertyNames(base.prototype)) {\n if (name === 'constructor' || Object.prototype.hasOwnProperty.call(derived.prototype, name)) continue;\n Object.defineProperty(derived.prototype, name, Object.getOwnPropertyDescriptor(base.prototype, name)!);\n }\n }\n}\n\nexport enum ArithmeticOperator {\n ADD = '+',\n SUBTRACT = '-',\n MULTIPLY = '*',\n DIVIDE = '/',\n}\n\n/** A number or a numeric expression: what arithmetic takes on the other side. */\nexport type ArithmeticOperand = number | { arithmeticOperand(): RelationalOperationElement };\n\n/**\n * `plus`, `minus`, `times` and `dividedBy` for an expression that holds a number: `f.price().times(f.quantity())`,\n * `f.price().plus(1.5)`, `constant(100).minus(f.price())`. The other operand is a number or another numeric\n * expression. Mixed into the expressions that have it.\n */\nexport abstract class Arithmetic {\n abstract arithmeticOperand(): RelationalOperationElement;\n\n /** Raises if this expression is not a number. */\n assertNumeric(): void {}\n\n private _arithmetic(operator: ArithmeticOperator, other: ArithmeticOperand): ArithmeticOperation {\n this.assertNumeric();\n let operand: RelationalOperationElement;\n if (typeof other === 'number') {\n if (!Number.isFinite(other)) throw new TypeError('Arithmetic is between numbers and numeric columns, not a non-finite number');\n operand = valueOperand(other);\n } else if (other !== null && typeof other === 'object' && typeof other.arithmeticOperand === 'function') {\n (other as unknown as Arithmetic).assertNumeric?.();\n operand = other.arithmeticOperand();\n } else {\n throw new TypeError(`Arithmetic is between numbers and numeric columns, not ${other === null ? 'null' : typeof other}`);\n }\n return new ArithmeticOperation(this.arithmeticOperand(), operator, operand);\n }\n\n /** `this + other`. */\n plus(other: ArithmeticOperand): ArithmeticOperation { return this._arithmetic(ArithmeticOperator.ADD, other); }\n /** `this - other`. */\n minus(other: ArithmeticOperand): ArithmeticOperation { return this._arithmetic(ArithmeticOperator.SUBTRACT, other); }\n /** `this * other`. */\n times(other: ArithmeticOperand): ArithmeticOperation { return this._arithmetic(ArithmeticOperator.MULTIPLY, other); }\n /** `this / other`. */\n dividedBy(other: ArithmeticOperand): ArithmeticOperation { return this._arithmetic(ArithmeticOperator.DIVIDE, other); }\n}\n\n/** `left operator right` on numbers, e.g. `price * quantity`. */\nexport class ArithmeticOperation extends BinaryOperation implements Sortable {\n constructor(\n left: RelationalOperationElement,\n readonly operator: ArithmeticOperator,\n right: RelationalOperationElement,\n readonly displayName?: string,\n ) { super(left, right); }\n\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n arithmeticOperand(): RelationalOperationElement { return this; }\n comparisonOperand(): RelationalOperationElement { return this; }\n}\n\n/** Text joined end to end. A NULL in any part makes the whole NULL, as with SQL's `||`. */\nexport class ConcatOperation extends Operation implements Sortable {\n constructor(\n readonly parts: RelationalOperationElement[],\n readonly displayName?: string,\n ) { super(); }\n\n /** Join more text on the end: `f.first().concat(' ', f.last())`. A concatenation joins into one. */\n concat(...more: ConcatPart[]): ConcatOperation { return concat(this, ...more); }\n\n /** Sort by this expression, smallest first. */\n ascending(): SortOperation { return new SortOperation(this, SortDirection.ASC); }\n\n /** Sort by this expression, largest first. */\n descending(): SortOperation { return new SortOperation(this, SortDirection.DESC); }\n\n comparisonOperand(): RelationalOperationElement { return this; }\n}\n\n/** What can be joined as text: a string, a text column, a function that gives text, or another concatenation. */\nexport type ConcatPart = string | { functionInput(): RelationalOperationElement } | ConcatOperation;\n\n/**\n * Join text: `concat(f.name(), ' (', f.category(), ')')`. A string is a constant; a concatenation among the\n * parts is flattened into one.\n */\nexport function concat(...parts: ConcatPart[]): ConcatOperation {\n const partsOf = (part: ConcatPart): RelationalOperationElement[] => {\n if (part instanceof ConcatOperation) return part.parts;\n if (typeof part === 'string') return [new StringConstantOperation(part)];\n if (part instanceof RelationalOperationElement) return [part];\n if (part !== null && typeof part === 'object' && typeof part.functionInput === 'function') return [part.functionInput()];\n throw new TypeError(`Text is joined with text, not ${part === null ? 'null' : typeof part}`);\n };\n return new ConcatOperation(parts.flatMap(partsOf));\n}\n\nexport interface ConcatOperation extends Comparable, StringPredicates {}\napplyMixins(ConcatOperation, [Comparable, StringPredicates]);\n\nexport interface DateTruncOperation extends Comparable {}\napplyMixins(DateTruncOperation, [Comparable]);\n\nexport interface ArithmeticOperation extends Arithmetic, Comparable {}\napplyMixins(ArithmeticOperation, [Arithmetic, Comparable]);\n\nexport interface ScalarFunctionOperation extends Comparable, Arithmetic, StringPredicates {}\napplyMixins(ScalarFunctionOperation, [Comparable, Arithmetic, StringPredicates]);\n\nexport interface AggregateOperation extends Arithmetic, Comparable, StringPredicates {}\napplyMixins(AggregateOperation, [Arithmetic, Comparable, StringPredicates]);\n\nexport interface CountAllOperation extends Comparable {}\napplyMixins(CountAllOperation, [Comparable]);\n\nexport interface NumericConstantOperation extends Arithmetic {}\napplyMixins(NumericConstantOperation, [Arithmetic]);\n\nexport interface ConstantOperation extends Aggregates {}\napplyMixins(ConstantOperation, [Aggregates]);\n\nexport interface ArithmeticOperation extends Aggregates {}\napplyMixins(ArithmeticOperation, [Aggregates]);\n\nexport interface ScalarFunctionOperation extends Aggregates {}\napplyMixins(ScalarFunctionOperation, [Aggregates]);\n\nexport interface CaseOperation extends Aggregates {}\napplyMixins(CaseOperation, [Aggregates]);\n\nexport interface IsNullOperation extends BooleanAggregates {}\napplyMixins(IsNullOperation, [BooleanAggregates]);\n\nexport interface IsNotNullOperation extends BooleanAggregates {}\napplyMixins(IsNotNullOperation, [BooleanAggregates]);\n\nexport interface InOperation extends BooleanAggregates {}\napplyMixins(InOperation, [BooleanAggregates]);\n\nexport interface NotInOperation extends BooleanAggregates {}\napplyMixins(NotInOperation, [BooleanAggregates]);\n\nexport interface ComparisonOperation extends BooleanAggregates {}\napplyMixins(ComparisonOperation, [BooleanAggregates]);\n\nexport interface LogicalOperation extends BooleanAggregates {}\napplyMixins(LogicalOperation, [BooleanAggregates]);\n"],"mappings":";AAAO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,WAAQ;AACR,EAAAA,oBAAA,eAAY;AACZ,EAAAA,oBAAA,eAAY;AACZ,EAAAA,oBAAA,kBAAe;AACf,EAAAA,oBAAA,2BAAwB;AACxB,EAAAA,oBAAA,8BAA2B;AAC3B,EAAAA,oBAAA,UAAO;AACP,EAAAA,oBAAA,cAAW;AARD,SAAAA;AAAA,GAAA;AAYL,IAAM,cAAc;AAMpB,SAAS,WAAW,OAAuB;AAChD,SAAO,MAAM,WAAW,aAAa,cAAc,WAAW,EAAE,WAAW,KAAK,cAAc,GAAG,EAAE,WAAW,KAAK,cAAc,GAAG;AACtI;AAEO,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,SAAM;AACN,EAAAA,iBAAA,QAAK;AAFK,SAAAA;AAAA,GAAA;AAKL,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,mBAAA,WAAQ;AACR,EAAA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