diff --git a/dist/package-shared/functions/dsql/sql/sql-generator.js b/dist/package-shared/functions/dsql/sql/sql-generator.js index 8c5c8ac..2643e06 100644 --- a/dist/package-shared/functions/dsql/sql/sql-generator.js +++ b/dist/package-shared/functions/dsql/sql/sql-generator.js @@ -116,6 +116,9 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) { } return `${finalDbName}${typeof mtch.source == "object" ? mtch.source.tableName : tableName}.${typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source}=${(() => { if (mtch.targetLiteral) { + if (typeof mtch.targetLiteral == "number") { + return `${mtch.targetLiteral}`; + } return `'${mtch.targetLiteral}'`; } if (join.alias) { diff --git a/dist/package-shared/types/index.d.ts b/dist/package-shared/types/index.d.ts index 96427d0..8e2dfe2 100644 --- a/dist/package-shared/types/index.d.ts +++ b/dist/package-shared/types/index.d.ts @@ -1043,7 +1043,7 @@ export type ServerQueryParamsJoinMatchObject, "__batch">[]; operator: "AND" | "OR"; diff --git a/package-shared/functions/dsql/sql/sql-generator.ts b/package-shared/functions/dsql/sql/sql-generator.ts index 8742abc..9d3173b 100644 --- a/package-shared/functions/dsql/sql/sql-generator.ts +++ b/package-shared/functions/dsql/sql/sql-generator.ts @@ -169,6 +169,9 @@ export default function sqlGenerator< typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source }=${(() => { if (mtch.targetLiteral) { + if (typeof mtch.targetLiteral == "number") { + return `${mtch.targetLiteral}`; + } return `'${mtch.targetLiteral}'`; } diff --git a/package-shared/types/index.ts b/package-shared/types/index.ts index 3d7e2a2..63978b5 100644 --- a/package-shared/types/index.ts +++ b/package-shared/types/index.ts @@ -1262,7 +1262,7 @@ export type ServerQueryParamsJoinMatchObject< /** Field name from the **Join Table** */ target?: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject; /** A literal value: No source and target Needed! */ - targetLiteral?: string; + targetLiteral?: string | number; __batch?: { matches: Omit, "__batch">[]; operator: "AND" | "OR"; diff --git a/package.json b/package.json index 7034a33..910b206 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@moduletrace/datasquirel", - "version": "5.7.56", + "version": "5.7.57", "description": "Cloud-based SQL data management tool", "main": "dist/index.js", "bin": {