@saltcorn/db-common 1.1.2-beta.3 → 1.1.2-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/internal.test.js +3 -3
- package/package.json +1 -1
package/dist/internal.test.js
CHANGED
|
@@ -212,13 +212,13 @@ describe("mkWhere", () => {
|
|
|
212
212
|
},
|
|
213
213
|
})).toStrictEqual({
|
|
214
214
|
values: ["foo bar"],
|
|
215
|
-
where: `where to_tsvector('english', coalesce("
|
|
215
|
+
where: `where to_tsvector('english', coalesce("description",'') || ' ' || coalesce("name",'')) @@ plainto_tsquery('english', $1)`,
|
|
216
216
|
});
|
|
217
217
|
expect(mkWhere({
|
|
218
218
|
_fts: { fields: [fld("name"), fld("description")], searchTerm: "foo" },
|
|
219
219
|
})).toStrictEqual({
|
|
220
220
|
values: ["foo:*"],
|
|
221
|
-
where: `where to_tsvector('english', coalesce("
|
|
221
|
+
where: `where to_tsvector('english', coalesce("description",'') || ' ' || coalesce("name",'')) @@ to_tsquery('english', $1)`,
|
|
222
222
|
});
|
|
223
223
|
expect(mkWhere({
|
|
224
224
|
_fts: {
|
|
@@ -227,7 +227,7 @@ describe("mkWhere", () => {
|
|
|
227
227
|
},
|
|
228
228
|
}, true)).toStrictEqual({
|
|
229
229
|
values: ["foo"],
|
|
230
|
-
where: `where coalesce("
|
|
230
|
+
where: `where coalesce("description",'') || ' ' || coalesce("name",'') LIKE '%' || ? || '%'`,
|
|
231
231
|
});
|
|
232
232
|
});
|
|
233
233
|
it("should query subselect", () => {
|