data-finder-ts 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +17 -55
  2. package/dist/chunk-BGEX377Q.js +230 -0
  3. package/dist/chunk-BGEX377Q.js.map +1 -0
  4. package/dist/chunk-BKPWV3OF.js +962 -0
  5. package/dist/chunk-BKPWV3OF.js.map +1 -0
  6. package/dist/{chunk-EYXBYV2X.js → chunk-GPHWC533.js} +2 -2
  7. package/dist/chunk-KAK75RVS.js +198 -0
  8. package/dist/chunk-KAK75RVS.js.map +1 -0
  9. package/dist/chunk-MGEL5RWM.js +628 -0
  10. package/dist/chunk-MGEL5RWM.js.map +1 -0
  11. package/dist/chunk-PF6EJZHB.js +1015 -0
  12. package/dist/chunk-PF6EJZHB.js.map +1 -0
  13. package/dist/datafinder/attribute.cjs +595 -18
  14. package/dist/datafinder/attribute.cjs.map +1 -1
  15. package/dist/datafinder/attribute.d.cts +73 -10
  16. package/dist/datafinder/attribute.d.ts +73 -10
  17. package/dist/datafinder/attribute.js +2 -2
  18. package/dist/datafinder/runner.cjs +1589 -288
  19. package/dist/datafinder/runner.cjs.map +1 -1
  20. package/dist/datafinder/runner.d.cts +41 -7
  21. package/dist/datafinder/runner.d.ts +41 -7
  22. package/dist/datafinder/runner.js +12 -6
  23. package/dist/datafinder/sql-generator.cjs +1484 -281
  24. package/dist/datafinder/sql-generator.cjs.map +1 -1
  25. package/dist/datafinder/sql-generator.d.cts +19 -14
  26. package/dist/datafinder/sql-generator.d.ts +19 -14
  27. package/dist/datafinder/sql-generator.js +9 -7
  28. package/dist/datafinder/typed-attributes.cjs +856 -93
  29. package/dist/datafinder/typed-attributes.cjs.map +1 -1
  30. package/dist/datafinder/typed-attributes.d.cts +3 -135
  31. package/dist/datafinder/typed-attributes.d.ts +3 -135
  32. package/dist/datafinder/typed-attributes.js +3 -3
  33. package/dist/dialect-CogGPm_y.d.cts +38 -0
  34. package/dist/dialect-aaG1bDi5.d.ts +38 -0
  35. package/dist/index.cjs +2080 -480
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +119 -14
  38. package/dist/index.d.ts +119 -14
  39. package/dist/index.js +362 -12
  40. package/dist/index.js.map +1 -1
  41. package/dist/model/milestoning.cjs +529 -0
  42. package/dist/model/milestoning.cjs.map +1 -1
  43. package/dist/model/milestoning.js +2 -2
  44. package/dist/model/relational.cjs +608 -12
  45. package/dist/model/relational.cjs.map +1 -1
  46. package/dist/model/relational.d.cts +456 -47
  47. package/dist/model/relational.d.ts +456 -47
  48. package/dist/model/relational.js +61 -3
  49. package/dist/typed-attributes-CUTf_6Ru.d.ts +328 -0
  50. package/dist/typed-attributes-CdWXq_78.d.cts +328 -0
  51. package/package.json +5 -2
  52. package/dist/chunk-3SSWFES4.js +0 -448
  53. package/dist/chunk-3SSWFES4.js.map +0 -1
  54. package/dist/chunk-5K2Z3YDY.js +0 -393
  55. package/dist/chunk-5K2Z3YDY.js.map +0 -1
  56. package/dist/chunk-6QTCGJWX.js +0 -98
  57. package/dist/chunk-6QTCGJWX.js.map +0 -1
  58. package/dist/chunk-DFYZVBII.js +0 -652
  59. package/dist/chunk-DFYZVBII.js.map +0 -1
  60. package/dist/chunk-V647VNMY.js +0 -135
  61. package/dist/chunk-V647VNMY.js.map +0 -1
  62. /package/dist/{chunk-EYXBYV2X.js.map → chunk-GPHWC533.js.map} +0 -0
@@ -1,14 +1,24 @@
1
1
  import {
2
2
  AggregateOperation,
3
3
  AggregateOperator,
4
+ Aggregates,
5
+ Alias,
6
+ Arithmetic,
7
+ ArithmeticOperation,
8
+ ArithmeticOperator,
4
9
  BinaryOperation,
10
+ BooleanAggregates,
5
11
  BooleanConstantOperation,
12
+ CaseOperation,
6
13
  Column,
7
14
  ColumnWithJoin,
15
+ Comparable,
8
16
  ComparisonOperation,
9
17
  ComparisonOperator,
18
+ ConcatOperation,
10
19
  ConstantOperation,
11
20
  CountAllOperation,
21
+ DATE_ONLY_PATTERN,
12
22
  DataCatalog,
13
23
  DataStore,
14
24
  Database,
@@ -16,44 +26,73 @@ import {
16
26
  DateConstantOperation,
17
27
  DateDiffOperation,
18
28
  DateExtractOperation,
29
+ DateOnly,
19
30
  DatePart,
20
31
  DateTimeConstantOperation,
32
+ DateTruncOperation,
21
33
  DecimalConstantOperation,
34
+ ExistsOperation,
22
35
  FloatConstantOperation,
23
36
  ForeignKey,
37
+ InOperation,
24
38
  IntegerConstantOperation,
25
39
  IsNotNullOperation,
26
40
  IsNullOperation,
27
41
  JoinOperation,
28
42
  JoinTreeNodeOperation,
43
+ LIKE_ESCAPE,
29
44
  LogicalOperation,
30
45
  LogicalOperator,
46
+ NUMERIC_FUNCTIONS,
31
47
  NoOperation,
48
+ NotExistsOperation,
49
+ NotInOperation,
50
+ NumericConstantOperation,
32
51
  Operation,
33
52
  RelationalOperationElement,
34
53
  ScalarFunction,
35
54
  ScalarFunctionOperation,
36
55
  Schema,
56
+ SelectOperation,
37
57
  SortDirection,
38
58
  SortOperation,
39
59
  StringConstantOperation,
60
+ StringPredicates,
40
61
  Table,
41
62
  UnaryOperation,
42
63
  WindowFunction,
43
64
  WindowFunctionOperation,
44
- WindowSpecification
45
- } from "../chunk-3SSWFES4.js";
65
+ WindowSpecification,
66
+ applyMixins,
67
+ concat,
68
+ containsAggregate,
69
+ containsAggregateOrWindow,
70
+ escapeLike,
71
+ operandOf,
72
+ sample,
73
+ valueOperand
74
+ } from "../chunk-PF6EJZHB.js";
46
75
  export {
47
76
  AggregateOperation,
48
77
  AggregateOperator,
78
+ Aggregates,
79
+ Alias,
80
+ Arithmetic,
81
+ ArithmeticOperation,
82
+ ArithmeticOperator,
49
83
  BinaryOperation,
84
+ BooleanAggregates,
50
85
  BooleanConstantOperation,
86
+ CaseOperation,
51
87
  Column,
52
88
  ColumnWithJoin,
89
+ Comparable,
53
90
  ComparisonOperation,
54
91
  ComparisonOperator,
92
+ ConcatOperation,
55
93
  ConstantOperation,
56
94
  CountAllOperation,
95
+ DATE_ONLY_PATTERN,
57
96
  DataCatalog,
58
97
  DataStore,
59
98
  Database,
@@ -61,31 +100,50 @@ export {
61
100
  DateConstantOperation,
62
101
  DateDiffOperation,
63
102
  DateExtractOperation,
103
+ DateOnly,
64
104
  DatePart,
65
105
  DateTimeConstantOperation,
106
+ DateTruncOperation,
66
107
  DecimalConstantOperation,
108
+ ExistsOperation,
67
109
  FloatConstantOperation,
68
110
  ForeignKey,
111
+ InOperation,
69
112
  IntegerConstantOperation,
70
113
  IsNotNullOperation,
71
114
  IsNullOperation,
72
115
  JoinOperation,
73
116
  JoinTreeNodeOperation,
117
+ LIKE_ESCAPE,
74
118
  LogicalOperation,
75
119
  LogicalOperator,
120
+ NUMERIC_FUNCTIONS,
76
121
  NoOperation,
122
+ NotExistsOperation,
123
+ NotInOperation,
124
+ NumericConstantOperation,
77
125
  Operation,
78
126
  RelationalOperationElement,
79
127
  ScalarFunction,
80
128
  ScalarFunctionOperation,
81
129
  Schema,
130
+ SelectOperation,
82
131
  SortDirection,
83
132
  SortOperation,
84
133
  StringConstantOperation,
134
+ StringPredicates,
85
135
  Table,
86
136
  UnaryOperation,
87
137
  WindowFunction,
88
138
  WindowFunctionOperation,
89
- WindowSpecification
139
+ WindowSpecification,
140
+ applyMixins,
141
+ concat,
142
+ containsAggregate,
143
+ containsAggregateOrWindow,
144
+ escapeLike,
145
+ operandOf,
146
+ sample,
147
+ valueOperand
90
148
  };
91
149
  //# sourceMappingURL=relational.js.map
@@ -0,0 +1,328 @@
1
+ import { Attribute, AttributeValue } from './datafinder/attribute.js';
2
+ import { RelationalOperationElement, ScalarFunctionOperation, ConcatPart, ConcatOperation, JoinTreeNodeOperation, ConstantOperation, ComparisonOperation, DateExtractOperation, DateTruncOperation, DateArithmeticOperation, DateDiffOperation, ColumnWithJoin, AggregateOperation, Arithmetic, SortOperation } from './model/relational.js';
3
+
4
+ /**
5
+ * Scalar functions as methods, shared by attributes and by the results of other functions, so they chain:
6
+ * `f.name().toUpperCase().length()`.
7
+ *
8
+ * TypeScript has no multiple inheritance, so each group of functions is a class whose methods are mixed into
9
+ * every host with `applyMixins` (the handbook's pattern), the type side being an `interface Host extends Group {}`
10
+ * beside the host. A host provides `functionInput()` and `functionLabel()`: an attribute reads its column and is
11
+ * labelled by its display name; a function result is itself the input and is labelled by its own name.
12
+ */
13
+
14
+ /** Functions of text. */
15
+ declare abstract class StringFunctions {
16
+ /** @internal The expression the function applies to. */
17
+ abstract functionInput(): RelationalOperationElement;
18
+ /** @internal What a function of this is labelled after. */
19
+ abstract functionLabel(): string;
20
+ /** Join text on the end: `f.first().concat(' ', f.last())`. A NULL part makes the whole NULL. */
21
+ concat(...more: ConcatPart[]): ConcatOperation;
22
+ /** Convert every character to uppercase. */
23
+ toUpperCase(): StringFunctionOperation;
24
+ /** Convert every character to lowercase. */
25
+ toLowerCase(): StringFunctionOperation;
26
+ /** Remove leading and trailing whitespace. */
27
+ trim(): StringFunctionOperation;
28
+ /** Remove leading whitespace. */
29
+ trimStart(): StringFunctionOperation;
30
+ /** Remove trailing whitespace. */
31
+ trimEnd(): StringFunctionOperation;
32
+ /** Return the number of characters in the string. */
33
+ length(): NumericFunctionOperation;
34
+ /** Return the string with characters in reverse order. */
35
+ reverse(): StringFunctionOperation;
36
+ /** Return the first `n` characters. */
37
+ left(n: number): StringFunctionOperation;
38
+ /** Return the last `n` characters. */
39
+ right(n: number): StringFunctionOperation;
40
+ /** Return the string repeated `n` times. */
41
+ repeat(n: number): StringFunctionOperation;
42
+ /** Replace all occurrences of `fromStr` with `toStr`. */
43
+ replace(fromStr: string, toStr: string): StringFunctionOperation;
44
+ /**
45
+ * Extract a portion of the string.
46
+ * `start` is zero-based (following Python convention); `length` is optional.
47
+ */
48
+ substring(start: number, length?: number): StringFunctionOperation;
49
+ }
50
+ /** Functions of a number. */
51
+ declare abstract class NumericFunctions {
52
+ /** @internal The expression the function applies to. */
53
+ abstract functionInput(): RelationalOperationElement;
54
+ /** @internal What a function of this is labelled after. */
55
+ abstract functionLabel(): string;
56
+ /** Absolute value (distance from zero, always non-negative). */
57
+ abs(): NumericFunctionOperation;
58
+ /** Round up to the nearest integer. */
59
+ ceil(): NumericFunctionOperation;
60
+ /** Round down to the nearest integer. */
61
+ floor(): NumericFunctionOperation;
62
+ /** Square root. */
63
+ sqrt(): NumericFunctionOperation;
64
+ /** Remainder after dividing by `n`. */
65
+ mod(n: number): NumericFunctionOperation;
66
+ /** Raise to the power of `n`. */
67
+ power(n: number): NumericFunctionOperation;
68
+ /** Round to `d` decimal places, or to the nearest integer when `d` is omitted. */
69
+ round(d?: number): NumericFunctionOperation;
70
+ }
71
+ /** A function result that gives text, which has the string functions too: `f.name().toUpperCase().length()`. */
72
+ declare class StringFunctionOperation extends ScalarFunctionOperation {
73
+ functionInput(): RelationalOperationElement;
74
+ functionLabel(): string;
75
+ }
76
+ interface StringFunctionOperation extends StringFunctions {
77
+ }
78
+ /** A function result that gives a number, which has the numeric functions too. */
79
+ declare class NumericFunctionOperation extends ScalarFunctionOperation {
80
+ functionInput(): RelationalOperationElement;
81
+ functionLabel(): string;
82
+ }
83
+ interface NumericFunctionOperation extends NumericFunctions {
84
+ }
85
+
86
+ /** The smallest and largest value of a group, for a column that can be ordered but not summed. */
87
+ declare abstract class MinMax {
88
+ abstract cwj(): ColumnWithJoin;
89
+ abstract displayName(): string;
90
+ /** Smallest value in the group. */
91
+ min(): AggregateOperation;
92
+ /** Largest value in the group. */
93
+ max(): AggregateOperation;
94
+ }
95
+ declare class StringAttribute extends Attribute {
96
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
97
+ protected toConstant(value: AttributeValue): ConstantOperation;
98
+ /**
99
+ * Join the values of a group into one text with `separator` between them. `orderBy` is the order they are
100
+ * joined in (`[f.name().ascending()]`); without it the order is not defined. Missing values are skipped.
101
+ */
102
+ join(separator?: string, orderBy?: SortOperation[]): AggregateOperation;
103
+ /** Filter to rows where this attribute equals `value`. */
104
+ eq(value: string): ComparisonOperation;
105
+ /** Filter to rows where this attribute does not equal `value`. */
106
+ ne(value: string): ComparisonOperation;
107
+ /** Filter to rows where this attribute contains `value` as a substring. */
108
+ contains(value: string): ComparisonOperation;
109
+ /** Filter to rows where this attribute begins with `prefix`. */
110
+ startsWith(prefix: string): ComparisonOperation;
111
+ /** Filter to rows where this attribute ends with `suffix`. */
112
+ endsWith(suffix: string): ComparisonOperation;
113
+ /** Filter to rows where this attribute does not contain `value` as a substring. */
114
+ notContains(value: string): ComparisonOperation;
115
+ }
116
+ interface StringAttribute extends MinMax, StringFunctions {
117
+ }
118
+ declare abstract class NumericAttribute extends Attribute {
119
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
120
+ /** Sum of all values in the group. */
121
+ sum(): AggregateOperation;
122
+ /** Arithmetic mean of all values in the group. */
123
+ average(): AggregateOperation;
124
+ /** Standard deviation of the values in the group: the sample one by default, `ddof = 0` for the population one, as `Series.std`. */
125
+ std(ddof?: number): AggregateOperation;
126
+ /** Variance of the values in the group: the sample one by default, `ddof = 0` for the population one, as `Series.var`. */
127
+ var(ddof?: number): AggregateOperation;
128
+ }
129
+ interface NumericAttribute extends MinMax, NumericFunctions, Arithmetic {
130
+ }
131
+ declare class DoubleAttribute extends NumericAttribute {
132
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
133
+ protected toConstant(value: AttributeValue): ConstantOperation;
134
+ /** Filter to rows where this attribute equals `value`. */
135
+ eq(value: number): ComparisonOperation;
136
+ /** Filter to rows where this attribute does not equal `value`. */
137
+ ne(value: number): ComparisonOperation;
138
+ /** Filter to rows where this attribute is greater than `value`. */
139
+ gt(value: number): ComparisonOperation;
140
+ /** Filter to rows where this attribute is less than `value`. */
141
+ lt(value: number): ComparisonOperation;
142
+ /** Filter to rows where this attribute is greater than or equal to `value`. */
143
+ gte(value: number): ComparisonOperation;
144
+ /** Filter to rows where this attribute is less than or equal to `value`. */
145
+ lte(value: number): ComparisonOperation;
146
+ }
147
+ declare const FloatAttribute: typeof DoubleAttribute;
148
+ type FloatAttribute = DoubleAttribute;
149
+ declare class DecimalAttribute extends NumericAttribute {
150
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
151
+ protected toConstant(value: AttributeValue): ConstantOperation;
152
+ /** Filter to rows where this attribute equals `value`. */
153
+ eq(value: number): ComparisonOperation;
154
+ /** Filter to rows where this attribute does not equal `value`. */
155
+ ne(value: number): ComparisonOperation;
156
+ /** Filter to rows where this attribute is greater than `value`. */
157
+ gt(value: number): ComparisonOperation;
158
+ /** Filter to rows where this attribute is less than `value`. */
159
+ lt(value: number): ComparisonOperation;
160
+ /** Filter to rows where this attribute is greater than or equal to `value`. */
161
+ gte(value: number): ComparisonOperation;
162
+ /** Filter to rows where this attribute is less than or equal to `value`. */
163
+ lte(value: number): ComparisonOperation;
164
+ }
165
+ declare class IntegerAttribute extends NumericAttribute {
166
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
167
+ protected toConstant(value: AttributeValue): ConstantOperation;
168
+ /** Filter to rows where this attribute equals `value`. */
169
+ eq(value: number): ComparisonOperation;
170
+ /** Filter to rows where this attribute does not equal `value`. */
171
+ ne(value: number): ComparisonOperation;
172
+ /** Filter to rows where this attribute is greater than `value`. */
173
+ gt(value: number): ComparisonOperation;
174
+ /** Filter to rows where this attribute is less than `value`. */
175
+ lt(value: number): ComparisonOperation;
176
+ /** Filter to rows where this attribute is greater than or equal to `value`. */
177
+ gte(value: number): ComparisonOperation;
178
+ /** Filter to rows where this attribute is less than or equal to `value`. */
179
+ lte(value: number): ComparisonOperation;
180
+ }
181
+ declare class BooleanAttribute extends Attribute {
182
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
183
+ protected toConstant(value: AttributeValue): ConstantOperation;
184
+ /** Filter to rows where this attribute equals `value`. */
185
+ eq(value: boolean): ComparisonOperation;
186
+ /** Filter to rows where this attribute is true. */
187
+ isTrue(): ComparisonOperation;
188
+ /** Filter to rows where this attribute is false. */
189
+ isFalse(): ComparisonOperation;
190
+ }
191
+ declare class DateAttribute extends Attribute {
192
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
193
+ protected toConstant(value: AttributeValue): ConstantOperation;
194
+ /** Filter to rows where this date equals `value`. */
195
+ eq(value: Date | string): ComparisonOperation;
196
+ /** Filter to rows where this date does not equal `value`. */
197
+ ne(value: Date | string): ComparisonOperation;
198
+ /** Filter to rows where this date is after `value`. */
199
+ gt(value: Date | string): ComparisonOperation;
200
+ /** Filter to rows where this date is before `value`. */
201
+ lt(value: Date | string): ComparisonOperation;
202
+ /** Filter to rows where this date is on or after `value`. */
203
+ gte(value: Date | string): ComparisonOperation;
204
+ /** Filter to rows where this date is on or before `value`. */
205
+ lte(value: Date | string): ComparisonOperation;
206
+ /** Extract the four-digit calendar year. */
207
+ year(): DateExtractOperation;
208
+ /** Extract the month number (1–12). */
209
+ month(): DateExtractOperation;
210
+ /** Extract the day of the month (1–31). */
211
+ day(): DateExtractOperation;
212
+ /** Extract the quarter (1–4). */
213
+ quarter(): DateExtractOperation;
214
+ /** Extract the ISO week number (1–53). */
215
+ week(): DateExtractOperation;
216
+ /** Extract the day of the week (0 = Sunday through 6 = Saturday). */
217
+ dayOfWeek(): DateExtractOperation;
218
+ /** The date of the first day of the week the date falls in (a Monday). */
219
+ firstDayOfWeek(): DateTruncOperation;
220
+ /** The date of the first day of the month the date falls in. */
221
+ firstDayOfMonth(): DateTruncOperation;
222
+ /** The date of the first day of the quarter the date falls in. */
223
+ firstDayOfQuarter(): DateTruncOperation;
224
+ /** The date of the first day of the year the date falls in. */
225
+ firstDayOfYear(): DateTruncOperation;
226
+ /** Add `n` days to this date. */
227
+ addDays(n: number): DateArithmeticOperation;
228
+ /** Add `n` months to this date. */
229
+ addMonths(n: number): DateArithmeticOperation;
230
+ /** Add `n` years to this date. */
231
+ addYears(n: number): DateArithmeticOperation;
232
+ /** Subtract `n` days from this date. */
233
+ subtractDays(n: number): DateArithmeticOperation;
234
+ /** Subtract `n` months from this date. */
235
+ subtractMonths(n: number): DateArithmeticOperation;
236
+ /** Subtract `n` years from this date. */
237
+ subtractYears(n: number): DateArithmeticOperation;
238
+ /** Number of whole days between this date and `other`. */
239
+ diffDays(other: Date): DateDiffOperation;
240
+ /** Number of whole months between this date and `other`. */
241
+ diffMonths(other: Date): DateDiffOperation;
242
+ /** Number of whole years between this date and `other`. */
243
+ diffYears(other: Date): DateDiffOperation;
244
+ }
245
+ interface DateAttribute extends MinMax {
246
+ }
247
+ declare class DateTimeAttribute extends Attribute {
248
+ constructor(displayName: string, columnName: string, columnDbType: string, owner: string, parent?: JoinTreeNodeOperation, embedded?: Attribute, nullable?: boolean, optional?: boolean);
249
+ protected toConstant(value: AttributeValue): ConstantOperation;
250
+ /** Filter to rows where this timestamp equals `value`. */
251
+ eq(value: Date | string): ComparisonOperation;
252
+ /** Filter to rows where this timestamp does not equal `value`. */
253
+ ne(value: Date | string): ComparisonOperation;
254
+ /** Filter to rows where this timestamp is after `value`. */
255
+ gt(value: Date | string): ComparisonOperation;
256
+ /** Filter to rows where this timestamp is before `value`. */
257
+ lt(value: Date | string): ComparisonOperation;
258
+ /** Filter to rows where this timestamp is on or after `value`. */
259
+ gte(value: Date | string): ComparisonOperation;
260
+ /** Filter to rows where this timestamp is on or before `value`. */
261
+ lte(value: Date | string): ComparisonOperation;
262
+ /** Extract the four-digit calendar year. */
263
+ year(): DateExtractOperation;
264
+ /** Extract the month number (1–12). */
265
+ month(): DateExtractOperation;
266
+ /** Extract the day of the month (1–31). */
267
+ day(): DateExtractOperation;
268
+ /** Extract the hour (0–23). */
269
+ hour(): DateExtractOperation;
270
+ /** Extract the minute (0–59). */
271
+ minute(): DateExtractOperation;
272
+ /** Extract the second (0–59). */
273
+ second(): DateExtractOperation;
274
+ /** Extract the quarter (1–4). */
275
+ quarter(): DateExtractOperation;
276
+ /** Extract the ISO week number (1–53). */
277
+ week(): DateExtractOperation;
278
+ /** Extract the day of the week (0 = Sunday through 6 = Saturday). */
279
+ dayOfWeek(): DateExtractOperation;
280
+ /** The date of the first day of the week the date falls in (a Monday). */
281
+ firstDayOfWeek(): DateTruncOperation;
282
+ /** The date of the first day of the month the date falls in. */
283
+ firstDayOfMonth(): DateTruncOperation;
284
+ /** The date of the first day of the quarter the date falls in. */
285
+ firstDayOfQuarter(): DateTruncOperation;
286
+ /** The date of the first day of the year the date falls in. */
287
+ firstDayOfYear(): DateTruncOperation;
288
+ /** Add `n` days to this timestamp. */
289
+ addDays(n: number): DateArithmeticOperation;
290
+ /** Add `n` months to this timestamp. */
291
+ addMonths(n: number): DateArithmeticOperation;
292
+ /** Add `n` years to this timestamp. */
293
+ addYears(n: number): DateArithmeticOperation;
294
+ /** Add `n` hours to this timestamp. */
295
+ addHours(n: number): DateArithmeticOperation;
296
+ /** Add `n` minutes to this timestamp. */
297
+ addMinutes(n: number): DateArithmeticOperation;
298
+ /** Add `n` seconds to this timestamp. */
299
+ addSeconds(n: number): DateArithmeticOperation;
300
+ /** Subtract `n` days from this timestamp. */
301
+ subtractDays(n: number): DateArithmeticOperation;
302
+ /** Subtract `n` months from this timestamp. */
303
+ subtractMonths(n: number): DateArithmeticOperation;
304
+ /** Subtract `n` years from this timestamp. */
305
+ subtractYears(n: number): DateArithmeticOperation;
306
+ /** Subtract `n` hours from this timestamp. */
307
+ subtractHours(n: number): DateArithmeticOperation;
308
+ /** Subtract `n` minutes from this timestamp. */
309
+ subtractMinutes(n: number): DateArithmeticOperation;
310
+ /** Subtract `n` seconds from this timestamp. */
311
+ subtractSeconds(n: number): DateArithmeticOperation;
312
+ /** Number of whole days between this timestamp and `other`. */
313
+ diffDays(other: Date): DateDiffOperation;
314
+ /** Number of whole months between this timestamp and `other`. */
315
+ diffMonths(other: Date): DateDiffOperation;
316
+ /** Number of whole years between this timestamp and `other`. */
317
+ diffYears(other: Date): DateDiffOperation;
318
+ /** Number of whole hours between this timestamp and `other`. */
319
+ diffHours(other: Date): DateDiffOperation;
320
+ /** Number of whole minutes between this timestamp and `other`. */
321
+ diffMinutes(other: Date): DateDiffOperation;
322
+ /** Number of whole seconds between this timestamp and `other`. */
323
+ diffSeconds(other: Date): DateDiffOperation;
324
+ }
325
+ interface DateTimeAttribute extends MinMax {
326
+ }
327
+
328
+ export { BooleanAttribute as B, DateAttribute as D, FloatAttribute as F, IntegerAttribute as I, NumericAttribute as N, StringAttribute as S, DateTimeAttribute as a, DecimalAttribute as b, DoubleAttribute as c, NumericFunctionOperation as d, StringFunctionOperation as e };