Updates
This commit is contained in:
parent
0e44676226
commit
3d0ee2e688
@ -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}=${(() => {
|
return `${finalDbName}${typeof mtch.source == "object" ? mtch.source.tableName : tableName}.${typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source}=${(() => {
|
||||||
if (mtch.targetLiteral) {
|
if (mtch.targetLiteral) {
|
||||||
|
if (typeof mtch.targetLiteral == "number") {
|
||||||
|
return `${mtch.targetLiteral}`;
|
||||||
|
}
|
||||||
return `'${mtch.targetLiteral}'`;
|
return `'${mtch.targetLiteral}'`;
|
||||||
}
|
}
|
||||||
if (join.alias) {
|
if (join.alias) {
|
||||||
|
|||||||
2
dist/package-shared/types/index.d.ts
vendored
2
dist/package-shared/types/index.d.ts
vendored
@ -1043,7 +1043,7 @@ export type ServerQueryParamsJoinMatchObject<Field extends object = {
|
|||||||
/** Field name from the **Join Table** */
|
/** Field name from the **Join Table** */
|
||||||
target?: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject;
|
target?: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||||
/** A literal value: No source and target Needed! */
|
/** A literal value: No source and target Needed! */
|
||||||
targetLiteral?: string;
|
targetLiteral?: string | number;
|
||||||
__batch?: {
|
__batch?: {
|
||||||
matches: Omit<ServerQueryParamsJoinMatchObject<Field>, "__batch">[];
|
matches: Omit<ServerQueryParamsJoinMatchObject<Field>, "__batch">[];
|
||||||
operator: "AND" | "OR";
|
operator: "AND" | "OR";
|
||||||
|
|||||||
@ -169,6 +169,9 @@ export default function sqlGenerator<
|
|||||||
typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source
|
typeof mtch.source == "object" ? mtch.source.fieldName : mtch.source
|
||||||
}=${(() => {
|
}=${(() => {
|
||||||
if (mtch.targetLiteral) {
|
if (mtch.targetLiteral) {
|
||||||
|
if (typeof mtch.targetLiteral == "number") {
|
||||||
|
return `${mtch.targetLiteral}`;
|
||||||
|
}
|
||||||
return `'${mtch.targetLiteral}'`;
|
return `'${mtch.targetLiteral}'`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1262,7 +1262,7 @@ export type ServerQueryParamsJoinMatchObject<
|
|||||||
/** Field name from the **Join Table** */
|
/** Field name from the **Join Table** */
|
||||||
target?: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject;
|
target?: keyof Field | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||||
/** A literal value: No source and target Needed! */
|
/** A literal value: No source and target Needed! */
|
||||||
targetLiteral?: string;
|
targetLiteral?: string | number;
|
||||||
__batch?: {
|
__batch?: {
|
||||||
matches: Omit<ServerQueryParamsJoinMatchObject<Field>, "__batch">[];
|
matches: Omit<ServerQueryParamsJoinMatchObject<Field>, "__batch">[];
|
||||||
operator: "AND" | "OR";
|
operator: "AND" | "OR";
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "5.7.56",
|
"version": "5.7.57",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user