data-finder-ts 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/chunk-3SSWFES4.js +448 -0
  2. package/dist/chunk-3SSWFES4.js.map +1 -0
  3. package/dist/chunk-5K2Z3YDY.js +393 -0
  4. package/dist/chunk-5K2Z3YDY.js.map +1 -0
  5. package/dist/chunk-6QTCGJWX.js +98 -0
  6. package/dist/chunk-6QTCGJWX.js.map +1 -0
  7. package/dist/chunk-DFYZVBII.js +652 -0
  8. package/dist/chunk-DFYZVBII.js.map +1 -0
  9. package/dist/chunk-EYXBYV2X.js +90 -0
  10. package/dist/chunk-EYXBYV2X.js.map +1 -0
  11. package/dist/chunk-FLEIUDZZ.js +14 -0
  12. package/dist/chunk-FLEIUDZZ.js.map +1 -0
  13. package/dist/chunk-V647VNMY.js +135 -0
  14. package/dist/chunk-V647VNMY.js.map +1 -0
  15. package/dist/datafinder/attribute.cjs +269 -0
  16. package/dist/datafinder/attribute.cjs.map +1 -0
  17. package/dist/datafinder/attribute.d.cts +45 -0
  18. package/dist/datafinder/attribute.d.ts +45 -0
  19. package/dist/datafinder/attribute.js +8 -0
  20. package/dist/datafinder/attribute.js.map +1 -0
  21. package/dist/datafinder/finder-registry.cjs +39 -0
  22. package/dist/datafinder/finder-registry.cjs.map +1 -0
  23. package/dist/datafinder/finder-registry.d.cts +4 -0
  24. package/dist/datafinder/finder-registry.d.ts +4 -0
  25. package/dist/datafinder/finder-registry.js +9 -0
  26. package/dist/datafinder/finder-registry.js.map +1 -0
  27. package/dist/datafinder/runner.cjs +1346 -0
  28. package/dist/datafinder/runner.cjs.map +1 -0
  29. package/dist/datafinder/runner.d.cts +33 -0
  30. package/dist/datafinder/runner.d.ts +33 -0
  31. package/dist/datafinder/runner.js +20 -0
  32. package/dist/datafinder/runner.js.map +1 -0
  33. package/dist/datafinder/sql-generator.cjs +1261 -0
  34. package/dist/datafinder/sql-generator.cjs.map +1 -0
  35. package/dist/datafinder/sql-generator.d.cts +17 -0
  36. package/dist/datafinder/sql-generator.d.ts +17 -0
  37. package/dist/datafinder/sql-generator.js +17 -0
  38. package/dist/datafinder/sql-generator.js.map +1 -0
  39. package/dist/datafinder/typed-attributes.cjs +751 -0
  40. package/dist/datafinder/typed-attributes.cjs.map +1 -0
  41. package/dist/datafinder/typed-attributes.d.cts +135 -0
  42. package/dist/datafinder/typed-attributes.d.ts +135 -0
  43. package/dist/datafinder/typed-attributes.js +25 -0
  44. package/dist/datafinder/typed-attributes.js.map +1 -0
  45. package/dist/index.cjs +1822 -0
  46. package/dist/index.cjs.map +1 -0
  47. package/dist/index.d.cts +27 -0
  48. package/dist/index.d.ts +27 -0
  49. package/dist/index.js +159 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/model/milestoning.cjs +145 -0
  52. package/dist/model/milestoning.cjs.map +1 -0
  53. package/dist/model/milestoning.d.cts +40 -0
  54. package/dist/model/milestoning.d.ts +40 -0
  55. package/dist/model/milestoning.js +18 -0
  56. package/dist/model/milestoning.js.map +1 -0
  57. package/dist/model/relational.cjs +514 -0
  58. package/dist/model/relational.cjs.map +1 -0
  59. package/dist/model/relational.d.cts +246 -0
  60. package/dist/model/relational.d.ts +246 -0
  61. package/dist/model/relational.js +91 -0
  62. package/dist/model/relational.js.map +1 -0
  63. package/package.json +3 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/datafinder/attribute.ts","../../src/model/relational.ts"],"sourcesContent":["import {\n Column,\n AggregateOperation,\n AggregateOperator,\n ColumnWithJoin,\n SortOperation,\n SortDirection,\n IsNullOperation,\n IsNotNullOperation,\n JoinTreeNodeOperation,\n WindowFunction,\n WindowFunctionOperation,\n WindowSpecification,\n} from '../model/relational';\n\nexport abstract class Attribute {\n private readonly _displayName: string;\n private readonly _column: Column;\n private readonly _owner: string;\n private readonly _parent?: JoinTreeNodeOperation;\n\n constructor(\n displayName: string,\n columnName: string,\n columnDbType: string,\n owner: string,\n parent?: JoinTreeNodeOperation,\n ) {\n this._displayName = displayName;\n this._column = new Column(columnName, columnDbType, owner);\n this._owner = owner;\n this._parent = parent;\n }\n\n column(): Column { return this._column; }\n owner(): string { return this._owner; }\n parent(): JoinTreeNodeOperation | undefined { return this._parent; }\n displayName(): string { return this._displayName; }\n\n cwj(): ColumnWithJoin {\n return new ColumnWithJoin(this._column, this._parent);\n }\n\n count(): AggregateOperation {\n return new AggregateOperation(\n new ColumnWithJoin(this._column, this._parent),\n AggregateOperator.COUNT,\n this._displayName + ' Count',\n );\n }\n\n ascending(): SortOperation {\n return new SortOperation(new ColumnWithJoin(this._column, this._parent), SortDirection.ASC);\n }\n\n descending(): SortOperation {\n return new SortOperation(new ColumnWithJoin(this._column, this._parent), SortDirection.DESC);\n }\n\n isNull(): IsNullOperation {\n return new IsNullOperation(new ColumnWithJoin(this._column, this._parent));\n }\n\n isNotNull(): IsNotNullOperation {\n return new IsNotNullOperation(new ColumnWithJoin(this._column, this._parent));\n }\n\n private _windowSpec(\n partitionBy?: ColumnWithJoin | ColumnWithJoin[],\n orderBy?: SortOperation | SortOperation[],\n ): WindowSpecification {\n const pb = partitionBy === undefined ? [] : Array.isArray(partitionBy) ? partitionBy : [partitionBy];\n const ob = orderBy === undefined ? [] : Array.isArray(orderBy) ? orderBy : [orderBy];\n return new WindowSpecification(pb, ob);\n }\n\n rank(opts: {\n method?: 'min' | 'dense' | 'first';\n pct?: boolean;\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n const { method = 'min', pct = false, partitionBy, orderBy } = opts;\n let func: WindowFunction;\n let name: string;\n if (pct) {\n if (method === 'max' as string) { func = WindowFunction.CUME_DIST; name = 'Cume Dist'; }\n else { func = WindowFunction.PERCENT_RANK; name = 'Percent Rank'; }\n } else if (method === 'first') { func = WindowFunction.ROW_NUMBER; name = 'Row Number'; }\n else if (method === 'dense') { func = WindowFunction.DENSE_RANK; name = 'Dense Rank'; }\n else { func = WindowFunction.RANK; name = 'Rank'; }\n return new WindowFunctionOperation(null, func, name, undefined, [], this._windowSpec(partitionBy, orderBy));\n }\n\n qcut(buckets: number, opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(null, WindowFunction.NTILE, 'Quantile', buckets, [],\n this._windowSpec(opts.partitionBy, opts.orderBy));\n }\n\n shift(periods = 1, opts: {\n fillValue?: string | number;\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n const extraArgs: (string | number)[] = opts.fillValue !== undefined ? [opts.fillValue] : [];\n const func = periods >= 0 ? WindowFunction.LAG : WindowFunction.LEAD;\n const label = periods >= 0 ? 'Lag' : 'Lead';\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n func,\n label + ' ' + this._displayName,\n Math.abs(periods),\n extraArgs,\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n first(opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n WindowFunction.FIRST_VALUE,\n 'First ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n\n last(opts: {\n partitionBy?: ColumnWithJoin | ColumnWithJoin[];\n orderBy?: SortOperation | SortOperation[];\n } = {}): WindowFunctionOperation {\n return new WindowFunctionOperation(\n new ColumnWithJoin(this._column, this._parent),\n WindowFunction.LAST_VALUE,\n 'Last ' + this._displayName,\n undefined, [],\n this._windowSpec(opts.partitionBy, opts.orderBy),\n );\n }\n}\n","export enum ComparisonOperator {\n EQUAL = 'EQUAL',\n NOT_EQUAL = 'NOT_EQUAL',\n LESS_THAN = 'LESS_THAN',\n GREATER_THAN = 'GREATER_THAN',\n LESS_THAN_OR_EQUAL_TO = 'LESS_THAN_OR_EQUAL_TO',\n GREATER_THAN_OR_EQUAL_TO = 'GREATER_THAN_OR_EQUAL_TO',\n LIKE = 'LIKE',\n NOT_LIKE = 'NOT_LIKE',\n}\n\nexport enum LogicalOperator {\n AND = 'AND',\n OR = 'OR',\n}\n\nexport enum AggregateOperator {\n COUNT = 'COUNT',\n SUM = 'SUM',\n MIN = 'MIN',\n MAX = 'MAX',\n AVERAGE = 'AVERAGE',\n}\n\nexport enum ScalarFunction {\n ABS = 'ABS',\n CEILING = 'CEILING',\n FLOOR = 'FLOOR',\n MOD = 'MOD',\n POWER = 'POWER',\n SQRT = 'SQRT',\n ROUND = 'ROUND',\n UPPER = 'UPPER',\n LOWER = 'LOWER',\n TRIM = 'TRIM',\n LTRIM = 'LTRIM',\n RTRIM = 'RTRIM',\n LENGTH = 'LENGTH',\n REVERSE = 'REVERSE',\n LEFT = 'LEFT',\n RIGHT = 'RIGHT',\n REPEAT = 'REPEAT',\n REPLACE = 'REPLACE',\n SUBSTRING = 'SUBSTRING',\n}\n\nexport enum DatePart {\n YEAR = 'YEAR',\n MONTH = 'MONTH',\n DAY = 'DAY',\n HOUR = 'HOUR',\n MINUTE = 'MINUTE',\n SECOND = 'SECOND',\n QUARTER = 'QUARTER',\n WEEK = 'WEEK',\n DOW = 'DOW',\n}\n\nexport enum SortDirection {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\nexport abstract class RelationalOperationElement {}\n\nexport abstract class Operation extends RelationalOperationElement {\n andOp(other: RelationalOperationElement): Operation {\n return new LogicalOperation(this, LogicalOperator.AND, other);\n }\n}\n\nexport class NoOperation extends Operation {\n andOp(other: RelationalOperationElement): Operation {\n return other as Operation;\n }\n}\n\nexport abstract class ConstantOperation extends RelationalOperationElement {}\n\nexport class IntegerConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class FloatConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class StringConstantOperation extends ConstantOperation {\n constructor(readonly value: string) { super(); }\n}\n\nexport class DateConstantOperation extends ConstantOperation {\n constructor(readonly value: Date) { super(); }\n}\n\nexport class DateTimeConstantOperation extends ConstantOperation {\n constructor(readonly value: Date) { super(); }\n}\n\nexport class DecimalConstantOperation extends ConstantOperation {\n constructor(readonly value: number) { super(); }\n}\n\nexport class BooleanConstantOperation extends ConstantOperation {\n constructor(readonly value: boolean) { super(); }\n}\n\nexport abstract class UnaryOperation extends Operation {\n constructor(readonly element: RelationalOperationElement) { super(); }\n}\n\nexport abstract class BinaryOperation extends Operation {\n constructor(\n readonly left: RelationalOperationElement,\n readonly right: RelationalOperationElement,\n ) { super(); }\n}\n\nexport class IsNullOperation extends UnaryOperation {}\n\nexport class IsNotNullOperation extends UnaryOperation {}\n\nexport class ComparisonOperation extends BinaryOperation {\n constructor(\n left: RelationalOperationElement,\n readonly operator: ComparisonOperator,\n right: RelationalOperationElement,\n ) { super(left, right); }\n}\n\nexport class LogicalOperation extends BinaryOperation {\n constructor(\n left: RelationalOperationElement,\n readonly operator: LogicalOperator,\n right: RelationalOperationElement,\n ) { super(left, right); }\n}\n\nexport class WindowSpecification {\n constructor(\n readonly partitionBy: RelationalOperationElement[] = [],\n readonly orderBy: SortOperation[] = [],\n ) {}\n}\n\nexport class AggregateOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly operator: AggregateOperator,\n readonly displayName?: string,\n readonly window?: WindowSpecification,\n ) { super(element); }\n\n over(partitionBy?: RelationalOperationElement[], orderBy?: SortOperation[]): AggregateOperation {\n return new AggregateOperation(this.element, this.operator, this.displayName,\n new WindowSpecification(partitionBy ?? [], orderBy ?? []));\n }\n}\n\nexport enum WindowFunction {\n ROW_NUMBER = 'ROW_NUMBER',\n RANK = 'RANK',\n DENSE_RANK = 'DENSE_RANK',\n NTILE = 'NTILE',\n LAG = 'LAG',\n LEAD = 'LEAD',\n FIRST_VALUE = 'FIRST_VALUE',\n LAST_VALUE = 'LAST_VALUE',\n CUME_DIST = 'CUME_DIST',\n PERCENT_RANK = 'PERCENT_RANK',\n}\n\nexport class WindowFunctionOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement | null,\n readonly func: WindowFunction,\n readonly displayName?: string,\n readonly secondArg?: number,\n readonly extraArgs: (string | number)[] = [],\n readonly window?: WindowSpecification,\n ) { super(element as RelationalOperationElement); }\n\n over(partitionBy?: RelationalOperationElement[], orderBy?: SortOperation[]): WindowFunctionOperation {\n return new WindowFunctionOperation(this.element, this.func, this.displayName, this.secondArg,\n [...this.extraArgs], new WindowSpecification(partitionBy ?? [], orderBy ?? []));\n }\n}\n\nexport class ScalarFunctionOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly func: ScalarFunction,\n readonly displayName?: string,\n readonly secondArg?: number,\n readonly extraArgs: (string | number)[] = [],\n ) { super(element); }\n}\n\nexport class DateExtractOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly part: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class DateArithmeticOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly n: number,\n readonly unit: DatePart,\n readonly isAdd: boolean = true,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class DateDiffOperation extends UnaryOperation {\n constructor(\n element: RelationalOperationElement,\n readonly other: Date,\n readonly unit: DatePart,\n readonly displayName?: string,\n ) { super(element); }\n}\n\nexport class Column extends RelationalOperationElement {\n table?: Table;\n\n constructor(\n readonly name: string,\n readonly type: string,\n readonly owner?: string,\n readonly primaryKey: boolean = false,\n ) { super(); }\n}\n\nexport class ForeignKey {\n constructor(readonly column: Column, readonly references: Column) {}\n}\n\nexport abstract class DataStore {\n readonly schemas: Schema[] = [];\n\n constructor(readonly name: string) {}\n\n abstract namespace(schemaName: string): string;\n}\n\nexport class Database extends DataStore {\n constructor(name: string, readonly location?: string) { super(name); }\n\n namespace(schemaName: string): string { return schemaName; }\n}\n\nexport class DataCatalog extends DataStore {\n constructor(name: string) { super(name); }\n\n namespace(schemaName: string): string { return `${this.name}.${schemaName}`; }\n}\n\nexport class Schema {\n readonly tables: Table[] = [];\n\n constructor(readonly name: string, readonly datastore?: DataStore) {\n datastore?.schemas.push(this);\n }\n}\n\nexport class Table {\n private readonly _columnsByName: Map<string, Column> = new Map();\n readonly foreignKeys: ForeignKey[] = [];\n\n constructor(readonly name: string, columns: Column[], readonly schema?: Schema) {\n for (const col of columns) {\n if (this._columnsByName.has(col.name)) {\n throw new Error(`Duplicate column name '${col.name}' in table '${name}'`);\n }\n this._columnsByName.set(col.name, col);\n col.table = this;\n }\n schema?.tables.push(this);\n }\n\n get columns(): Column[] {\n return Array.from(this._columnsByName.values());\n }\n\n get qualifiedName(): string {\n if (!this.schema) return this.name;\n if (!this.schema.datastore) return `${this.schema.name}.${this.name}`;\n return `${this.schema.datastore.namespace(this.schema.name)}.${this.name}`;\n }\n}\n\nexport class JoinOperation {\n filter?: RelationalOperationElement;\n\n constructor(\n readonly name: string,\n readonly target: Table,\n readonly left: Column,\n readonly right: Column,\n filter?: RelationalOperationElement,\n ) {\n this.filter = filter;\n }\n}\n\nexport class JoinTreeNodeOperation {\n constructor(\n readonly join: JoinOperation,\n readonly parent?: JoinTreeNodeOperation,\n ) {}\n}\n\nexport class ColumnWithJoin extends RelationalOperationElement {\n constructor(\n readonly column: Column,\n readonly parent?: JoinTreeNodeOperation,\n ) { super(); }\n}\n\nexport class SortOperation {\n constructor(\n readonly column: ColumnWithJoin,\n readonly direction: SortDirection,\n ) {}\n}\n\nexport class CountAllOperation extends RelationalOperationElement {\n constructor(readonly table: string) { super(); }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC+DO,IAAe,6BAAf,MAA0C;AAAC;AAE3C,IAAe,YAAf,cAAiC,2BAA2B;AAAA,EACjE,MAAM,OAA8C;AAClD,WAA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CAAC,GAA4B;AAC/B,WAAO,IAAI;AAAA,MAAwB;AAAA;AAAA,MAA4B;AAAA,MAAY;AAAA,MAAS,CAAC;AAAA,MACnF,KAAK,YAAY,KAAK,aAAa,KAAK,OAAO;AAAA,IAAC;AAAA,EACpD;AAAA,EAEA,MAAM,UAAU,GAAG,OAIf,CAAC,GAA4B;AAC/B,UAAM,YAAiC,KAAK,cAAc,SAAY,CAAC,KAAK,SAAS,IAAI,CAAC;AAC1F,UAAM,OAAO,WAAW;AACxB,UAAM,QAAQ,WAAW,IAAI,QAAQ;AACrC,WAAO,IAAI;AAAA,MACT,IAAI,eAAe,KAAK,SAAS,KAAK,OAAO;AAAA,MAC7C;AAAA,MACA,QAAQ,MAAM,KAAK;AAAA,MACnB,KAAK,IAAI,OAAO;AAAA,MAChB;AAAA,MACA,KAAK,YAAY,KAAK,aAAa,KAAK,OAAO;AAAA,IACjD;AAAA,EACF;AAAA,EAEA,MAAM,OAGF,CAAC,GAA4B;AAC/B,WAAO,IAAI;AAAA,MACT,IAAI,eAAe,KAAK,SAAS,KAAK,OAAO;AAAA;AAAA,MAE7C,WAAW,KAAK;AAAA,MAChB;AAAA,MAAW,CAAC;AAAA,MACZ,KAAK,YAAY,KAAK,aAAa,KAAK,OAAO;AAAA,IACjD;AAAA,EACF;AAAA,EAEA,KAAK,OAGD,CAAC,GAA4B;AAC/B,WAAO,IAAI;AAAA,MACT,IAAI,eAAe,KAAK,SAAS,KAAK,OAAO;AAAA;AAAA,MAE7C,UAAU,KAAK;AAAA,MACf;AAAA,MAAW,CAAC;AAAA,MACZ,KAAK,YAAY,KAAK,aAAa,KAAK,OAAO;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,45 @@
1
+ import { JoinTreeNodeOperation, Column, ColumnWithJoin, AggregateOperation, SortOperation, IsNullOperation, IsNotNullOperation, WindowFunctionOperation } from '../model/relational.cjs';
2
+
3
+ declare abstract class Attribute {
4
+ private readonly _displayName;
5
+ private readonly _column;
6
+ private readonly _owner;
7
+ private readonly _parent?;
8
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation);
9
+ column(): Column;
10
+ owner(): string;
11
+ parent(): JoinTreeNodeOperation | undefined;
12
+ displayName(): string;
13
+ cwj(): ColumnWithJoin;
14
+ count(): AggregateOperation;
15
+ ascending(): SortOperation;
16
+ descending(): SortOperation;
17
+ isNull(): IsNullOperation;
18
+ isNotNull(): IsNotNullOperation;
19
+ private _windowSpec;
20
+ rank(opts?: {
21
+ method?: 'min' | 'dense' | 'first';
22
+ pct?: boolean;
23
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
24
+ orderBy?: SortOperation | SortOperation[];
25
+ }): WindowFunctionOperation;
26
+ qcut(buckets: number, opts?: {
27
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
28
+ orderBy?: SortOperation | SortOperation[];
29
+ }): WindowFunctionOperation;
30
+ shift(periods?: number, opts?: {
31
+ fillValue?: string | number;
32
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
33
+ orderBy?: SortOperation | SortOperation[];
34
+ }): WindowFunctionOperation;
35
+ first(opts?: {
36
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
37
+ orderBy?: SortOperation | SortOperation[];
38
+ }): WindowFunctionOperation;
39
+ last(opts?: {
40
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
41
+ orderBy?: SortOperation | SortOperation[];
42
+ }): WindowFunctionOperation;
43
+ }
44
+
45
+ export { Attribute };
@@ -0,0 +1,45 @@
1
+ import { JoinTreeNodeOperation, Column, ColumnWithJoin, AggregateOperation, SortOperation, IsNullOperation, IsNotNullOperation, WindowFunctionOperation } from '../model/relational.js';
2
+
3
+ declare abstract class Attribute {
4
+ private readonly _displayName;
5
+ private readonly _column;
6
+ private readonly _owner;
7
+ private readonly _parent?;
8
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation);
9
+ column(): Column;
10
+ owner(): string;
11
+ parent(): JoinTreeNodeOperation | undefined;
12
+ displayName(): string;
13
+ cwj(): ColumnWithJoin;
14
+ count(): AggregateOperation;
15
+ ascending(): SortOperation;
16
+ descending(): SortOperation;
17
+ isNull(): IsNullOperation;
18
+ isNotNull(): IsNotNullOperation;
19
+ private _windowSpec;
20
+ rank(opts?: {
21
+ method?: 'min' | 'dense' | 'first';
22
+ pct?: boolean;
23
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
24
+ orderBy?: SortOperation | SortOperation[];
25
+ }): WindowFunctionOperation;
26
+ qcut(buckets: number, opts?: {
27
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
28
+ orderBy?: SortOperation | SortOperation[];
29
+ }): WindowFunctionOperation;
30
+ shift(periods?: number, opts?: {
31
+ fillValue?: string | number;
32
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
33
+ orderBy?: SortOperation | SortOperation[];
34
+ }): WindowFunctionOperation;
35
+ first(opts?: {
36
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
37
+ orderBy?: SortOperation | SortOperation[];
38
+ }): WindowFunctionOperation;
39
+ last(opts?: {
40
+ partitionBy?: ColumnWithJoin | ColumnWithJoin[];
41
+ orderBy?: SortOperation | SortOperation[];
42
+ }): WindowFunctionOperation;
43
+ }
44
+
45
+ export { Attribute };
@@ -0,0 +1,8 @@
1
+ import {
2
+ Attribute
3
+ } from "../chunk-V647VNMY.js";
4
+ import "../chunk-3SSWFES4.js";
5
+ export {
6
+ Attribute
7
+ };
8
+ //# sourceMappingURL=attribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/datafinder/finder-registry.ts
21
+ var finder_registry_exports = {};
22
+ __export(finder_registry_exports, {
23
+ getRelatedFinderClass: () => getRelatedFinderClass,
24
+ registerRelatedFinderClass: () => registerRelatedFinderClass
25
+ });
26
+ module.exports = __toCommonJS(finder_registry_exports);
27
+ var _registry = /* @__PURE__ */ new Map();
28
+ function registerRelatedFinderClass(name, cls) {
29
+ _registry.set(name, cls);
30
+ }
31
+ function getRelatedFinderClass(name) {
32
+ return _registry.get(name);
33
+ }
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ getRelatedFinderClass,
37
+ registerRelatedFinderClass
38
+ });
39
+ //# sourceMappingURL=finder-registry.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/datafinder/finder-registry.ts"],"sourcesContent":["const _registry = new Map<string, new (...args: any[]) => unknown>();\n\nexport function registerRelatedFinderClass(name: string, cls: new (...args: any[]) => unknown): void {\n _registry.set(name, cls);\n}\n\nexport function getRelatedFinderClass(name: string): (new (...args: any[]) => unknown) | undefined {\n return _registry.get(name);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAM,YAAY,oBAAI,IAA6C;AAE5D,SAAS,2BAA2B,MAAc,KAA4C;AACnG,YAAU,IAAI,MAAM,GAAG;AACzB;AAEO,SAAS,sBAAsB,MAA6D;AACjG,SAAO,UAAU,IAAI,IAAI;AAC3B;","names":[]}
@@ -0,0 +1,4 @@
1
+ declare function registerRelatedFinderClass(name: string, cls: new (...args: any[]) => unknown): void;
2
+ declare function getRelatedFinderClass(name: string): (new (...args: any[]) => unknown) | undefined;
3
+
4
+ export { getRelatedFinderClass, registerRelatedFinderClass };
@@ -0,0 +1,4 @@
1
+ declare function registerRelatedFinderClass(name: string, cls: new (...args: any[]) => unknown): void;
2
+ declare function getRelatedFinderClass(name: string): (new (...args: any[]) => unknown) | undefined;
3
+
4
+ export { getRelatedFinderClass, registerRelatedFinderClass };
@@ -0,0 +1,9 @@
1
+ import {
2
+ getRelatedFinderClass,
3
+ registerRelatedFinderClass
4
+ } from "../chunk-FLEIUDZZ.js";
5
+ export {
6
+ getRelatedFinderClass,
7
+ registerRelatedFinderClass
8
+ };
9
+ //# sourceMappingURL=finder-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}