@malloydata/render 0.0.155-dev240722021714 → 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.
package/dist/module/index.mjs
CHANGED
|
@@ -336,7 +336,7 @@ function Lw(t) {
|
|
|
336
336
|
"timestamp",
|
|
337
337
|
"boolean",
|
|
338
338
|
"json",
|
|
339
|
-
"
|
|
339
|
+
"sql native",
|
|
340
340
|
"error"
|
|
341
341
|
].includes(t);
|
|
342
342
|
}
|
|
@@ -5531,7 +5531,7 @@ class go extends Jv {
|
|
|
5531
5531
|
annotation: f
|
|
5532
5532
|
});
|
|
5533
5533
|
break;
|
|
5534
|
-
case "
|
|
5534
|
+
case "sql native":
|
|
5535
5535
|
r.push({ ...a.f.fieldDef, resultMetadata: l, location: c });
|
|
5536
5536
|
break;
|
|
5537
5537
|
default:
|
|
@@ -6319,7 +6319,7 @@ class Ri extends RV {
|
|
|
6319
6319
|
return new Hw(e, this);
|
|
6320
6320
|
case "json":
|
|
6321
6321
|
return new S1e(e, this);
|
|
6322
|
-
case "
|
|
6322
|
+
case "sql native":
|
|
6323
6323
|
return new _1e(e, this);
|
|
6324
6324
|
case "turtle":
|
|
6325
6325
|
return new NV(e, this);
|
|
@@ -37345,7 +37345,7 @@ class cEe extends lEe.SpaceEntry {
|
|
|
37345
37345
|
expressionType: "scalar",
|
|
37346
37346
|
evalSpace: "input"
|
|
37347
37347
|
};
|
|
37348
|
-
return (0, aEe.isFieldTypeDef)(e) && e.expressionType && (n.expressionType = e.expressionType), n.dataType === "
|
|
37348
|
+
return (0, aEe.isFieldTypeDef)(e) && e.expressionType && (n.expressionType = e.expressionType), n.dataType === "sql native" && e.type === "sql native" && e.rawType && (n.rawType = e.rawType), n;
|
|
37349
37349
|
}
|
|
37350
37350
|
getQueryFieldDef(e) {
|
|
37351
37351
|
}
|
|
@@ -39091,7 +39091,7 @@ class mJ extends $Se.MalloyElement {
|
|
|
39091
39091
|
* @param eVal ...list of expressions that must match legalChildTypes
|
|
39092
39092
|
*/
|
|
39093
39093
|
typeCheck(e, n) {
|
|
39094
|
-
return n.dataType !== "error" && !Jf.FT.in(n, this.legalChildTypes) ? (e.log(`'${this.elementType}' Can't use type ${Jf.FT.inspect(n)}`), !1) : !0;
|
|
39094
|
+
return n.dataType !== "error" && !Jf.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 ${Jf.FT.inspect(n)}`), !1) : !0;
|
|
39095
39095
|
}
|
|
39096
39096
|
/**
|
|
39097
39097
|
* This is the operation which makes partial comparison and value trees work
|
|
@@ -39217,7 +39217,7 @@ function MSe(t, e, n, r) {
|
|
|
39217
39217
|
const i = e.getExpression(t), s = r.getExpression(t), o = jy("boolean", i, s);
|
|
39218
39218
|
if (o)
|
|
39219
39219
|
return o;
|
|
39220
|
-
if (i.dataType === "
|
|
39220
|
+
if (i.dataType === "sql native" || s.dataType === "sql native") {
|
|
39221
39221
|
const l = i.dataType === "null" || s.dataType === "null", c = i.rawType && i.rawType === s.rawType;
|
|
39222
39222
|
if (!(l || c)) {
|
|
39223
39223
|
const f = Uy(e, i, r, s);
|
|
@@ -39326,7 +39326,7 @@ function AJ(t, e, n, r) {
|
|
|
39326
39326
|
if (hU(n, "/", "%")) {
|
|
39327
39327
|
const i = e.getExpression(t), s = r.getExpression(t), o = Uy(e, i, r, s);
|
|
39328
39328
|
if (o)
|
|
39329
|
-
return e.log(
|
|
39329
|
+
return e.log(`Cannot use '${n}' with sql native type`), o;
|
|
39330
39330
|
const u = jy("number", i, s);
|
|
39331
39331
|
if (u)
|
|
39332
39332
|
return u;
|
|
@@ -39369,10 +39369,10 @@ function Uy(t, e, n, r) {
|
|
|
39369
39369
|
value: ["'unsupported operation'"],
|
|
39370
39370
|
evalSpace: (0, On.mergeEvalSpaces)(e.evalSpace, r.evalSpace)
|
|
39371
39371
|
};
|
|
39372
|
-
if (e.dataType === "
|
|
39373
|
-
return t.log(
|
|
39374
|
-
if (r.dataType === "
|
|
39375
|
-
return n.log(
|
|
39372
|
+
if (e.dataType === "sql native")
|
|
39373
|
+
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 };
|
|
39374
|
+
if (r.dataType === "sql native")
|
|
39375
|
+
return n.log(`Unsupported SQL native type '${r.rawType}' not allowed in expression[unsupported-sql-native-type-not-allowed-in-expression]`), i;
|
|
39376
39376
|
}
|
|
39377
39377
|
Object.defineProperty(_1, "__esModule", { value: !0 });
|
|
39378
39378
|
_1.BinaryBoolean = void 0;
|
|
@@ -40268,12 +40268,12 @@ class y_e extends g_e.ExpressionDef {
|
|
|
40268
40268
|
getExpression(e) {
|
|
40269
40269
|
var n, r, i;
|
|
40270
40270
|
const s = this.expr.getExpression(e);
|
|
40271
|
-
let o = "
|
|
40271
|
+
let o = "sql native";
|
|
40272
40272
|
if (typeof this.castType == "string")
|
|
40273
40273
|
o = this.castType;
|
|
40274
40274
|
else {
|
|
40275
40275
|
const u = e.dialectObj();
|
|
40276
|
-
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 : "
|
|
40276
|
+
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`));
|
|
40277
40277
|
}
|
|
40278
40278
|
return {
|
|
40279
40279
|
dataType: o,
|
|
@@ -50257,7 +50257,7 @@ class Bs extends ML {
|
|
|
50257
50257
|
return [i, new qL(r, this, s)];
|
|
50258
50258
|
if (r.type === "json")
|
|
50259
50259
|
return [i, new HL(r, this, s)];
|
|
50260
|
-
if (r.type === "
|
|
50260
|
+
if (r.type === "sql native")
|
|
50261
50261
|
return [i, new zL(r, this, s)];
|
|
50262
50262
|
}));
|
|
50263
50263
|
}
|
|
@@ -50363,7 +50363,7 @@ class Bs extends ML {
|
|
|
50363
50363
|
Ne.Explore = Bs;
|
|
50364
50364
|
var Iu;
|
|
50365
50365
|
(function(t) {
|
|
50366
|
-
t.String = "string", t.Number = "number", t.Boolean = "boolean", t.Date = "date", t.Timestamp = "timestamp", t.Json = "json", t.
|
|
50366
|
+
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";
|
|
50367
50367
|
})(Iu || (Ne.AtomicFieldType = Iu = {}));
|
|
50368
50368
|
class qc extends ML {
|
|
50369
50369
|
constructor(e, n, r) {
|
|
@@ -50383,8 +50383,8 @@ class qc extends ML {
|
|
|
50383
50383
|
return Iu.Number;
|
|
50384
50384
|
case "json":
|
|
50385
50385
|
return Iu.Json;
|
|
50386
|
-
case "
|
|
50387
|
-
return Iu.
|
|
50386
|
+
case "sql native":
|
|
50387
|
+
return Iu.NativeUnsupported;
|
|
50388
50388
|
case "error":
|
|
50389
50389
|
return Iu.Error;
|
|
50390
50390
|
}
|