@514labs/moose-lib 0.6.238-ci-6-g1a6f273f → 0.6.238-ci-1-g65c37d1e
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/{browserCompatible-CKgEUuZc.d.ts → browserCompatible-C7Tw6oiI.d.ts} +2 -26
- package/dist/{browserCompatible-DCc9Zd_X.d.mts → browserCompatible-Doxlb78a.d.mts} +2 -26
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +5 -10
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +5 -10
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +1 -25
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +1 -25
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dataModels/toDataModels.js +1 -25
- package/dist/dataModels/toDataModels.js.map +1 -1
- package/dist/dataModels/toDataModels.mjs +1 -25
- package/dist/dataModels/toDataModels.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +5 -10
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +5 -10
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-CYFF3a0J.d.mts → index-DPREeoku.d.mts} +101 -2
- package/dist/{index-CYFF3a0J.d.ts → index-DPREeoku.d.ts} +101 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -10
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +15 -0
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +15 -0
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/compilerPlugin.js
CHANGED
|
@@ -451,22 +451,6 @@ var handleDefault = (t, checker) => {
|
|
|
451
451
|
}
|
|
452
452
|
return defaultType.value;
|
|
453
453
|
};
|
|
454
|
-
var handleMaterialized = (t, checker) => {
|
|
455
|
-
const materializedType = getTaggedType(
|
|
456
|
-
t,
|
|
457
|
-
checker,
|
|
458
|
-
"_clickhouse_materialized"
|
|
459
|
-
);
|
|
460
|
-
if (materializedType === null) {
|
|
461
|
-
return null;
|
|
462
|
-
}
|
|
463
|
-
if (!materializedType.isStringLiteral()) {
|
|
464
|
-
throw new UnsupportedFeature(
|
|
465
|
-
'ClickHouseMaterialized must use a string literal, e.g. ClickHouseMaterialized<"toDate(timestamp)">'
|
|
466
|
-
);
|
|
467
|
-
}
|
|
468
|
-
return materializedType.value;
|
|
469
|
-
};
|
|
470
454
|
var handleTtl = (t, checker) => {
|
|
471
455
|
const ttlType = getTaggedType(t, checker, "_clickhouse_ttl");
|
|
472
456
|
if (ttlType === null) {
|
|
@@ -957,21 +941,13 @@ var toColumns = (t, checker) => {
|
|
|
957
941
|
isJwt,
|
|
958
942
|
node?.type
|
|
959
943
|
);
|
|
960
|
-
const defaultValue = defaultExpression ?? handleDefault(type, checker);
|
|
961
|
-
const materializedValue = handleMaterialized(type, checker);
|
|
962
|
-
if (defaultValue && materializedValue) {
|
|
963
|
-
throw new UnsupportedFeature(
|
|
964
|
-
`Column '${prop.name}' cannot have both ClickHouseDefault and ClickHouseMaterialized. Use one or the other.`
|
|
965
|
-
);
|
|
966
|
-
}
|
|
967
944
|
return {
|
|
968
945
|
name: prop.name,
|
|
969
946
|
data_type: dataType,
|
|
970
947
|
primary_key: isKey,
|
|
971
948
|
required: !nullable,
|
|
972
949
|
unique: false,
|
|
973
|
-
default:
|
|
974
|
-
materialized: materializedValue,
|
|
950
|
+
default: defaultExpression ?? handleDefault(type, checker),
|
|
975
951
|
ttl: handleTtl(type, checker),
|
|
976
952
|
codec: handleCodec(type, checker),
|
|
977
953
|
annotations
|