修复search问题
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@yizhi/postgres",
|
"name": "@yizhi/postgres",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "typing/index.d.ts",
|
"types": "typing/index.d.ts",
|
||||||
"scripts": {},
|
"scripts": {},
|
||||||
|
@ -692,7 +692,7 @@ export class SelectBuilder<E extends BasicEntity> extends WithGroup(WithJoin(Wit
|
|||||||
if (!this.#whereCache) {
|
if (!this.#whereCache) {
|
||||||
const result = [...this.wheres];
|
const result = [...this.wheres];
|
||||||
this.joinners.forEach(j => result.push(...j.__wheres__));
|
this.joinners.forEach(j => result.push(...j.__wheres__));
|
||||||
if (this.ctx.searchs.length) result.push(this.ctx.searchs.join(" or "))
|
if (this.ctx.searchs.length) result.push("(" + this.ctx.searchs.join(" or ") + ")")
|
||||||
this.#whereCache = result.join(" and ");
|
this.#whereCache = result.join(" and ");
|
||||||
}
|
}
|
||||||
return this.#whereCache;
|
return this.#whereCache;
|
||||||
|
Reference in New Issue
Block a user