@saltcorn/db-common 1.1.2-beta.3 → 1.1.2-beta.5

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.
@@ -212,13 +212,13 @@ describe("mkWhere", () => {
212
212
  },
213
213
  })).toStrictEqual({
214
214
  values: ["foo bar"],
215
- where: `where to_tsvector('english', coalesce("name",'') || ' ' || coalesce("description",'')) @@ plainto_tsquery('english', $1)`,
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("name",'') || ' ' || coalesce("description",'')) @@ to_tsquery('english', $1)`,
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("name",'') || ' ' || coalesce("description",'') LIKE '%' || ? || '%'`,
230
+ where: `where coalesce("description",'') || ' ' || coalesce("name",'') LIKE '%' || ? || '%'`,
231
231
  });
232
232
  });
233
233
  it("should query subselect", () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/db-common",
3
- "version": "1.1.2-beta.3",
3
+ "version": "1.1.2-beta.5",
4
4
  "description": "Db common structures for Saltcorn, open-source no-code platform",
5
5
  "homepage": "https://saltcorn.com",
6
6
  "scripts": {