@ts-safeql/generate
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -138,4 +138,7 @@ "use strict"; | ||
if ("introspected" in params.col) { | ||
const value = (_b = (_a = params.pgEnums | ||
.get(params.col.described.type)) === null || _a === void 0 ? void 0 : _a.values.map((x) => `'${x}'`).join(" | ")) !== null && _b !== void 0 ? _b : params.typesMap[params.col.introspected.colType]; | ||
const valueAsEnum = (_a = params.pgEnums | ||
.get(params.col.described.type)) === null || _a === void 0 ? void 0 : _a.values.map((x) => `'${x}'`).join(" | "); | ||
const valueAsBase = (0, shared_1.fmap)(params.col.introspected.colBaseType, (x) => params.typesMap[x]); | ||
const valueAsType = params.typesMap[params.col.introspected.colType]; | ||
const value = (_b = valueAsEnum !== null && valueAsEnum !== void 0 ? valueAsEnum : valueAsType) !== null && _b !== void 0 ? _b : valueAsBase; | ||
const key = (_c = params.col.described.name) !== null && _c !== void 0 ? _c : params.col.introspected.colName; | ||
@@ -226,2 +229,8 @@ const isNullable = !params.col.introspected.colNotNull || | ||
pg_type.typname as "colType", | ||
CASE | ||
WHEN pg_type.typtype = 'd' THEN | ||
(SELECT typname FROM pg_type pt WHERE pt.oid = pg_type.typbasetype) | ||
ELSE | ||
NULL | ||
END as "colBaseType", | ||
pg_attribute.attnum as "colNum", | ||
@@ -228,0 +237,0 @@ pg_attribute.atthasdef "colHasDef", |
{ | ||
"name": "@ts-safeql/generate", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44557
691