data-finder-ts 0.1.0 → 0.1.4
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-4JVW4TAB.js +180 -0
- package/dist/chunk-4JVW4TAB.js.map +1 -0
- package/dist/chunk-4LNZV6EN.js +500 -0
- package/dist/chunk-4LNZV6EN.js.map +1 -0
- package/dist/chunk-FJYA2ASS.js +136 -0
- package/dist/chunk-FJYA2ASS.js.map +1 -0
- package/dist/chunk-FLEIUDZZ.js +14 -0
- package/dist/chunk-FLEIUDZZ.js.map +1 -0
- package/dist/chunk-MH4XMYVB.js +696 -0
- package/dist/chunk-MH4XMYVB.js.map +1 -0
- package/dist/chunk-PMPLCEWQ.js +90 -0
- package/dist/chunk-PMPLCEWQ.js.map +1 -0
- package/dist/chunk-UYMOE6YU.js +509 -0
- package/dist/chunk-UYMOE6YU.js.map +1 -0
- package/dist/datafinder/attribute.cjs +320 -0
- package/dist/datafinder/attribute.cjs.map +1 -0
- package/dist/datafinder/attribute.d.cts +86 -0
- package/dist/datafinder/attribute.d.ts +86 -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 +1595 -0
- package/dist/datafinder/runner.cjs.map +1 -0
- package/dist/datafinder/runner.d.cts +44 -0
- package/dist/datafinder/runner.d.ts +44 -0
- package/dist/datafinder/runner.js +26 -0
- package/dist/datafinder/runner.js.map +1 -0
- package/dist/datafinder/sql-generator.cjs +1467 -0
- package/dist/datafinder/sql-generator.cjs.map +1 -0
- package/dist/datafinder/sql-generator.d.cts +8 -0
- package/dist/datafinder/sql-generator.d.ts +8 -0
- package/dist/datafinder/sql-generator.js +15 -0
- package/dist/datafinder/sql-generator.js.map +1 -0
- package/dist/datafinder/typed-attributes.cjs +909 -0
- package/dist/datafinder/typed-attributes.cjs.map +1 -0
- package/dist/datafinder/typed-attributes.d.cts +242 -0
- package/dist/datafinder/typed-attributes.d.ts +242 -0
- package/dist/datafinder/typed-attributes.js +25 -0
- package/dist/datafinder/typed-attributes.js.map +1 -0
- package/dist/index.cjs +2153 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +199 -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 +579 -0
- package/dist/model/relational.cjs.map +1 -0
- package/dist/model/relational.d.cts +291 -0
- package/dist/model/relational.d.ts +291 -0
- package/dist/model/relational.js +99 -0
- package/dist/model/relational.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/datafinder/typed-attributes.ts","../../src/model/relational.ts","../../src/datafinder/attribute.ts"],"sourcesContent":["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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Convert every character to uppercase. */\n toUpperCase(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.UPPER, 'Upper ' + this.displayName());\n }\n /** Convert every character to lowercase. */\n toLowerCase(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LOWER, 'Lower ' + this.displayName());\n }\n /** Remove leading and trailing whitespace. */\n trim(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.TRIM, 'Trim ' + this.displayName());\n }\n /** Remove leading whitespace. */\n trimStart(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LTRIM, 'Trim Start ' + this.displayName());\n }\n /** Remove trailing whitespace. */\n trimEnd(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.RTRIM, 'Trim End ' + this.displayName());\n }\n /** Return the number of characters in the string. */\n length(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LENGTH, 'Length ' + this.displayName());\n }\n /** Return the string with characters in reverse order. */\n reverse(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REVERSE, 'Reverse ' + this.displayName());\n }\n /** Return the first `n` characters. */\n left(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.LEFT, 'Left ' + this.displayName(), n);\n }\n /** Return the last `n` characters. */\n right(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.RIGHT, 'Right ' + this.displayName(), n);\n }\n /** Return the string repeated `n` times. */\n repeat(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REPEAT, 'Repeat ' + this.displayName(), n);\n }\n /** Replace all occurrences of `fromStr` with `toStr`. */\n replace(fromStr: string, toStr: string): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.REPLACE, 'Replace ' + this.displayName(), undefined, [fromStr, toStr]);\n }\n /**\n * Extract a portion of the string.\n * `start` is zero-based (following Python convention); `length` is optional.\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 /** Filter to rows where this attribute equals `value`. */\n eq(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new StringConstantOperation(value));\n }\n /** Filter to rows where this attribute does not equal `value`. */\n ne(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new StringConstantOperation(value));\n }\n /** Filter to rows where this attribute contains `value` as a substring. */\n contains(value: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`%${value}%`));\n }\n /** Filter to rows where this attribute begins with `prefix`. */\n startsWith(prefix: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`${prefix}%`));\n }\n /** Filter to rows where this attribute ends with `suffix`. */\n endsWith(suffix: string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LIKE, new StringConstantOperation(`%${suffix}`));\n }\n /** Filter to rows where this attribute does not contain `value` as a substring. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Sum of all values in the group. */\n sum(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.SUM, 'Sum ' + this.displayName());\n }\n /** Smallest value in the group. */\n min(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.MIN, 'Min ' + this.displayName());\n }\n /** Largest value in the group. */\n max(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.MAX, 'Max ' + this.displayName());\n }\n /** Arithmetic mean of all values in the group. */\n average(): AggregateOperation {\n return new AggregateOperation(this.cwj(), AggregateOperator.AVERAGE, 'Average ' + this.displayName());\n }\n /** Absolute value (distance from zero, always non-negative). */\n abs(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.ABS, 'Abs ' + this.displayName());\n }\n /** Round up to the nearest integer. */\n ceil(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.CEILING, 'Ceil ' + this.displayName());\n }\n /** Round down to the nearest integer. */\n floor(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.FLOOR, 'Floor ' + this.displayName());\n }\n /** Square root. */\n sqrt(): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.SQRT, 'Sqrt ' + this.displayName());\n }\n /** Remainder after dividing by `n`. */\n mod(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.MOD, 'Mod ' + this.displayName(), n);\n }\n /** Raise to the power of `n`. */\n power(n: number): ScalarFunctionOperation {\n return new ScalarFunctionOperation(this.cwj(), ScalarFunction.POWER, 'Power ' + this.displayName(), n);\n }\n /** Round to `d` decimal places, or to the nearest integer when `d` is omitted. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this attribute equals `value`. */\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new FloatConstantOperation(value));\n }\n /** Filter to rows where this attribute does not equal `value`. */\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new FloatConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than `value`. */\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new FloatConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than `value`. */\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new FloatConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than or equal to `value`. */\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new FloatConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than or equal to `value`. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this attribute equals `value`. */\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DecimalConstantOperation(value));\n }\n /** Filter to rows where this attribute does not equal `value`. */\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DecimalConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than `value`. */\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DecimalConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than `value`. */\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DecimalConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than or equal to `value`. */\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DecimalConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than or equal to `value`. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this attribute equals `value`. */\n eq(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new IntegerConstantOperation(value));\n }\n /** Filter to rows where this attribute does not equal `value`. */\n ne(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new IntegerConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than `value`. */\n gt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new IntegerConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than `value`. */\n lt(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new IntegerConstantOperation(value));\n }\n /** Filter to rows where this attribute is greater than or equal to `value`. */\n gte(value: number): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new IntegerConstantOperation(value));\n }\n /** Filter to rows where this attribute is less than or equal to `value`. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this attribute equals `value`. */\n eq(value: boolean): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new BooleanConstantOperation(value));\n }\n /** Filter to rows where this attribute is true. */\n isTrue(): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new BooleanConstantOperation(true));\n }\n /** Filter to rows where this attribute is false. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this date equals `value`. */\n eq(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DateConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this date does not equal `value`. */\n ne(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DateConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this date is after `value`. */\n gt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DateConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this date is before `value`. */\n lt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DateConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this date is on or after `value`. */\n gte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DateConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this date is on or before `value`. */\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 /** Extract the four-digit calendar year. */\n year(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.YEAR, 'Year ' + this.displayName()); }\n /** Extract the month number (1–12). */\n month(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MONTH, 'Month ' + this.displayName()); }\n /** Extract the day of the month (1–31). */\n day(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DAY, 'Day ' + this.displayName()); }\n /** Extract the quarter (1–4). */\n quarter(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.QUARTER, 'Quarter ' + this.displayName()); }\n /** Extract the ISO week number (1–53). */\n week(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.WEEK, 'Week ' + this.displayName()); }\n /** Extract the day of the week (0 = Sunday through 6 = Saturday). */\n dayOfWeek(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DOW, 'Day Of Week ' + this.displayName()); }\n\n /** Add `n` days to this date. */\n addDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, true, 'Add Days ' + this.displayName()); }\n /** Add `n` months to this date. */\n addMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, true, 'Add Months ' + this.displayName()); }\n /** Add `n` years to this date. */\n addYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, true, 'Add Years ' + this.displayName()); }\n /** Subtract `n` days from this date. */\n subtractDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, false, 'Subtract Days ' + this.displayName()); }\n /** Subtract `n` months from this date. */\n subtractMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, false, 'Subtract Months ' + this.displayName()); }\n /** Subtract `n` years from this date. */\n subtractYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, false, 'Subtract Years ' + this.displayName()); }\n\n /** Number of whole days between this date and `other`. */\n diffDays(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.DAY, 'Diff Days ' + this.displayName()); }\n /** Number of whole months between this date and `other`. */\n diffMonths(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MONTH, 'Diff Months ' + this.displayName()); }\n /** Number of whole years between this date and `other`. */\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 embedded?: Attribute,\n ) { super(displayName, columnName, columnDbType, owner, parent, embedded); }\n\n /** Filter to rows where this timestamp equals `value`. */\n eq(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.EQUAL, new DateTimeConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this timestamp does not equal `value`. */\n ne(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.NOT_EQUAL, new DateTimeConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this timestamp is after `value`. */\n gt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN, new DateTimeConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this timestamp is before `value`. */\n lt(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.LESS_THAN, new DateTimeConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this timestamp is on or after `value`. */\n gte(value: Date | string): Operation {\n return new ComparisonOperation(this.cwj(), ComparisonOperator.GREATER_THAN_OR_EQUAL_TO, new DateTimeConstantOperation(parseDate(value)));\n }\n /** Filter to rows where this timestamp is on or before `value`. */\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 /** Extract the four-digit calendar year. */\n year(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.YEAR, 'Year ' + this.displayName()); }\n /** Extract the month number (1–12). */\n month(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MONTH, 'Month ' + this.displayName()); }\n /** Extract the day of the month (1–31). */\n day(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DAY, 'Day ' + this.displayName()); }\n /** Extract the hour (0–23). */\n hour(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.HOUR, 'Hour ' + this.displayName()); }\n /** Extract the minute (0–59). */\n minute(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.MINUTE, 'Minute ' + this.displayName()); }\n /** Extract the second (0–59). */\n second(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.SECOND, 'Second ' + this.displayName()); }\n /** Extract the quarter (1–4). */\n quarter(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.QUARTER, 'Quarter ' + this.displayName()); }\n /** Extract the ISO week number (1–53). */\n week(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.WEEK, 'Week ' + this.displayName()); }\n /** Extract the day of the week (0 = Sunday through 6 = Saturday). */\n dayOfWeek(): DateExtractOperation { return new DateExtractOperation(this.cwj(), DatePart.DOW, 'Day Of Week ' + this.displayName()); }\n\n /** Add `n` days to this timestamp. */\n addDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, true, 'Add Days ' + this.displayName()); }\n /** Add `n` months to this timestamp. */\n addMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, true, 'Add Months ' + this.displayName()); }\n /** Add `n` years to this timestamp. */\n addYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, true, 'Add Years ' + this.displayName()); }\n /** Add `n` hours to this timestamp. */\n addHours(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.HOUR, true, 'Add Hours ' + this.displayName()); }\n /** Add `n` minutes to this timestamp. */\n addMinutes(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MINUTE, true, 'Add Minutes ' + this.displayName()); }\n /** Add `n` seconds to this timestamp. */\n addSeconds(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.SECOND, true, 'Add Seconds ' + this.displayName()); }\n /** Subtract `n` days from this timestamp. */\n subtractDays(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.DAY, false, 'Subtract Days ' + this.displayName()); }\n /** Subtract `n` months from this timestamp. */\n subtractMonths(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MONTH, false, 'Subtract Months ' + this.displayName()); }\n /** Subtract `n` years from this timestamp. */\n subtractYears(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.YEAR, false, 'Subtract Years ' + this.displayName()); }\n /** Subtract `n` hours from this timestamp. */\n subtractHours(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.HOUR, false, 'Subtract Hours ' + this.displayName()); }\n /** Subtract `n` minutes from this timestamp. */\n subtractMinutes(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.MINUTE, false, 'Subtract Minutes ' + this.displayName()); }\n /** Subtract `n` seconds from this timestamp. */\n subtractSeconds(n: number): DateArithmeticOperation { return new DateArithmeticOperation(this.cwj(), n, DatePart.SECOND, false, 'Subtract Seconds ' + this.displayName()); }\n\n /** Number of whole days between this timestamp and `other`. */\n diffDays(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.DAY, 'Diff Days ' + this.displayName()); }\n /** Number of whole months between this timestamp and `other`. */\n diffMonths(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MONTH, 'Diff Months ' + this.displayName()); }\n /** Number of whole years between this timestamp and `other`. */\n diffYears(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.YEAR, 'Diff Years ' + this.displayName()); }\n /** Number of whole hours between this timestamp and `other`. */\n diffHours(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.HOUR, 'Diff Hours ' + this.displayName()); }\n /** Number of whole minutes between this timestamp and `other`. */\n diffMinutes(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.MINUTE, 'Diff Minutes ' + this.displayName()); }\n /** Number of whole seconds between this timestamp and `other`. */\n diffSeconds(other: Date): DateDiffOperation { return new DateDiffOperation(this.cwj(), other, DatePart.SECOND, 'Diff Seconds ' + this.displayName()); }\n}\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 /** 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}\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 ) { 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\nexport class Alias extends RelationalOperationElement {\n constructor(readonly element: RelationalOperationElement, readonly name: string) { super(); }\n}\n\n/** Returned by `RelatedFinder.exists()`. A backend translates it to a join-presence check. */\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\n/** Returned by `RelatedFinder.notExists()`. A backend translates it to a join-absence check. */\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 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 ) {}\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 private readonly _embedded?: Attribute;\n\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n embedded?: Attribute,\n ) {\n this._displayName = displayName;\n this._column = new Column(columnName, columnDbType, owner);\n this._owner = owner;\n this._parent = parent;\n this._embedded = embedded;\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 /** Alternate attribute on a flat column of the owning table, used in place of this one when its join is elided. */\n embedded(): Attribute | undefined { return this._embedded; }\n\n cwj(): ColumnWithJoin {\n return new ColumnWithJoin(this._column, this._parent, this._embedded?.cwj());\n }\n\n /** Count the number of non-null values. Use in a projection with `groupByOp` to aggregate per group. */\n count(): AggregateOperation {\n return new AggregateOperation(\n this.cwj(),\n AggregateOperator.COUNT,\n this._displayName + ' Count',\n );\n }\n\n /** Sort this attribute in ascending order. Pass to `orderByOp` or a window function's `orderBy`. */\n ascending(): SortOperation {\n return new SortOperation(this.cwj(), SortDirection.ASC);\n }\n\n /** Sort this attribute in descending order. Pass to `orderByOp` or a window function's `orderBy`. */\n descending(): SortOperation {\n return new SortOperation(this.cwj(), SortDirection.DESC);\n }\n\n /** Filter to rows where this attribute has no value. */\n isNull(): IsNullOperation {\n return new IsNullOperation(this.cwj());\n }\n\n /** Filter to rows where this attribute has a value. */\n isNotNull(): IsNotNullOperation {\n return new IsNotNullOperation(this.cwj());\n }\n\n private _windowSpec(\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | ColumnWithJoin)[],\n orderBy?: SortOperation | SortOperation[],\n ): WindowSpecification {\n const pbArr = partitionBy === undefined ? [] : Array.isArray(partitionBy) ? partitionBy : [partitionBy];\n const pb = pbArr.map(x => x instanceof Attribute ? x.cwj() : x);\n const ob = orderBy === undefined ? [] : Array.isArray(orderBy) ? orderBy : [orderBy];\n return new WindowSpecification(pb, ob);\n }\n\n /**\n * Assign a rank to each row within the ordered window, following pandas `Series.rank` conventions.\n *\n * `method` controls tie-breaking (default `'min'`):\n * - `'min'` — tied rows share the lowest rank; the next rank skips.\n * - `'dense'` — like `'min'` but ranks are contiguous (no gaps).\n * - `'first'` — each row gets a unique sequential integer (no ties).\n * - `'max'` — only meaningful with `pct: true` (see below).\n *\n * When `pct: true` the result is a relative rank between 0 and 1:\n * - `method: 'min'` (default) → fraction of values strictly below this row (PERCENT_RANK).\n * - `method: 'max'` → fraction of values at or below this row (cumulative distribution).\n *\n * `partitionBy` restarts the ranking within each group of distinct values.\n */\n rank(opts: {\n method?: 'min' | 'dense' | 'first' | 'max';\n pct?: boolean;\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | 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') { 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 /**\n * Split rows into `buckets` equal-sized quantile bins ordered by `orderBy`.\n * Each row receives a bucket number from 1 (lowest) to `buckets` (highest).\n * Named after `pandas.qcut`.\n */\n qcut(buckets: number, opts: {\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | 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 /**\n * Return the value of this attribute from `periods` rows earlier (positive) or later (negative)\n * within the ordered window, following `pandas.Series.shift`.\n * Rows with no neighbour at the given offset return `null` (or `fillValue` if provided).\n */\n shift(periods = 1, opts: {\n fillValue?: string | number;\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | 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 this.cwj(),\n func,\n label + ' ' + this._displayName,\n Math.abs(periods),\n extraArgs,\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n /**\n * Return the first value of this attribute in the window frame.\n * Use `partitionBy` to restart the frame for each group.\n */\n first(opts: {\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | ColumnWithJoin)[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n this.cwj(),\n WindowFunction.FIRST_VALUE,\n 'First ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n /**\n * Return the last value of this attribute in the window frame.\n * Use `partitionBy` to restart the frame for each group.\n */\n last(opts: {\n partitionBy?: Attribute | ColumnWithJoin | (Attribute | ColumnWithJoin)[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n this.cwj(),\n WindowFunction.LAST_VALUE,\n 'Last ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;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;AAQO,IAAe,oBAAf,cAAyC,2BAA2B;AAAC;AAErE,IAAM,2BAAN,cAAuC,kBAAkB;AAAA,EAC9D,YAAqB,OAAe;AAAE,UAAM;AAAvB;AAAA,EAA0B;AAAA,EAA1B;AACvB;AAEO,IAAM,yBAAN,cAAqC,kBAAkB;AAAA,EAC5D,YAAqB,OAAe;AAAE,UAAM;AAAvB;AAAA,EAA0B;AAAA,EAA1B;AACvB;AAEO,IAAM,0BAAN,cAAsC,kBAAkB;AAAA,EAC7D,YAAqB,OAAe;AAAE,UAAM;AAAvB;AAAA,EAA0B;AAAA,EAA1B;AACvB;AAEO,IAAM,wBAAN,cAAoC,kBAAkB;AAAA,EAC3D,YAAqB,OAAa;AAAE,UAAM;AAArB;AAAA,EAAwB;AAAA,EAAxB;AACvB;AAEO,IAAM,4BAAN,cAAwC,kBAAkB;AAAA,EAC/D,YAAqB,OAAa;AAAE,UAAM;AAArB;AAAA,EAAwB;AAAA,EAAxB;AACvB;AAEO,IAAM,2BAAN,cAAuC,kBAAkB;AAAA,EAC9D,YAAq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AAE,WAAO,IAAI,kBAAkB,KAAK,IAAI,GAAG,8BAAwB,kBAAkB,KAAK,YAAY,CAAC;AAAA,EAAG;AAAA;AAAA,EAEtJ,YAAY,OAAgC;AAAE,WAAO,IAAI,kBAAkB,KAAK,IAAI,GAAG,8BAAwB,kBAAkB,KAAK,YAAY,CAAC;AAAA,EAAG;AACxJ;","names":[]}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Attribute } from './attribute.cjs';
|
|
2
|
+
import { JoinTreeNodeOperation, Operation, DateExtractOperation, DateArithmeticOperation, DateDiffOperation, AggregateOperation, ScalarFunctionOperation } from '../model/relational.cjs';
|
|
3
|
+
|
|
4
|
+
declare class StringAttribute extends Attribute {
|
|
5
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
6
|
+
/** Convert every character to uppercase. */
|
|
7
|
+
toUpperCase(): ScalarFunctionOperation;
|
|
8
|
+
/** Convert every character to lowercase. */
|
|
9
|
+
toLowerCase(): ScalarFunctionOperation;
|
|
10
|
+
/** Remove leading and trailing whitespace. */
|
|
11
|
+
trim(): ScalarFunctionOperation;
|
|
12
|
+
/** Remove leading whitespace. */
|
|
13
|
+
trimStart(): ScalarFunctionOperation;
|
|
14
|
+
/** Remove trailing whitespace. */
|
|
15
|
+
trimEnd(): ScalarFunctionOperation;
|
|
16
|
+
/** Return the number of characters in the string. */
|
|
17
|
+
length(): ScalarFunctionOperation;
|
|
18
|
+
/** Return the string with characters in reverse order. */
|
|
19
|
+
reverse(): ScalarFunctionOperation;
|
|
20
|
+
/** Return the first `n` characters. */
|
|
21
|
+
left(n: number): ScalarFunctionOperation;
|
|
22
|
+
/** Return the last `n` characters. */
|
|
23
|
+
right(n: number): ScalarFunctionOperation;
|
|
24
|
+
/** Return the string repeated `n` times. */
|
|
25
|
+
repeat(n: number): ScalarFunctionOperation;
|
|
26
|
+
/** Replace all occurrences of `fromStr` with `toStr`. */
|
|
27
|
+
replace(fromStr: string, toStr: string): ScalarFunctionOperation;
|
|
28
|
+
/**
|
|
29
|
+
* Extract a portion of the string.
|
|
30
|
+
* `start` is zero-based (following Python convention); `length` is optional.
|
|
31
|
+
*/
|
|
32
|
+
substring(start: number, length?: number): ScalarFunctionOperation;
|
|
33
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
34
|
+
eq(value: string): Operation;
|
|
35
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
36
|
+
ne(value: string): Operation;
|
|
37
|
+
/** Filter to rows where this attribute contains `value` as a substring. */
|
|
38
|
+
contains(value: string): Operation;
|
|
39
|
+
/** Filter to rows where this attribute begins with `prefix`. */
|
|
40
|
+
startsWith(prefix: string): Operation;
|
|
41
|
+
/** Filter to rows where this attribute ends with `suffix`. */
|
|
42
|
+
endsWith(suffix: string): Operation;
|
|
43
|
+
/** Filter to rows where this attribute does not contain `value` as a substring. */
|
|
44
|
+
notContains(value: string): Operation;
|
|
45
|
+
}
|
|
46
|
+
declare abstract class NumericAttribute extends Attribute {
|
|
47
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
48
|
+
/** Sum of all values in the group. */
|
|
49
|
+
sum(): AggregateOperation;
|
|
50
|
+
/** Smallest value in the group. */
|
|
51
|
+
min(): AggregateOperation;
|
|
52
|
+
/** Largest value in the group. */
|
|
53
|
+
max(): AggregateOperation;
|
|
54
|
+
/** Arithmetic mean of all values in the group. */
|
|
55
|
+
average(): AggregateOperation;
|
|
56
|
+
/** Absolute value (distance from zero, always non-negative). */
|
|
57
|
+
abs(): ScalarFunctionOperation;
|
|
58
|
+
/** Round up to the nearest integer. */
|
|
59
|
+
ceil(): ScalarFunctionOperation;
|
|
60
|
+
/** Round down to the nearest integer. */
|
|
61
|
+
floor(): ScalarFunctionOperation;
|
|
62
|
+
/** Square root. */
|
|
63
|
+
sqrt(): ScalarFunctionOperation;
|
|
64
|
+
/** Remainder after dividing by `n`. */
|
|
65
|
+
mod(n: number): ScalarFunctionOperation;
|
|
66
|
+
/** Raise to the power of `n`. */
|
|
67
|
+
power(n: number): ScalarFunctionOperation;
|
|
68
|
+
/** Round to `d` decimal places, or to the nearest integer when `d` is omitted. */
|
|
69
|
+
round(d?: number): ScalarFunctionOperation;
|
|
70
|
+
}
|
|
71
|
+
declare class DoubleAttribute extends NumericAttribute {
|
|
72
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
73
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
74
|
+
eq(value: number): Operation;
|
|
75
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
76
|
+
ne(value: number): Operation;
|
|
77
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
78
|
+
gt(value: number): Operation;
|
|
79
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
80
|
+
lt(value: number): Operation;
|
|
81
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
82
|
+
gte(value: number): Operation;
|
|
83
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
84
|
+
lte(value: number): Operation;
|
|
85
|
+
}
|
|
86
|
+
declare const FloatAttribute: typeof DoubleAttribute;
|
|
87
|
+
type FloatAttribute = DoubleAttribute;
|
|
88
|
+
declare class DecimalAttribute extends NumericAttribute {
|
|
89
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
90
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
91
|
+
eq(value: number): Operation;
|
|
92
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
93
|
+
ne(value: number): Operation;
|
|
94
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
95
|
+
gt(value: number): Operation;
|
|
96
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
97
|
+
lt(value: number): Operation;
|
|
98
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
99
|
+
gte(value: number): Operation;
|
|
100
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
101
|
+
lte(value: number): Operation;
|
|
102
|
+
}
|
|
103
|
+
declare class IntegerAttribute extends NumericAttribute {
|
|
104
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
105
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
106
|
+
eq(value: number): Operation;
|
|
107
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
108
|
+
ne(value: number): Operation;
|
|
109
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
110
|
+
gt(value: number): Operation;
|
|
111
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
112
|
+
lt(value: number): Operation;
|
|
113
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
114
|
+
gte(value: number): Operation;
|
|
115
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
116
|
+
lte(value: number): Operation;
|
|
117
|
+
}
|
|
118
|
+
declare class BooleanAttribute extends Attribute {
|
|
119
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
120
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
121
|
+
eq(value: boolean): Operation;
|
|
122
|
+
/** Filter to rows where this attribute is true. */
|
|
123
|
+
isTrue(): Operation;
|
|
124
|
+
/** Filter to rows where this attribute is false. */
|
|
125
|
+
isFalse(): Operation;
|
|
126
|
+
}
|
|
127
|
+
declare class DateAttribute extends Attribute {
|
|
128
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
129
|
+
/** Filter to rows where this date equals `value`. */
|
|
130
|
+
eq(value: Date | string): Operation;
|
|
131
|
+
/** Filter to rows where this date does not equal `value`. */
|
|
132
|
+
ne(value: Date | string): Operation;
|
|
133
|
+
/** Filter to rows where this date is after `value`. */
|
|
134
|
+
gt(value: Date | string): Operation;
|
|
135
|
+
/** Filter to rows where this date is before `value`. */
|
|
136
|
+
lt(value: Date | string): Operation;
|
|
137
|
+
/** Filter to rows where this date is on or after `value`. */
|
|
138
|
+
gte(value: Date | string): Operation;
|
|
139
|
+
/** Filter to rows where this date is on or before `value`. */
|
|
140
|
+
lte(value: Date | string): Operation;
|
|
141
|
+
/** Extract the four-digit calendar year. */
|
|
142
|
+
year(): DateExtractOperation;
|
|
143
|
+
/** Extract the month number (1–12). */
|
|
144
|
+
month(): DateExtractOperation;
|
|
145
|
+
/** Extract the day of the month (1–31). */
|
|
146
|
+
day(): DateExtractOperation;
|
|
147
|
+
/** Extract the quarter (1–4). */
|
|
148
|
+
quarter(): DateExtractOperation;
|
|
149
|
+
/** Extract the ISO week number (1–53). */
|
|
150
|
+
week(): DateExtractOperation;
|
|
151
|
+
/** Extract the day of the week (0 = Sunday through 6 = Saturday). */
|
|
152
|
+
dayOfWeek(): DateExtractOperation;
|
|
153
|
+
/** Add `n` days to this date. */
|
|
154
|
+
addDays(n: number): DateArithmeticOperation;
|
|
155
|
+
/** Add `n` months to this date. */
|
|
156
|
+
addMonths(n: number): DateArithmeticOperation;
|
|
157
|
+
/** Add `n` years to this date. */
|
|
158
|
+
addYears(n: number): DateArithmeticOperation;
|
|
159
|
+
/** Subtract `n` days from this date. */
|
|
160
|
+
subtractDays(n: number): DateArithmeticOperation;
|
|
161
|
+
/** Subtract `n` months from this date. */
|
|
162
|
+
subtractMonths(n: number): DateArithmeticOperation;
|
|
163
|
+
/** Subtract `n` years from this date. */
|
|
164
|
+
subtractYears(n: number): DateArithmeticOperation;
|
|
165
|
+
/** Number of whole days between this date and `other`. */
|
|
166
|
+
diffDays(other: Date): DateDiffOperation;
|
|
167
|
+
/** Number of whole months between this date and `other`. */
|
|
168
|
+
diffMonths(other: Date): DateDiffOperation;
|
|
169
|
+
/** Number of whole years between this date and `other`. */
|
|
170
|
+
diffYears(other: Date): DateDiffOperation;
|
|
171
|
+
}
|
|
172
|
+
declare class DateTimeAttribute extends Attribute {
|
|
173
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
174
|
+
/** Filter to rows where this timestamp equals `value`. */
|
|
175
|
+
eq(value: Date | string): Operation;
|
|
176
|
+
/** Filter to rows where this timestamp does not equal `value`. */
|
|
177
|
+
ne(value: Date | string): Operation;
|
|
178
|
+
/** Filter to rows where this timestamp is after `value`. */
|
|
179
|
+
gt(value: Date | string): Operation;
|
|
180
|
+
/** Filter to rows where this timestamp is before `value`. */
|
|
181
|
+
lt(value: Date | string): Operation;
|
|
182
|
+
/** Filter to rows where this timestamp is on or after `value`. */
|
|
183
|
+
gte(value: Date | string): Operation;
|
|
184
|
+
/** Filter to rows where this timestamp is on or before `value`. */
|
|
185
|
+
lte(value: Date | string): Operation;
|
|
186
|
+
/** Extract the four-digit calendar year. */
|
|
187
|
+
year(): DateExtractOperation;
|
|
188
|
+
/** Extract the month number (1–12). */
|
|
189
|
+
month(): DateExtractOperation;
|
|
190
|
+
/** Extract the day of the month (1–31). */
|
|
191
|
+
day(): DateExtractOperation;
|
|
192
|
+
/** Extract the hour (0–23). */
|
|
193
|
+
hour(): DateExtractOperation;
|
|
194
|
+
/** Extract the minute (0–59). */
|
|
195
|
+
minute(): DateExtractOperation;
|
|
196
|
+
/** Extract the second (0–59). */
|
|
197
|
+
second(): DateExtractOperation;
|
|
198
|
+
/** Extract the quarter (1–4). */
|
|
199
|
+
quarter(): DateExtractOperation;
|
|
200
|
+
/** Extract the ISO week number (1–53). */
|
|
201
|
+
week(): DateExtractOperation;
|
|
202
|
+
/** Extract the day of the week (0 = Sunday through 6 = Saturday). */
|
|
203
|
+
dayOfWeek(): DateExtractOperation;
|
|
204
|
+
/** Add `n` days to this timestamp. */
|
|
205
|
+
addDays(n: number): DateArithmeticOperation;
|
|
206
|
+
/** Add `n` months to this timestamp. */
|
|
207
|
+
addMonths(n: number): DateArithmeticOperation;
|
|
208
|
+
/** Add `n` years to this timestamp. */
|
|
209
|
+
addYears(n: number): DateArithmeticOperation;
|
|
210
|
+
/** Add `n` hours to this timestamp. */
|
|
211
|
+
addHours(n: number): DateArithmeticOperation;
|
|
212
|
+
/** Add `n` minutes to this timestamp. */
|
|
213
|
+
addMinutes(n: number): DateArithmeticOperation;
|
|
214
|
+
/** Add `n` seconds to this timestamp. */
|
|
215
|
+
addSeconds(n: number): DateArithmeticOperation;
|
|
216
|
+
/** Subtract `n` days from this timestamp. */
|
|
217
|
+
subtractDays(n: number): DateArithmeticOperation;
|
|
218
|
+
/** Subtract `n` months from this timestamp. */
|
|
219
|
+
subtractMonths(n: number): DateArithmeticOperation;
|
|
220
|
+
/** Subtract `n` years from this timestamp. */
|
|
221
|
+
subtractYears(n: number): DateArithmeticOperation;
|
|
222
|
+
/** Subtract `n` hours from this timestamp. */
|
|
223
|
+
subtractHours(n: number): DateArithmeticOperation;
|
|
224
|
+
/** Subtract `n` minutes from this timestamp. */
|
|
225
|
+
subtractMinutes(n: number): DateArithmeticOperation;
|
|
226
|
+
/** Subtract `n` seconds from this timestamp. */
|
|
227
|
+
subtractSeconds(n: number): DateArithmeticOperation;
|
|
228
|
+
/** Number of whole days between this timestamp and `other`. */
|
|
229
|
+
diffDays(other: Date): DateDiffOperation;
|
|
230
|
+
/** Number of whole months between this timestamp and `other`. */
|
|
231
|
+
diffMonths(other: Date): DateDiffOperation;
|
|
232
|
+
/** Number of whole years between this timestamp and `other`. */
|
|
233
|
+
diffYears(other: Date): DateDiffOperation;
|
|
234
|
+
/** Number of whole hours between this timestamp and `other`. */
|
|
235
|
+
diffHours(other: Date): DateDiffOperation;
|
|
236
|
+
/** Number of whole minutes between this timestamp and `other`. */
|
|
237
|
+
diffMinutes(other: Date): DateDiffOperation;
|
|
238
|
+
/** Number of whole seconds between this timestamp and `other`. */
|
|
239
|
+
diffSeconds(other: Date): DateDiffOperation;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { BooleanAttribute, DateAttribute, DateTimeAttribute, DecimalAttribute, DoubleAttribute, FloatAttribute, IntegerAttribute, NumericAttribute, StringAttribute };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { Attribute } from './attribute.js';
|
|
2
|
+
import { JoinTreeNodeOperation, Operation, DateExtractOperation, DateArithmeticOperation, DateDiffOperation, AggregateOperation, ScalarFunctionOperation } from '../model/relational.js';
|
|
3
|
+
|
|
4
|
+
declare class StringAttribute extends Attribute {
|
|
5
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
6
|
+
/** Convert every character to uppercase. */
|
|
7
|
+
toUpperCase(): ScalarFunctionOperation;
|
|
8
|
+
/** Convert every character to lowercase. */
|
|
9
|
+
toLowerCase(): ScalarFunctionOperation;
|
|
10
|
+
/** Remove leading and trailing whitespace. */
|
|
11
|
+
trim(): ScalarFunctionOperation;
|
|
12
|
+
/** Remove leading whitespace. */
|
|
13
|
+
trimStart(): ScalarFunctionOperation;
|
|
14
|
+
/** Remove trailing whitespace. */
|
|
15
|
+
trimEnd(): ScalarFunctionOperation;
|
|
16
|
+
/** Return the number of characters in the string. */
|
|
17
|
+
length(): ScalarFunctionOperation;
|
|
18
|
+
/** Return the string with characters in reverse order. */
|
|
19
|
+
reverse(): ScalarFunctionOperation;
|
|
20
|
+
/** Return the first `n` characters. */
|
|
21
|
+
left(n: number): ScalarFunctionOperation;
|
|
22
|
+
/** Return the last `n` characters. */
|
|
23
|
+
right(n: number): ScalarFunctionOperation;
|
|
24
|
+
/** Return the string repeated `n` times. */
|
|
25
|
+
repeat(n: number): ScalarFunctionOperation;
|
|
26
|
+
/** Replace all occurrences of `fromStr` with `toStr`. */
|
|
27
|
+
replace(fromStr: string, toStr: string): ScalarFunctionOperation;
|
|
28
|
+
/**
|
|
29
|
+
* Extract a portion of the string.
|
|
30
|
+
* `start` is zero-based (following Python convention); `length` is optional.
|
|
31
|
+
*/
|
|
32
|
+
substring(start: number, length?: number): ScalarFunctionOperation;
|
|
33
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
34
|
+
eq(value: string): Operation;
|
|
35
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
36
|
+
ne(value: string): Operation;
|
|
37
|
+
/** Filter to rows where this attribute contains `value` as a substring. */
|
|
38
|
+
contains(value: string): Operation;
|
|
39
|
+
/** Filter to rows where this attribute begins with `prefix`. */
|
|
40
|
+
startsWith(prefix: string): Operation;
|
|
41
|
+
/** Filter to rows where this attribute ends with `suffix`. */
|
|
42
|
+
endsWith(suffix: string): Operation;
|
|
43
|
+
/** Filter to rows where this attribute does not contain `value` as a substring. */
|
|
44
|
+
notContains(value: string): Operation;
|
|
45
|
+
}
|
|
46
|
+
declare abstract class NumericAttribute extends Attribute {
|
|
47
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
48
|
+
/** Sum of all values in the group. */
|
|
49
|
+
sum(): AggregateOperation;
|
|
50
|
+
/** Smallest value in the group. */
|
|
51
|
+
min(): AggregateOperation;
|
|
52
|
+
/** Largest value in the group. */
|
|
53
|
+
max(): AggregateOperation;
|
|
54
|
+
/** Arithmetic mean of all values in the group. */
|
|
55
|
+
average(): AggregateOperation;
|
|
56
|
+
/** Absolute value (distance from zero, always non-negative). */
|
|
57
|
+
abs(): ScalarFunctionOperation;
|
|
58
|
+
/** Round up to the nearest integer. */
|
|
59
|
+
ceil(): ScalarFunctionOperation;
|
|
60
|
+
/** Round down to the nearest integer. */
|
|
61
|
+
floor(): ScalarFunctionOperation;
|
|
62
|
+
/** Square root. */
|
|
63
|
+
sqrt(): ScalarFunctionOperation;
|
|
64
|
+
/** Remainder after dividing by `n`. */
|
|
65
|
+
mod(n: number): ScalarFunctionOperation;
|
|
66
|
+
/** Raise to the power of `n`. */
|
|
67
|
+
power(n: number): ScalarFunctionOperation;
|
|
68
|
+
/** Round to `d` decimal places, or to the nearest integer when `d` is omitted. */
|
|
69
|
+
round(d?: number): ScalarFunctionOperation;
|
|
70
|
+
}
|
|
71
|
+
declare class DoubleAttribute extends NumericAttribute {
|
|
72
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
73
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
74
|
+
eq(value: number): Operation;
|
|
75
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
76
|
+
ne(value: number): Operation;
|
|
77
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
78
|
+
gt(value: number): Operation;
|
|
79
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
80
|
+
lt(value: number): Operation;
|
|
81
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
82
|
+
gte(value: number): Operation;
|
|
83
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
84
|
+
lte(value: number): Operation;
|
|
85
|
+
}
|
|
86
|
+
declare const FloatAttribute: typeof DoubleAttribute;
|
|
87
|
+
type FloatAttribute = DoubleAttribute;
|
|
88
|
+
declare class DecimalAttribute extends NumericAttribute {
|
|
89
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
90
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
91
|
+
eq(value: number): Operation;
|
|
92
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
93
|
+
ne(value: number): Operation;
|
|
94
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
95
|
+
gt(value: number): Operation;
|
|
96
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
97
|
+
lt(value: number): Operation;
|
|
98
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
99
|
+
gte(value: number): Operation;
|
|
100
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
101
|
+
lte(value: number): Operation;
|
|
102
|
+
}
|
|
103
|
+
declare class IntegerAttribute extends NumericAttribute {
|
|
104
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
105
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
106
|
+
eq(value: number): Operation;
|
|
107
|
+
/** Filter to rows where this attribute does not equal `value`. */
|
|
108
|
+
ne(value: number): Operation;
|
|
109
|
+
/** Filter to rows where this attribute is greater than `value`. */
|
|
110
|
+
gt(value: number): Operation;
|
|
111
|
+
/** Filter to rows where this attribute is less than `value`. */
|
|
112
|
+
lt(value: number): Operation;
|
|
113
|
+
/** Filter to rows where this attribute is greater than or equal to `value`. */
|
|
114
|
+
gte(value: number): Operation;
|
|
115
|
+
/** Filter to rows where this attribute is less than or equal to `value`. */
|
|
116
|
+
lte(value: number): Operation;
|
|
117
|
+
}
|
|
118
|
+
declare class BooleanAttribute extends Attribute {
|
|
119
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
120
|
+
/** Filter to rows where this attribute equals `value`. */
|
|
121
|
+
eq(value: boolean): Operation;
|
|
122
|
+
/** Filter to rows where this attribute is true. */
|
|
123
|
+
isTrue(): Operation;
|
|
124
|
+
/** Filter to rows where this attribute is false. */
|
|
125
|
+
isFalse(): Operation;
|
|
126
|
+
}
|
|
127
|
+
declare class DateAttribute extends Attribute {
|
|
128
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
129
|
+
/** Filter to rows where this date equals `value`. */
|
|
130
|
+
eq(value: Date | string): Operation;
|
|
131
|
+
/** Filter to rows where this date does not equal `value`. */
|
|
132
|
+
ne(value: Date | string): Operation;
|
|
133
|
+
/** Filter to rows where this date is after `value`. */
|
|
134
|
+
gt(value: Date | string): Operation;
|
|
135
|
+
/** Filter to rows where this date is before `value`. */
|
|
136
|
+
lt(value: Date | string): Operation;
|
|
137
|
+
/** Filter to rows where this date is on or after `value`. */
|
|
138
|
+
gte(value: Date | string): Operation;
|
|
139
|
+
/** Filter to rows where this date is on or before `value`. */
|
|
140
|
+
lte(value: Date | string): Operation;
|
|
141
|
+
/** Extract the four-digit calendar year. */
|
|
142
|
+
year(): DateExtractOperation;
|
|
143
|
+
/** Extract the month number (1–12). */
|
|
144
|
+
month(): DateExtractOperation;
|
|
145
|
+
/** Extract the day of the month (1–31). */
|
|
146
|
+
day(): DateExtractOperation;
|
|
147
|
+
/** Extract the quarter (1–4). */
|
|
148
|
+
quarter(): DateExtractOperation;
|
|
149
|
+
/** Extract the ISO week number (1–53). */
|
|
150
|
+
week(): DateExtractOperation;
|
|
151
|
+
/** Extract the day of the week (0 = Sunday through 6 = Saturday). */
|
|
152
|
+
dayOfWeek(): DateExtractOperation;
|
|
153
|
+
/** Add `n` days to this date. */
|
|
154
|
+
addDays(n: number): DateArithmeticOperation;
|
|
155
|
+
/** Add `n` months to this date. */
|
|
156
|
+
addMonths(n: number): DateArithmeticOperation;
|
|
157
|
+
/** Add `n` years to this date. */
|
|
158
|
+
addYears(n: number): DateArithmeticOperation;
|
|
159
|
+
/** Subtract `n` days from this date. */
|
|
160
|
+
subtractDays(n: number): DateArithmeticOperation;
|
|
161
|
+
/** Subtract `n` months from this date. */
|
|
162
|
+
subtractMonths(n: number): DateArithmeticOperation;
|
|
163
|
+
/** Subtract `n` years from this date. */
|
|
164
|
+
subtractYears(n: number): DateArithmeticOperation;
|
|
165
|
+
/** Number of whole days between this date and `other`. */
|
|
166
|
+
diffDays(other: Date): DateDiffOperation;
|
|
167
|
+
/** Number of whole months between this date and `other`. */
|
|
168
|
+
diffMonths(other: Date): DateDiffOperation;
|
|
169
|
+
/** Number of whole years between this date and `other`. */
|
|
170
|
+
diffYears(other: Date): DateDiffOperation;
|
|
171
|
+
}
|
|
172
|
+
declare class DateTimeAttribute extends Attribute {
|
|
173
|
+
constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute);
|
|
174
|
+
/** Filter to rows where this timestamp equals `value`. */
|
|
175
|
+
eq(value: Date | string): Operation;
|
|
176
|
+
/** Filter to rows where this timestamp does not equal `value`. */
|
|
177
|
+
ne(value: Date | string): Operation;
|
|
178
|
+
/** Filter to rows where this timestamp is after `value`. */
|
|
179
|
+
gt(value: Date | string): Operation;
|
|
180
|
+
/** Filter to rows where this timestamp is before `value`. */
|
|
181
|
+
lt(value: Date | string): Operation;
|
|
182
|
+
/** Filter to rows where this timestamp is on or after `value`. */
|
|
183
|
+
gte(value: Date | string): Operation;
|
|
184
|
+
/** Filter to rows where this timestamp is on or before `value`. */
|
|
185
|
+
lte(value: Date | string): Operation;
|
|
186
|
+
/** Extract the four-digit calendar year. */
|
|
187
|
+
year(): DateExtractOperation;
|
|
188
|
+
/** Extract the month number (1–12). */
|
|
189
|
+
month(): DateExtractOperation;
|
|
190
|
+
/** Extract the day of the month (1–31). */
|
|
191
|
+
day(): DateExtractOperation;
|
|
192
|
+
/** Extract the hour (0–23). */
|
|
193
|
+
hour(): DateExtractOperation;
|
|
194
|
+
/** Extract the minute (0–59). */
|
|
195
|
+
minute(): DateExtractOperation;
|
|
196
|
+
/** Extract the second (0–59). */
|
|
197
|
+
second(): DateExtractOperation;
|
|
198
|
+
/** Extract the quarter (1–4). */
|
|
199
|
+
quarter(): DateExtractOperation;
|
|
200
|
+
/** Extract the ISO week number (1–53). */
|
|
201
|
+
week(): DateExtractOperation;
|
|
202
|
+
/** Extract the day of the week (0 = Sunday through 6 = Saturday). */
|
|
203
|
+
dayOfWeek(): DateExtractOperation;
|
|
204
|
+
/** Add `n` days to this timestamp. */
|
|
205
|
+
addDays(n: number): DateArithmeticOperation;
|
|
206
|
+
/** Add `n` months to this timestamp. */
|
|
207
|
+
addMonths(n: number): DateArithmeticOperation;
|
|
208
|
+
/** Add `n` years to this timestamp. */
|
|
209
|
+
addYears(n: number): DateArithmeticOperation;
|
|
210
|
+
/** Add `n` hours to this timestamp. */
|
|
211
|
+
addHours(n: number): DateArithmeticOperation;
|
|
212
|
+
/** Add `n` minutes to this timestamp. */
|
|
213
|
+
addMinutes(n: number): DateArithmeticOperation;
|
|
214
|
+
/** Add `n` seconds to this timestamp. */
|
|
215
|
+
addSeconds(n: number): DateArithmeticOperation;
|
|
216
|
+
/** Subtract `n` days from this timestamp. */
|
|
217
|
+
subtractDays(n: number): DateArithmeticOperation;
|
|
218
|
+
/** Subtract `n` months from this timestamp. */
|
|
219
|
+
subtractMonths(n: number): DateArithmeticOperation;
|
|
220
|
+
/** Subtract `n` years from this timestamp. */
|
|
221
|
+
subtractYears(n: number): DateArithmeticOperation;
|
|
222
|
+
/** Subtract `n` hours from this timestamp. */
|
|
223
|
+
subtractHours(n: number): DateArithmeticOperation;
|
|
224
|
+
/** Subtract `n` minutes from this timestamp. */
|
|
225
|
+
subtractMinutes(n: number): DateArithmeticOperation;
|
|
226
|
+
/** Subtract `n` seconds from this timestamp. */
|
|
227
|
+
subtractSeconds(n: number): DateArithmeticOperation;
|
|
228
|
+
/** Number of whole days between this timestamp and `other`. */
|
|
229
|
+
diffDays(other: Date): DateDiffOperation;
|
|
230
|
+
/** Number of whole months between this timestamp and `other`. */
|
|
231
|
+
diffMonths(other: Date): DateDiffOperation;
|
|
232
|
+
/** Number of whole years between this timestamp and `other`. */
|
|
233
|
+
diffYears(other: Date): DateDiffOperation;
|
|
234
|
+
/** Number of whole hours between this timestamp and `other`. */
|
|
235
|
+
diffHours(other: Date): DateDiffOperation;
|
|
236
|
+
/** Number of whole minutes between this timestamp and `other`. */
|
|
237
|
+
diffMinutes(other: Date): DateDiffOperation;
|
|
238
|
+
/** Number of whole seconds between this timestamp and `other`. */
|
|
239
|
+
diffSeconds(other: Date): DateDiffOperation;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { BooleanAttribute, DateAttribute, DateTimeAttribute, DecimalAttribute, DoubleAttribute, FloatAttribute, IntegerAttribute, NumericAttribute, StringAttribute };
|