@malloydata/render 0.0.154 → 0.0.155-dev240722212948

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.
@@ -1158,7 +1158,7 @@ function lI(t) {
1158
1158
  "timestamp",
1159
1159
  "boolean",
1160
1160
  "json",
1161
- "unsupported",
1161
+ "sql native",
1162
1162
  "error"
1163
1163
  ].includes(t);
1164
1164
  }
@@ -6353,7 +6353,7 @@ class co extends PS {
6353
6353
  annotation: f
6354
6354
  });
6355
6355
  break;
6356
- case "unsupported":
6356
+ case "sql native":
6357
6357
  r.push({ ...a.f.fieldDef, resultMetadata: l, location: c });
6358
6358
  break;
6359
6359
  default:
@@ -7141,7 +7141,7 @@ class _i extends eW {
7141
7141
  return new EI(e, this);
7142
7142
  case "json":
7143
7143
  return new khe(e, this);
7144
- case "unsupported":
7144
+ case "sql native":
7145
7145
  return new Phe(e, this);
7146
7146
  case "turtle":
7147
7147
  return new nW(e, this);
@@ -38167,7 +38167,7 @@ class bye extends Cye.SpaceEntry {
38167
38167
  expressionType: "scalar",
38168
38168
  evalSpace: "input"
38169
38169
  };
38170
- return (0, _ye.isFieldTypeDef)(e) && e.expressionType && (n.expressionType = e.expressionType), n.dataType === "unsupported" && e.type === "unsupported" && e.rawType && (n.rawType = e.rawType), n;
38170
+ return (0, _ye.isFieldTypeDef)(e) && e.expressionType && (n.expressionType = e.expressionType), n.dataType === "sql native" && e.type === "sql native" && e.rawType && (n.rawType = e.rawType), n;
38171
38171
  }
38172
38172
  getQueryFieldDef(e) {
38173
38173
  }
@@ -39913,7 +39913,7 @@ class zK extends KAe.MalloyElement {
39913
39913
  * @param eVal ...list of expressions that must match legalChildTypes
39914
39914
  */
39915
39915
  typeCheck(e, n) {
39916
- return n.dataType !== "error" && !Uf.FT.in(n, this.legalChildTypes) ? (e.log(`'${this.elementType}' Can't use type ${Uf.FT.inspect(n)}`), !1) : !0;
39916
+ return n.dataType !== "error" && !Uf.FT.in(n, this.legalChildTypes) ? (e.log(n.dataType === "sql native" ? `'${this.elementType}' Can't be used with unsupported SQL native type '${n.rawType}'[unsupported-sql-native-type-not-allowed-in-expression]` : `'${this.elementType}' Can't use type ${Uf.FT.inspect(n)}`), !1) : !0;
39917
39917
  }
39918
39918
  /**
39919
39919
  * This is the operation which makes partial comparison and value trees work
@@ -40039,7 +40039,7 @@ function eSe(t, e, n, r) {
40039
40039
  const i = e.getExpression(t), s = r.getExpression(t), o = bE("boolean", i, s);
40040
40040
  if (o)
40041
40041
  return o;
40042
- if (i.dataType === "unsupported" || s.dataType === "unsupported") {
40042
+ if (i.dataType === "sql native" || s.dataType === "sql native") {
40043
40043
  const l = i.dataType === "null" || s.dataType === "null", c = i.rawType && i.rawType === s.rawType;
40044
40044
  if (!(l || c)) {
40045
40045
  const f = TE(e, i, r, s);
@@ -40148,7 +40148,7 @@ function WK(t, e, n, r) {
40148
40148
  if (j9(n, "/", "%")) {
40149
40149
  const i = e.getExpression(t), s = r.getExpression(t), o = TE(e, i, r, s);
40150
40150
  if (o)
40151
- return e.log("Cannot operate with unsupported type"), o;
40151
+ return e.log(`Cannot use '${n}' with sql native type`), o;
40152
40152
  const u = bE("number", i, s);
40153
40153
  if (u)
40154
40154
  return u;
@@ -40191,10 +40191,10 @@ function TE(t, e, n, r) {
40191
40191
  value: ["'unsupported operation'"],
40192
40192
  evalSpace: (0, Tn.mergeEvalSpaces)(e.evalSpace, r.evalSpace)
40193
40193
  };
40194
- if (e.dataType === "unsupported")
40195
- return t.log("Unsupported type not allowed in expression"), { ...i, dataType: r.dataType };
40196
- if (r.dataType === "unsupported")
40197
- return n.log("Unsupported type not allowed in expression"), i;
40194
+ if (e.dataType === "sql native")
40195
+ return t.log(`Unsupported SQL native type '${e.rawType}' not allowed in expression[unsupported-sql-native-type-not-allowed-in-expression]`), { ...i, dataType: r.dataType };
40196
+ if (r.dataType === "sql native")
40197
+ return n.log(`Unsupported SQL native type '${r.rawType}' not allowed in expression[unsupported-sql-native-type-not-allowed-in-expression]`), i;
40198
40198
  }
40199
40199
  Object.defineProperty(f2, "__esModule", { value: !0 });
40200
40200
  f2.BinaryBoolean = void 0;
@@ -41090,12 +41090,12 @@ class Lve extends Fve.ExpressionDef {
41090
41090
  getExpression(e) {
41091
41091
  var n, r, i;
41092
41092
  const s = this.expr.getExpression(e);
41093
- let o = "unsupported";
41093
+ let o = "sql native";
41094
41094
  if (typeof this.castType == "string")
41095
41095
  o = this.castType;
41096
41096
  else {
41097
41097
  const u = e.dialectObj();
41098
- u && (u.validateTypeName(this.castType.raw) ? o = (i = (r = (n = e.dialectObj()) === null || n === void 0 ? void 0 : n.sqlTypeToMalloyType(this.castType.raw)) === null || r === void 0 ? void 0 : r.type) !== null && i !== void 0 ? i : "unsupported" : this.log(`Cast type \`${this.castType.raw}\` is invalid for ${u.name} dialect`));
41098
+ u && (u.validateTypeName(this.castType.raw) ? o = (i = (r = (n = e.dialectObj()) === null || n === void 0 ? void 0 : n.sqlTypeToMalloyType(this.castType.raw)) === null || r === void 0 ? void 0 : r.type) !== null && i !== void 0 ? i : "sql native" : this.log(`Cast type \`${this.castType.raw}\` is invalid for ${u.name} dialect`));
41099
41099
  }
41100
41100
  return {
41101
41101
  dataType: o,
@@ -51321,7 +51321,7 @@ class Fs extends pB {
51321
51321
  return [i, new yB(r, this, s)];
51322
51322
  if (r.type === "json")
51323
51323
  return [i, new EB(r, this, s)];
51324
- if (r.type === "unsupported")
51324
+ if (r.type === "sql native")
51325
51325
  return [i, new AB(r, this, s)];
51326
51326
  }));
51327
51327
  }
@@ -51427,7 +51427,7 @@ class Fs extends pB {
51427
51427
  Ne.Explore = Fs;
51428
51428
  var Ou;
51429
51429
  (function(t) {
51430
- t.String = "string", t.Number = "number", t.Boolean = "boolean", t.Date = "date", t.Timestamp = "timestamp", t.Json = "json", t.Unsupported = "unsupported", t.Error = "error";
51430
+ t.String = "string", t.Number = "number", t.Boolean = "boolean", t.Date = "date", t.Timestamp = "timestamp", t.Json = "json", t.NativeUnsupported = "sql native", t.Error = "error";
51431
51431
  })(Ou || (Ne.AtomicFieldType = Ou = {}));
51432
51432
  class $c extends pB {
51433
51433
  constructor(e, n, r) {
@@ -51447,8 +51447,8 @@ class $c extends pB {
51447
51447
  return Ou.Number;
51448
51448
  case "json":
51449
51449
  return Ou.Json;
51450
- case "unsupported":
51451
- return Ou.Unsupported;
51450
+ case "sql native":
51451
+ return Ou.NativeUnsupported;
51452
51452
  case "error":
51453
51453
  return Ou.Error;
51454
51454
  }