Updates
This commit is contained in:
Vendored
+4
-4
@@ -475,10 +475,6 @@ export type ServerQueryParamsCount = {
|
||||
}[];
|
||||
alias: string;
|
||||
};
|
||||
export type ServerQueryParamsCountSrcTrgMap = {
|
||||
table: string;
|
||||
field: string;
|
||||
};
|
||||
export type TableSelectFieldsObject<T extends {
|
||||
[k: string]: any;
|
||||
} = {
|
||||
@@ -524,6 +520,10 @@ export type ServerQueryQueryObject<T extends object = {
|
||||
}, K extends string = string> = {
|
||||
[key in keyof T]: ServerQueryObject<T, K>;
|
||||
};
|
||||
export type ServerQueryParamsCountSrcTrgMap = {
|
||||
table: string;
|
||||
field: string;
|
||||
};
|
||||
export type FetchDataParams = {
|
||||
path: string;
|
||||
method?: (typeof DataCrudRequestMethods)[number];
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { ServerQueryParam } from "../types";
|
||||
import { ServerQueryParam } from "../types";
|
||||
type Param<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
|
||||
Vendored
+7
-5
@@ -106,6 +106,8 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
||||
btch_mtch += `(`;
|
||||
for (let i = 0; i < mtch.__batch.matches.length; i++) {
|
||||
const __mtch = mtch.__batch.matches[i];
|
||||
if (!__mtch)
|
||||
continue;
|
||||
btch_mtch += `${generateJoinStr(__mtch, join)}`;
|
||||
if (i < mtch.__batch.matches.length - 1) {
|
||||
btch_mtch += ` ${mtch.__batch.operator || "OR"} `;
|
||||
@@ -373,11 +375,11 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
||||
if (Array.isArray(genObject.order)) {
|
||||
for (let i = 0; i < genObject.order.length; i++) {
|
||||
const order = genObject.order[i];
|
||||
if (order) {
|
||||
orderSrt +=
|
||||
grabOrderString(order) +
|
||||
(i < genObject.order.length - 1 ? `,` : "");
|
||||
}
|
||||
if (!order)
|
||||
continue;
|
||||
orderSrt +=
|
||||
grabOrderString(order) +
|
||||
(i < genObject.order.length - 1 ? `,` : "");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user