@malloydata/malloy-interfaces 0.0.329 → 0.0.331

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/dist/types.d.ts CHANGED
@@ -69,10 +69,6 @@ export type AtomicTypeWithRecordType = {
69
69
  export type AtomicTypeWithTimestamptzType = {
70
70
  kind: 'timestamptz_type';
71
71
  } & TimestamptzType;
72
- export type BigNumberCell = {
73
- number_value: string;
74
- subtype?: NumberSubtype;
75
- };
76
72
  export type BooleanCell = {
77
73
  boolean_value: boolean;
78
74
  };
@@ -89,8 +85,8 @@ export type CalculateOperation = {
89
85
  name: string;
90
86
  field: Field;
91
87
  };
92
- export type CellType = 'string_cell' | 'boolean_cell' | 'date_cell' | 'timestamp_cell' | 'number_cell' | 'json_cell' | 'record_cell' | 'array_cell' | 'null_cell' | 'sql_native_cell' | 'big_number_cell';
93
- export type Cell = CellWithStringCell | CellWithBooleanCell | CellWithDateCell | CellWithTimestampCell | CellWithNumberCell | CellWithJSONCell | CellWithRecordCell | CellWithArrayCell | CellWithNullCell | CellWithSQLNativeCell | CellWithBigNumberCell;
88
+ export type CellType = 'string_cell' | 'boolean_cell' | 'date_cell' | 'timestamp_cell' | 'number_cell' | 'json_cell' | 'record_cell' | 'array_cell' | 'null_cell' | 'sql_native_cell';
89
+ export type Cell = CellWithStringCell | CellWithBooleanCell | CellWithDateCell | CellWithTimestampCell | CellWithNumberCell | CellWithJSONCell | CellWithRecordCell | CellWithArrayCell | CellWithNullCell | CellWithSQLNativeCell;
94
90
  export type CellWithStringCell = {
95
91
  kind: 'string_cell';
96
92
  } & StringCell;
@@ -121,9 +117,6 @@ export type CellWithNullCell = {
121
117
  export type CellWithSQLNativeCell = {
122
118
  kind: 'sql_native_cell';
123
119
  } & SQLNativeCell;
124
- export type CellWithBigNumberCell = {
125
- kind: 'big_number_cell';
126
- } & BigNumberCell;
127
120
  export type CompileModelRequest = {
128
121
  model_url: string;
129
122
  extend_model_url?: string;
@@ -392,9 +385,11 @@ export type NullLiteral = {};
392
385
  export type NumberCell = {
393
386
  number_value: number;
394
387
  subtype?: NumberSubtype;
388
+ string_value?: string;
395
389
  };
396
390
  export type NumberLiteral = {
397
391
  number_value: number;
392
+ string_value?: string;
398
393
  };
399
394
  export type NumberSubtype = 'integer' | 'decimal' | 'bigint';
400
395
  export type NumberType = {
package/dist/types.js CHANGED
@@ -108,22 +108,6 @@ exports.MALLOY_INTERFACE_TYPES = {
108
108
  'timestamptz_type': 'TimestamptzType',
109
109
  },
110
110
  },
111
- 'BigNumberCell': {
112
- 'type': 'struct',
113
- 'name': 'BigNumberCell',
114
- 'fields': {
115
- 'number_value': {
116
- 'type': 'string',
117
- 'optional': false,
118
- 'array': false,
119
- },
120
- 'subtype': {
121
- 'type': 'NumberSubtype',
122
- 'optional': true,
123
- 'array': false,
124
- },
125
- },
126
- },
127
111
  'BooleanCell': {
128
112
  'type': 'struct',
129
113
  'name': 'BooleanCell',
@@ -202,7 +186,6 @@ exports.MALLOY_INTERFACE_TYPES = {
202
186
  'array_cell': 'ArrayCell',
203
187
  'null_cell': 'NullCell',
204
188
  'sql_native_cell': 'SQLNativeCell',
205
- 'big_number_cell': 'BigNumberCell',
206
189
  },
207
190
  },
208
191
  'CompileModelRequest': {
@@ -985,6 +968,11 @@ exports.MALLOY_INTERFACE_TYPES = {
985
968
  'optional': true,
986
969
  'array': false,
987
970
  },
971
+ 'string_value': {
972
+ 'type': 'string',
973
+ 'optional': true,
974
+ 'array': false,
975
+ },
988
976
  },
989
977
  },
990
978
  'NumberLiteral': {
@@ -996,6 +984,11 @@ exports.MALLOY_INTERFACE_TYPES = {
996
984
  'optional': false,
997
985
  'array': false,
998
986
  },
987
+ 'string_value': {
988
+ 'type': 'string',
989
+ 'optional': true,
990
+ 'array': false,
991
+ },
999
992
  },
1000
993
  },
1001
994
  'NumberSubtype': {
package/dist/util.js CHANGED
@@ -8,12 +8,9 @@ function shouldQuoteIdentifier(name) {
8
8
  return containsFunnyCharacters || isReserved;
9
9
  }
10
10
  function maybeQuoteIdentifier(name) {
11
- const path = name.split('.');
12
- for (let i = 0; i < path.length; i++) {
13
- if (shouldQuoteIdentifier(path[i])) {
14
- path[i] = `\`${path[i]}\``;
15
- }
11
+ if (shouldQuoteIdentifier(name)) {
12
+ return `\`${name}\``;
16
13
  }
17
- return path.join('.');
14
+ return name;
18
15
  }
19
16
  //# sourceMappingURL=util.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy-interfaces",
3
- "version": "0.0.329",
3
+ "version": "0.0.331",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -439,6 +439,7 @@ struct StringLiteral {
439
439
 
440
440
  struct NumberLiteral {
441
441
  1: required double number_value,
442
+ 2: optional string string_value,
442
443
  }
443
444
 
444
445
  struct BooleanLiteral {
@@ -504,14 +505,9 @@ struct BooleanCell {
504
505
  struct NumberCell {
505
506
  1: required double number_value,
506
507
  2: optional NumberSubtype subtype,
507
- }
508
-
509
- // String representation for numbers that exceed JavaScript's Number.MAX_SAFE_INTEGER
510
- // or require precision beyond float64. Currently used for bigints (64-bit+ integers),
511
- // but designed to also support high-precision decimals in the future.
512
- struct BigNumberCell {
513
- 1: required string number_value,
514
- 2: optional NumberSubtype subtype,
508
+ // String representation for numbers that exceed JavaScript's Number.MAX_SAFE_INTEGER
509
+ // or require precision beyond float64. Used for bigints and future large decimals.
510
+ 3: optional string string_value,
515
511
  }
516
512
 
517
513
  struct NullCell {}
@@ -552,7 +548,6 @@ union Cell {
552
548
  8: required ArrayCell array_cell,
553
549
  9: required NullCell null_cell,
554
550
  10: required SQLNativeCell sql_native_cell,
555
- 11: required BigNumberCell big_number_cell,
556
551
  }
557
552
 
558
553
  union Data {