Updates
This commit is contained in:
parent
3346486b6b
commit
77fca5e47c
@ -101,7 +101,7 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
||||
}
|
||||
let fullTextMatchStr = (genObject === null || genObject === void 0 ? void 0 : genObject.fullTextSearch)
|
||||
? ` MATCH(${genObject.fullTextSearch.fields
|
||||
.map((f) => (genObject.join ? `${tableName}.${f}` : `${f}`))
|
||||
.map((f) => genObject.join ? `${tableName}.${String(f)}` : `${String(f)}`)
|
||||
.join(",")}) AGAINST (?)`
|
||||
: undefined;
|
||||
const fullTextSearchStr = (genObject === null || genObject === void 0 ? void 0 : genObject.fullTextSearch)
|
||||
|
||||
10
dist/package-shared/types/index.d.ts
vendored
10
dist/package-shared/types/index.d.ts
vendored
@ -828,11 +828,15 @@ export type ServerQueryParam<T extends {
|
||||
join?: ServerQueryParamsJoin<K>[];
|
||||
group?: (keyof T)[];
|
||||
countSubQueries?: ServerQueryParamsCount[];
|
||||
fullTextSearch?: ServerQueryParamFullTextSearch;
|
||||
fullTextSearch?: ServerQueryParamFullTextSearch<T>;
|
||||
[key: string]: any;
|
||||
};
|
||||
export type ServerQueryParamFullTextSearch = {
|
||||
fields: string[];
|
||||
export type ServerQueryParamFullTextSearch<T extends {
|
||||
[k: string]: any;
|
||||
} = {
|
||||
[k: string]: any;
|
||||
}> = {
|
||||
fields: (keyof T)[];
|
||||
searchTerm: string;
|
||||
/** Field Name to user to Rank the Score of Search Results */
|
||||
scoreAlias: string;
|
||||
|
||||
@ -154,7 +154,9 @@ export default function sqlGenerator<
|
||||
|
||||
let fullTextMatchStr = genObject?.fullTextSearch
|
||||
? ` MATCH(${genObject.fullTextSearch.fields
|
||||
.map((f) => (genObject.join ? `${tableName}.${f}` : `${f}`))
|
||||
.map((f) =>
|
||||
genObject.join ? `${tableName}.${String(f)}` : `${String(f)}`
|
||||
)
|
||||
.join(",")}) AGAINST (?)`
|
||||
: undefined;
|
||||
|
||||
|
||||
@ -1013,12 +1013,14 @@ export type ServerQueryParam<
|
||||
join?: ServerQueryParamsJoin<K>[];
|
||||
group?: (keyof T)[];
|
||||
countSubQueries?: ServerQueryParamsCount[];
|
||||
fullTextSearch?: ServerQueryParamFullTextSearch;
|
||||
fullTextSearch?: ServerQueryParamFullTextSearch<T>;
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
export type ServerQueryParamFullTextSearch = {
|
||||
fields: string[];
|
||||
export type ServerQueryParamFullTextSearch<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
> = {
|
||||
fields: (keyof T)[];
|
||||
searchTerm: string;
|
||||
/** Field Name to user to Rank the Score of Search Results */
|
||||
scoreAlias: string;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.4.6",
|
||||
"version": "5.4.7",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user