@ohos-ports/nodejs-polars 0.23.4-beta.0

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 (71) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +217 -0
  3. package/bin/cfg.d.ts +156 -0
  4. package/bin/cfg.js +52 -0
  5. package/bin/dataframe.d.ts +2135 -0
  6. package/bin/dataframe.js +783 -0
  7. package/bin/datatypes/conversion.d.ts +2 -0
  8. package/bin/datatypes/conversion.js +2 -0
  9. package/bin/datatypes/datatype.d.ts +285 -0
  10. package/bin/datatypes/datatype.js +430 -0
  11. package/bin/datatypes/field.d.ts +26 -0
  12. package/bin/datatypes/field.js +36 -0
  13. package/bin/datatypes/index.d.ts +43 -0
  14. package/bin/datatypes/index.js +120 -0
  15. package/bin/error.d.ts +7 -0
  16. package/bin/error.js +17 -0
  17. package/bin/functions.d.ts +26 -0
  18. package/bin/functions.js +208 -0
  19. package/bin/groupby.d.ts +212 -0
  20. package/bin/groupby.js +156 -0
  21. package/bin/html.d.ts +4 -0
  22. package/bin/html.js +18 -0
  23. package/bin/index.d.ts +256 -0
  24. package/bin/index.js +267 -0
  25. package/bin/internals/construction.d.ts +7 -0
  26. package/bin/internals/construction.js +256 -0
  27. package/bin/internals/polars_internal.d.ts +2 -0
  28. package/bin/internals/polars_internal.js +7 -0
  29. package/bin/io.d.ts +433 -0
  30. package/bin/io.js +344 -0
  31. package/bin/lazy/dataframe.d.ts +785 -0
  32. package/bin/lazy/dataframe.js +427 -0
  33. package/bin/lazy/expr/datetime.d.ts +8 -0
  34. package/bin/lazy/expr/datetime.js +27 -0
  35. package/bin/lazy/expr/index.d.ts +1152 -0
  36. package/bin/lazy/expr/index.js +632 -0
  37. package/bin/lazy/expr/list.d.ts +8 -0
  38. package/bin/lazy/expr/list.js +115 -0
  39. package/bin/lazy/expr/string.d.ts +534 -0
  40. package/bin/lazy/expr/string.js +131 -0
  41. package/bin/lazy/expr/struct.d.ts +126 -0
  42. package/bin/lazy/expr/struct.js +26 -0
  43. package/bin/lazy/functions.d.ts +612 -0
  44. package/bin/lazy/functions.js +687 -0
  45. package/bin/lazy/groupby.d.ts +29 -0
  46. package/bin/lazy/groupby.js +30 -0
  47. package/bin/lazy/index.d.ts +4 -0
  48. package/bin/lazy/index.js +20 -0
  49. package/bin/lazy/whenthen.d.ts +67 -0
  50. package/bin/lazy/whenthen.js +81 -0
  51. package/bin/native-polars.d.ts +2 -0
  52. package/bin/native-polars.js +267 -0
  53. package/bin/series/datetime.d.ts +8 -0
  54. package/bin/series/datetime.js +34 -0
  55. package/bin/series/index.d.ts +1135 -0
  56. package/bin/series/index.js +700 -0
  57. package/bin/series/list.d.ts +8 -0
  58. package/bin/series/list.js +87 -0
  59. package/bin/series/string.d.ts +300 -0
  60. package/bin/series/string.js +125 -0
  61. package/bin/series/struct.d.ts +36 -0
  62. package/bin/series/struct.js +35 -0
  63. package/bin/shared_traits.d.ts +1458 -0
  64. package/bin/shared_traits.js +2 -0
  65. package/bin/sql.d.ts +244 -0
  66. package/bin/sql.js +63 -0
  67. package/bin/types.d.ts +287 -0
  68. package/bin/types.js +2 -0
  69. package/bin/utils.d.ts +38 -0
  70. package/bin/utils.js +69 -0
  71. package/package.json +45 -0
@@ -0,0 +1,427 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LazyDataFrame = exports._LazyDataFrame = void 0;
7
+ const dataframe_1 = require("../dataframe");
8
+ const polars_internal_1 = __importDefault(require("../internals/polars_internal"));
9
+ const utils_1 = require("../utils");
10
+ const expr_1 = require("./expr");
11
+ const groupby_1 = require("./groupby");
12
+ const inspect = Symbol.for("nodejs.util.inspect.custom");
13
+ const prepareGroupbyInputs = (by) => {
14
+ if (Array.isArray(by)) {
15
+ const newBy = [];
16
+ for (let e of by) {
17
+ if (typeof e === "string") {
18
+ e = polars_internal_1.default.col(e);
19
+ }
20
+ newBy.push(e);
21
+ }
22
+ return newBy;
23
+ }
24
+ if (typeof by === "string") {
25
+ return [polars_internal_1.default.col(by)];
26
+ }
27
+ if (expr_1.Expr.isExpr(by)) {
28
+ return [by._expr];
29
+ }
30
+ return [];
31
+ };
32
+ /** @ignore */
33
+ const _LazyDataFrame = (_ldf) => {
34
+ const unwrap = (method, ...args) => {
35
+ return _ldf[method](...args);
36
+ };
37
+ const wrap = (method, ...args) => {
38
+ return (0, exports._LazyDataFrame)(unwrap(method, ...args));
39
+ };
40
+ return {
41
+ _ldf,
42
+ [inspect]() {
43
+ return _ldf.describeOptimizedPlan();
44
+ },
45
+ get [Symbol.toStringTag]() {
46
+ return "LazyDataFrame";
47
+ },
48
+ get columns() {
49
+ return _ldf.columns;
50
+ },
51
+ describePlan() {
52
+ return _ldf.describePlan();
53
+ },
54
+ describeOptimizedPlan() {
55
+ return _ldf.describeOptimizedPlan();
56
+ },
57
+ cache() {
58
+ return (0, exports._LazyDataFrame)(_ldf.cache());
59
+ },
60
+ clone() {
61
+ return (0, exports._LazyDataFrame)(_ldf.clone());
62
+ },
63
+ collectSync() {
64
+ return (0, dataframe_1._DataFrame)(_ldf.collectSync());
65
+ },
66
+ collect(opts) {
67
+ if (opts?.noOptimization) {
68
+ opts.predicatePushdown = false;
69
+ opts.projectionPushdown = false;
70
+ opts.slicePushdown = false;
71
+ opts.commSubplanElim = false;
72
+ opts.commSubexprElim = false;
73
+ }
74
+ if (opts?.streaming)
75
+ opts.commSubplanElim = false;
76
+ if (opts) {
77
+ _ldf = _ldf.optimizationToggle(opts.typeCoercion, opts.predicatePushdown, opts.projectionPushdown, opts.simplifyExpression, opts.slicePushdown, opts.commSubplanElim, opts.commSubexprElim, opts.streaming);
78
+ }
79
+ return _ldf.collect().then(dataframe_1._DataFrame);
80
+ },
81
+ drop(...cols) {
82
+ return (0, exports._LazyDataFrame)(_ldf.dropColumns(cols.flat(2)));
83
+ },
84
+ unique(opts, keep = "any", maintainOrder = false) {
85
+ // no arguments -> signal call with defaults
86
+ if (arguments.length === 0)
87
+ return (0, exports._LazyDataFrame)(_ldf.unique(null, keep, maintainOrder));
88
+ // string -> single-element array
89
+ if (typeof opts === "string")
90
+ return (0, exports._LazyDataFrame)(_ldf.unique([opts], keep, maintainOrder));
91
+ // array -> use as-is
92
+ if (Array.isArray(opts))
93
+ return (0, exports._LazyDataFrame)(_ldf.unique(opts, keep, maintainOrder));
94
+ // object -> merge defaults, normalize subset to array (if present)
95
+ if (opts && typeof opts === "object") {
96
+ const o = { keep, maintainOrder, ...opts };
97
+ const subset = o.subset ? [o.subset].flat(3) : undefined;
98
+ return (0, exports._LazyDataFrame)(_ldf.unique(subset, o.keep, o.maintainOrder));
99
+ }
100
+ throw new TypeError("You should pass valid unique argument.");
101
+ },
102
+ dropNulls(...subset) {
103
+ if (subset.length) {
104
+ return wrap("dropNulls", subset.flat(2));
105
+ }
106
+ return wrap("dropNulls");
107
+ },
108
+ explode(...columns) {
109
+ if (!columns.length) {
110
+ const cols = (0, utils_1.selectionToExprList)(_ldf.columns, false);
111
+ return wrap("explode", cols);
112
+ }
113
+ const column = (0, utils_1.selectionToExprList)(columns, false);
114
+ return wrap("explode", column);
115
+ },
116
+ fetchSync(numRows, opts) {
117
+ if (opts?.noOptimization) {
118
+ opts.predicatePushdown = false;
119
+ opts.projectionPushdown = false;
120
+ opts.slicePushdown = false;
121
+ opts.commSubplanElim = false;
122
+ opts.commSubexprElim = false;
123
+ }
124
+ if (opts?.streaming)
125
+ opts.commSubplanElim = false;
126
+ if (opts) {
127
+ _ldf = _ldf.optimizationToggle(opts.typeCoercion, opts.predicatePushdown, opts.projectionPushdown, opts.simplifyExpr, opts.slicePushdown, opts.commSubplanElim, opts.commSubexprElim, opts.streaming);
128
+ }
129
+ return (0, dataframe_1._DataFrame)(_ldf.fetchSync(numRows));
130
+ },
131
+ fetch(numRows, opts) {
132
+ if (opts?.noOptimization) {
133
+ opts.predicatePushdown = false;
134
+ opts.projectionPushdown = false;
135
+ opts.slicePushdown = false;
136
+ opts.commSubplanElim = false;
137
+ opts.commSubexprElim = false;
138
+ }
139
+ if (opts?.streaming)
140
+ opts.commSubplanElim = false;
141
+ if (opts) {
142
+ _ldf = _ldf.optimizationToggle(opts.typeCoercion, opts.predicatePushdown, opts.projectionPushdown, opts.simplifyExpr, opts.slicePushdown, opts.commSubplanElim, opts.commSubexprElim, opts.streaming);
143
+ }
144
+ return _ldf.fetch(numRows).then(dataframe_1._DataFrame);
145
+ },
146
+ first() {
147
+ return this.fetchSync(1);
148
+ },
149
+ fillNull(exprOrValue) {
150
+ const fillValue = (0, expr_1.exprToLitOrExpr)(exprOrValue)._expr;
151
+ return (0, exports._LazyDataFrame)(_ldf.fillNull(fillValue));
152
+ },
153
+ filter(exprOrValue) {
154
+ const predicate = (0, expr_1.exprToLitOrExpr)(exprOrValue, false)._expr;
155
+ return (0, exports._LazyDataFrame)(_ldf.filter(predicate));
156
+ },
157
+ groupBy(by, maintainOrder = true) {
158
+ if (maintainOrder?.maintainOrder !== undefined) {
159
+ maintainOrder = maintainOrder.maintainOrder;
160
+ }
161
+ const expr = (0, utils_1.selectionToExprList)([by], false);
162
+ return (0, groupby_1._LazyGroupBy)(_ldf.groupby(expr, maintainOrder));
163
+ },
164
+ groupByRolling({ indexColumn, by, period, offset, closed }) {
165
+ offset = offset ?? `-${period}`;
166
+ closed = closed ?? "right";
167
+ by = prepareGroupbyInputs(by);
168
+ const lgb = _ldf.groupbyRolling(polars_internal_1.default.col(indexColumn), period, offset, closed, by);
169
+ return (0, groupby_1._LazyGroupBy)(lgb);
170
+ },
171
+ groupByDynamic({ indexColumn, every, period, offset, includeBoundaries, closed, label, by, startBy, }) {
172
+ period = period ?? every;
173
+ offset = offset ?? "0ns";
174
+ closed = closed ?? "left";
175
+ label = label ?? "left";
176
+ by = prepareGroupbyInputs(by);
177
+ includeBoundaries = includeBoundaries ?? false;
178
+ startBy = startBy ?? "monday";
179
+ const lgb = _ldf.groupbyDynamic(polars_internal_1.default.col(indexColumn), every, period, offset, label, includeBoundaries, closed, by, startBy);
180
+ return (0, groupby_1._LazyGroupBy)(lgb);
181
+ },
182
+ head(len = 5) {
183
+ return (0, exports._LazyDataFrame)(_ldf.slice(0, len));
184
+ },
185
+ inner() {
186
+ return _ldf;
187
+ },
188
+ join(df, options) {
189
+ options = {
190
+ how: "inner",
191
+ suffix: "right",
192
+ allowParallel: true,
193
+ forceParallel: false,
194
+ ...options,
195
+ };
196
+ const { how, suffix, allowParallel, forceParallel, coalesce, validate } = options;
197
+ if (how === "cross") {
198
+ return (0, exports._LazyDataFrame)(_ldf.join(df._ldf, [], [], allowParallel, forceParallel, how, suffix, coalesce, validate, [], []));
199
+ }
200
+ let leftOn;
201
+ let rightOn;
202
+ if (options.on) {
203
+ const on = (0, utils_1.selectionToExprList)(options.on, false);
204
+ leftOn = on;
205
+ rightOn = on;
206
+ }
207
+ else if ((options.leftOn && !options.rightOn) ||
208
+ (options.rightOn && !options.leftOn)) {
209
+ throw new TypeError("You should pass the column to join on as an argument.");
210
+ }
211
+ else {
212
+ leftOn = (0, utils_1.selectionToExprList)(options.leftOn, false);
213
+ rightOn = (0, utils_1.selectionToExprList)(options.rightOn, false);
214
+ }
215
+ const ldf = _ldf.join(df._ldf, leftOn, rightOn, allowParallel, forceParallel, how, suffix, coalesce, validate, [], []);
216
+ return (0, exports._LazyDataFrame)(ldf);
217
+ },
218
+ joinAsof(other, options) {
219
+ options = {
220
+ suffix: "_right",
221
+ allowParallel: true,
222
+ forceParallel: false,
223
+ strategy: "backward",
224
+ checkSortedness: true,
225
+ ...options,
226
+ };
227
+ const { suffix, strategy, allowParallel, forceParallel, checkSortedness, } = options;
228
+ let leftOn;
229
+ let rightOn;
230
+ if (!other?._ldf) {
231
+ throw new TypeError("Expected a 'lazyFrame' as join table");
232
+ }
233
+ if (options.on) {
234
+ leftOn = rightOn = options.on;
235
+ }
236
+ else if ((options.leftOn && !options.rightOn) ||
237
+ (options.rightOn && !options.leftOn)) {
238
+ throw new TypeError("You should pass the column to join on as an argument.");
239
+ }
240
+ else {
241
+ leftOn = options.leftOn;
242
+ rightOn = options.rightOn;
243
+ }
244
+ let byLeft;
245
+ if (typeof options.byLeft === "string") {
246
+ byLeft = [options.byLeft];
247
+ }
248
+ else if (Array.isArray(options.byLeft)) {
249
+ byLeft = options.byLeft;
250
+ }
251
+ let byRight;
252
+ if (typeof options.byRight === "string") {
253
+ byRight = [options.byRight];
254
+ }
255
+ else if (Array.isArray(options.byRight)) {
256
+ byRight = options.byRight;
257
+ }
258
+ if (typeof options.by === "string") {
259
+ byLeft = byRight = [options.by];
260
+ }
261
+ else if (Array.isArray(options.by)) {
262
+ byLeft = byRight = options.by;
263
+ }
264
+ let toleranceStr;
265
+ let toleranceNum;
266
+ if (typeof options.tolerance === "string") {
267
+ toleranceStr = options.tolerance;
268
+ }
269
+ else {
270
+ toleranceNum = options.tolerance;
271
+ }
272
+ const ldf = _ldf.joinAsof(other._ldf, polars_internal_1.default.col(leftOn), polars_internal_1.default.col(rightOn), byLeft, byRight, allowParallel, forceParallel, suffix, strategy, toleranceNum, toleranceStr, checkSortedness ?? true);
273
+ return (0, exports._LazyDataFrame)(ldf);
274
+ },
275
+ last() {
276
+ return (0, exports._LazyDataFrame)(_ldf.tail(1));
277
+ },
278
+ limit(len = 5) {
279
+ return (0, exports._LazyDataFrame)(_ldf.slice(0, len));
280
+ },
281
+ max() {
282
+ return (0, exports._LazyDataFrame)(_ldf.max());
283
+ },
284
+ mean() {
285
+ return (0, exports._LazyDataFrame)(_ldf.mean());
286
+ },
287
+ median() {
288
+ return (0, exports._LazyDataFrame)(_ldf.median());
289
+ },
290
+ melt(ids, values) {
291
+ return (0, exports._LazyDataFrame)(_ldf.unpivot((0, utils_1.columnOrColumnsStrict)(ids), (0, utils_1.columnOrColumnsStrict)(values)));
292
+ },
293
+ unpivot(ids, values, options) {
294
+ options = {
295
+ variableName: null,
296
+ valueName: null,
297
+ ...options,
298
+ };
299
+ return (0, exports._LazyDataFrame)(_ldf.unpivot((0, utils_1.columnOrColumnsStrict)(ids), (0, utils_1.columnOrColumnsStrict)(values), options.variableName, options.valueName));
300
+ },
301
+ min() {
302
+ return (0, exports._LazyDataFrame)(_ldf.min());
303
+ },
304
+ quantile(quantile, interpolation = "nearest") {
305
+ return (0, exports._LazyDataFrame)(_ldf.quantile(quantile, interpolation));
306
+ },
307
+ rename(mapping) {
308
+ const existing = Object.keys(mapping);
309
+ const replacements = Object.values(mapping);
310
+ return (0, exports._LazyDataFrame)(_ldf.rename(existing, replacements));
311
+ },
312
+ reverse() {
313
+ return (0, exports._LazyDataFrame)(_ldf.reverse());
314
+ },
315
+ select(...exprs) {
316
+ const selections = (0, utils_1.selectionToExprList)(exprs, false);
317
+ return (0, exports._LazyDataFrame)(_ldf.select(selections));
318
+ },
319
+ shift(periods) {
320
+ return (0, exports._LazyDataFrame)(_ldf.shift(periods));
321
+ },
322
+ shiftAndFill(opts, fillValue) {
323
+ if (typeof opts === "number") {
324
+ return (0, exports._LazyDataFrame)(_ldf.shiftAndFill(opts, fillValue));
325
+ }
326
+ return (0, exports._LazyDataFrame)(_ldf.shiftAndFill(opts?.n, opts?.fillValue));
327
+ },
328
+ slice(opt, len) {
329
+ if (opt?.offset !== undefined) {
330
+ return (0, exports._LazyDataFrame)(_ldf.slice(opt.offset, opt.length));
331
+ }
332
+ return (0, exports._LazyDataFrame)(_ldf.slice(opt, len));
333
+ },
334
+ sort(arg, descending = false, nullsLast = false, maintainOrder = false) {
335
+ if (arg?.by !== undefined) {
336
+ return this.sort(arg.by, arg.descending, arg.nullsLast, arg.maintainOrder);
337
+ }
338
+ if (typeof arg === "string") {
339
+ return wrap("sort", arg, descending, nullsLast, maintainOrder);
340
+ }
341
+ const by = (0, utils_1.selectionToExprList)(arg, false);
342
+ return wrap("sortByExprs", by, descending, nullsLast, maintainOrder);
343
+ },
344
+ std() {
345
+ return (0, exports._LazyDataFrame)(_ldf.std());
346
+ },
347
+ sum() {
348
+ return (0, exports._LazyDataFrame)(_ldf.sum());
349
+ },
350
+ var() {
351
+ return (0, exports._LazyDataFrame)(_ldf.var());
352
+ },
353
+ tail(length = 5) {
354
+ return (0, exports._LazyDataFrame)(_ldf.tail(length));
355
+ },
356
+ toJSON(...args) {
357
+ // this is passed by `JSON.stringify` when calling `toJSON()`
358
+ if (args[0] === "") {
359
+ return JSON.parse(_ldf.serialize("json").toString());
360
+ }
361
+ return _ldf.serialize("json").toString();
362
+ },
363
+ serialize(format) {
364
+ return _ldf.serialize(format);
365
+ },
366
+ withColumn(column) {
367
+ return this.withColumns(column);
368
+ },
369
+ withColumns(...columns) {
370
+ const exprs = (0, utils_1.selectionToExprList)(columns, false);
371
+ return (0, exports._LazyDataFrame)(_ldf.withColumns(exprs));
372
+ },
373
+ withColumnRenamed(existing, replacement) {
374
+ return (0, exports._LazyDataFrame)(_ldf.rename([existing], [replacement]));
375
+ },
376
+ withRowCount(name = "row_nr") {
377
+ return (0, exports._LazyDataFrame)(_ldf.withRowCount(name));
378
+ },
379
+ withRowIndex(name = "index", offset = 0) {
380
+ return (0, exports._LazyDataFrame)(_ldf.withRowIndex(name, offset));
381
+ },
382
+ sinkCSV(path, options) {
383
+ options = { ...dataframe_1.writeCsvDefaultOptions, ...options };
384
+ return _ldf.sinkCsv(path, options, {
385
+ syncOnClose: "all",
386
+ maintainOrder: false,
387
+ mkdir: true,
388
+ });
389
+ },
390
+ sinkParquet(path, options = {}) {
391
+ options.compression = options.compression ?? "zstd";
392
+ options.statistics = options.statistics ?? false;
393
+ options.sinkOptions = options.sinkOptions ?? {
394
+ syncOnClose: "all",
395
+ maintainOrder: false,
396
+ mkdir: true,
397
+ };
398
+ return _ldf.sinkParquet(path, options);
399
+ },
400
+ sinkNdJson(path, options = {}) {
401
+ options.retries = options.retries ?? 2;
402
+ options.syncOnClose = options.syncOnClose ?? "all";
403
+ options.maintainOrder = options.maintainOrder ?? true;
404
+ options.mkdir = options.mkdir ?? true;
405
+ return _ldf.sinkJson(path, options);
406
+ },
407
+ sinkIpc(path, options = {}) {
408
+ options.compatLevel = options.compatLevel ?? "newest";
409
+ options.compression = options.compression ?? "uncompressed";
410
+ options.retries = options.retries ?? 2;
411
+ options.syncOnClose = options.syncOnClose ?? "all";
412
+ options.maintainOrder = options.maintainOrder ?? true;
413
+ options.mkdir = options.mkdir ?? true;
414
+ return _ldf.sinkIpc(path, options);
415
+ },
416
+ };
417
+ };
418
+ exports._LazyDataFrame = _LazyDataFrame;
419
+ const isLazyDataFrame = (anyVal) => anyVal?.[Symbol.toStringTag] === "LazyDataFrame";
420
+ /** @ignore */
421
+ exports.LazyDataFrame = Object.assign(exports._LazyDataFrame, {
422
+ deserialize: (buf, fmt) => (0, exports._LazyDataFrame)(polars_internal_1.default.JsLazyFrame.deserialize(buf, fmt)),
423
+ fromExternal(external) {
424
+ return (0, exports._LazyDataFrame)(polars_internal_1.default.JsLazyFrame.cloneExternal(external));
425
+ },
426
+ isLazyDataFrame,
427
+ });
@@ -0,0 +1,8 @@
1
+ import type { DateFunctions } from "../../shared_traits";
2
+ import { type Expr } from "../expr";
3
+ /**
4
+ * DateTime functions for expression
5
+ */
6
+ export interface ExprDateTime extends DateFunctions<Expr> {
7
+ }
8
+ export declare const ExprDateTimeFunctions: (_expr: any) => ExprDateTime;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExprDateTimeFunctions = void 0;
4
+ const expr_1 = require("../expr");
5
+ const ExprDateTimeFunctions = (_expr) => {
6
+ const wrap = (method, ...args) => {
7
+ return (0, expr_1._Expr)(_expr[method](...args));
8
+ };
9
+ const wrapNullArgs = (method) => () => wrap(method);
10
+ return {
11
+ day: wrapNullArgs("day"),
12
+ hour: wrapNullArgs("hour"),
13
+ minute: wrapNullArgs("minute"),
14
+ month: wrapNullArgs("month"),
15
+ nanosecond: wrapNullArgs("nanosecond"),
16
+ ordinalDay: wrapNullArgs("ordinalDay"),
17
+ second: wrapNullArgs("second"),
18
+ strftime: (fmt) => wrap("strftime", fmt),
19
+ timestamp: wrapNullArgs("timestamp"),
20
+ week: wrapNullArgs("week"),
21
+ weekday: wrapNullArgs("weekday"),
22
+ year: wrapNullArgs("year"),
23
+ truncate: (every) => wrap("dtTruncate", (0, expr_1.exprToLitOrExpr)(every)._expr),
24
+ round: (every) => wrap("dtRound", (0, expr_1.exprToLitOrExpr)(every)._expr),
25
+ };
26
+ };
27
+ exports.ExprDateTimeFunctions = ExprDateTimeFunctions;