This commit is contained in:
Benjamin Toby
2025-08-26 11:37:28 +01:00
parent 82bea3efd0
commit 2336b71703
5 changed files with 12 additions and 4 deletions
@@ -15,7 +15,7 @@ function generateTypeDefinition({ paradigm, table, query, typeDefName, allValues
: `DSQL_${query.single}_${query.single_table}`.toUpperCase();
const fields = table.fields;
function typeMap(schemaType) {
var _a, _b;
var _a, _b, _c;
if (schemaType.options && schemaType.options.length > 0) {
return schemaType.options
.map((opt) => {
@@ -33,6 +33,9 @@ function generateTypeDefinition({ paradigm, table, query, typeDefName, allValues
if ((_b = schemaType.dataType) === null || _b === void 0 ? void 0 : _b.match(/text|varchar|timestamp/i)) {
return "string";
}
if ((_c = schemaType.dataType) === null || _c === void 0 ? void 0 : _c.match(/boolean/i)) {
return "boolean";
}
return "string";
}
const typesArrayTypeScript = [];
@@ -35,7 +35,7 @@ function sqlGenOperatorGen({ fieldName, value, equality, }) {
}
else if (equality == "REGEXP") {
return {
str: `LOWER(${fieldName}) REGEXP LOWER(?')`,
str: `LOWER(${fieldName}) REGEXP LOWER(?)`,
param: value,
};
}