@malloydata/malloy 0.0.264 → 0.0.265-dev250416031350

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.
@@ -128,6 +128,25 @@ const regexp_replace = {
128
128
  },
129
129
  },
130
130
  };
131
+ const regexp_extract = {
132
+ extract: {
133
+ takes: {
134
+ input_val: 'string',
135
+ pattern: ['string', 'regular expression'],
136
+ },
137
+ returns: 'string',
138
+ impl: { function: 'regexp_extract' },
139
+ },
140
+ extract_group: {
141
+ takes: {
142
+ input_val: 'string',
143
+ pattern: ['string', 'regular expression'],
144
+ group: 'number',
145
+ },
146
+ returns: 'string',
147
+ impl: { function: 'regexp_extract' },
148
+ },
149
+ };
131
150
  const percent_rank = {
132
151
  takes: {},
133
152
  returns: { calculation: 'number' },
@@ -261,8 +280,10 @@ exports.TRINO_DIALECT_FUNCTIONS = {
261
280
  date_parse,
262
281
  ...(0, util_1.def)('from_unixtime', { 'unixtime': 'number' }, 'timestamp'),
263
282
  json_extract_scalar,
283
+ // regex fnctions
264
284
  regexp_like,
265
285
  regexp_replace,
286
+ regexp_extract,
266
287
  ...(0, util_1.def)('to_unixtime', { 'ts_val': 'timestamp' }, 'number'),
267
288
  ...(0, util_1.def)('url_extract_fragment', { 'url': 'string' }, 'string'),
268
289
  ...(0, util_1.def)('url_extract_host', { 'url': 'string' }, 'string'),
@@ -296,6 +317,7 @@ exports.TRINO_DIALECT_FUNCTIONS = {
296
317
  ...(0, util_1.def)('repeat', { 'x': T, 'n': 'number' }, { array: T }),
297
318
  ...(0, util_1.def)('slice', { 'x': { array: T }, 'start': 'number', 'len': 'number' }, { array: T }),
298
319
  ...(0, util_1.def)('split', { to_split: 'string', seperator: 'string' }, { array: 'string' }),
320
+ ...(0, util_1.def)('split_part', { to_split: 'string', seperator: 'string', idx: 'number' }, 'string'),
299
321
  ...(0, util_1.def)('trim_array', { 'x': { array: T }, 'n': 'number' }, { array: T }),
300
322
  ...(0, util_1.def)('array_split_into_chunks', { 'x': { array: T }, 'n': 'number' }, { array: { array: T } }),
301
323
  };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const MALLOY_VERSION = "0.0.264";
1
+ export declare const MALLOY_VERSION = "0.0.265";
package/dist/version.js CHANGED
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MALLOY_VERSION = void 0;
4
4
  // generated with 'generate-version-file' script; do not edit manually
5
- exports.MALLOY_VERSION = '0.0.264';
5
+ exports.MALLOY_VERSION = '0.0.265';
6
6
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy",
3
- "version": "0.0.264",
3
+ "version": "0.0.265-dev250416031350",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -41,9 +41,9 @@
41
41
  "generate-version-file": "VERSION=$(npm pkg get version --workspaces=false | tr -d \\\")\necho \"// generated with 'generate-version-file' script; do not edit manually\\nexport const MALLOY_VERSION = '$VERSION';\" > src/version.ts"
42
42
  },
43
43
  "dependencies": {
44
- "@malloydata/malloy-filter": "^0.0.264",
45
- "@malloydata/malloy-interfaces": "^0.0.264",
46
- "@malloydata/malloy-tag": "^0.0.264",
44
+ "@malloydata/malloy-filter": "^0.0.265-dev250416031350",
45
+ "@malloydata/malloy-interfaces": "^0.0.265-dev250416031350",
46
+ "@malloydata/malloy-tag": "^0.0.265-dev250416031350",
47
47
  "antlr4ts": "^0.5.0-alpha.4",
48
48
  "assert": "^2.0.0",
49
49
  "jaro-winkler": "^0.2.8",