Updates
This commit is contained in:
parent
ac489ce443
commit
3d4ee58d01
@ -22,14 +22,13 @@ function generateTypeDefinition({ paradigm, table, query, typeDefName, allValues
|
||||
return schemaType.options
|
||||
.map((opt) => {
|
||||
var _a;
|
||||
return ((_a = schemaType.dataType) === null || _a === void 0 ? void 0 : _a.match(/int/i)) ||
|
||||
typeof opt == "number"
|
||||
return ((_a = schemaType.dataType) === null || _a === void 0 ? void 0 : _a.match(/int|double|decimal|float/i)) || typeof opt == "number"
|
||||
? `${opt}`
|
||||
: `"${opt}"`;
|
||||
})
|
||||
.join(" | ");
|
||||
}
|
||||
if ((_a = schemaType.dataType) === null || _a === void 0 ? void 0 : _a.match(/int|double|decimal/i)) {
|
||||
if ((_a = schemaType.dataType) === null || _a === void 0 ? void 0 : _a.match(/int|double|decimal|float/i)) {
|
||||
return "number";
|
||||
}
|
||||
if ((_b = schemaType.dataType) === null || _b === void 0 ? void 0 : _b.match(/text|varchar|timestamp/i)) {
|
||||
|
||||
@ -40,15 +40,16 @@ export default function generateTypeDefinition({
|
||||
if (schemaType.options && schemaType.options.length > 0) {
|
||||
return schemaType.options
|
||||
.map((opt) =>
|
||||
schemaType.dataType?.match(/int/i) ||
|
||||
typeof opt == "number"
|
||||
schemaType.dataType?.match(
|
||||
/int|double|decimal|float/i,
|
||||
) || typeof opt == "number"
|
||||
? `${opt}`
|
||||
: `"${opt}"`,
|
||||
)
|
||||
.join(" | ");
|
||||
}
|
||||
|
||||
if (schemaType.dataType?.match(/int|double|decimal/i)) {
|
||||
if (schemaType.dataType?.match(/int|double|decimal|float/i)) {
|
||||
return "number";
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.7.53",
|
||||
"version": "5.7.54",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user