Updates
This commit is contained in:
@@ -53,6 +53,8 @@ function checks(_a) {
|
||||
if ((_e = newQuery === null || newQuery === void 0 ? void 0 : newQuery.searchQuery) === null || _e === void 0 ? void 0 : _e.join) {
|
||||
for (let i = 0; i < newQuery.searchQuery.join.length; i++) {
|
||||
const join = newQuery.searchQuery.join[i];
|
||||
if (!join)
|
||||
continue;
|
||||
const joinTableName = join.tableName;
|
||||
const selectFields = join.selectFields;
|
||||
if (allowedTables === null || allowedTables === void 0 ? void 0 : allowedTables[0]) {
|
||||
|
||||
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = sqlGenerator;
|
||||
const lodash_1 = require("lodash");
|
||||
const sql_gen_operator_gen_1 = __importDefault(require("./sql-gen-operator-gen"));
|
||||
/**
|
||||
* # SQL Query Generator
|
||||
@@ -170,6 +171,7 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
||||
str +=
|
||||
"," +
|
||||
genObject.join
|
||||
.filter((j) => !(0, lodash_1.isUndefined)(j))
|
||||
.map((joinObj) => {
|
||||
const joinTableName = joinObj.alias
|
||||
? joinObj.alias
|
||||
@@ -212,6 +214,7 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
||||
str +=
|
||||
" " +
|
||||
genObject.join
|
||||
.filter((j) => !(0, lodash_1.isUndefined)(j))
|
||||
.map((join) => {
|
||||
return (join.joinType +
|
||||
" " +
|
||||
|
||||
Vendored
+1
-1
@@ -851,7 +851,7 @@ export type ServerQueryParam<T extends {
|
||||
addUserId?: {
|
||||
fieldName: keyof T;
|
||||
};
|
||||
join?: ServerQueryParamsJoin<K>[];
|
||||
join?: (ServerQueryParamsJoin<K> | undefined)[];
|
||||
group?: (keyof T)[];
|
||||
countSubQueries?: ServerQueryParamsCount[];
|
||||
fullTextSearch?: ServerQueryParamFullTextSearch<T>;
|
||||
|
||||
Reference in New Issue
Block a user