@snowtop/ent 0.0.39-alpha8 → 0.0.39-alpha9

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/core/clause.js CHANGED
@@ -253,8 +253,11 @@ class tsQueryClause {
253
253
  };
254
254
  }
255
255
  clause(idx) {
256
- const { language, value } = this.getInfo();
257
- return `${this.col} @@ ${this.getFunction()}('${language}', '${value}')`;
256
+ const { language } = this.getInfo();
257
+ if (db_1.Dialect.Postgres === db_1.default.getDialect()) {
258
+ return `${this.col} @@ ${this.getFunction()}('${language}', $${idx})`;
259
+ }
260
+ return `${this.col} @@ ${this.getFunction()}('${language}', ?)`;
258
261
  }
259
262
  values() {
260
263
  const { value } = this.getInfo();
package/index.d.ts CHANGED
@@ -24,6 +24,10 @@ declare const query: {
24
24
  ArrayLess: typeof q.ArrayLess;
25
25
  ArrayGreaterEq: typeof q.ArrayGreaterEq;
26
26
  ArrayLessEq: typeof q.ArrayLessEq;
27
+ TsQuery: typeof q.TsQuery;
28
+ PlainToTsQuery: typeof q.PlainToTsQuery;
29
+ PhraseToTsQuery: typeof q.PhraseToTsQuery;
30
+ WebsearchToTsQuery: typeof q.WebsearchToTsQuery;
27
31
  };
28
32
  export { query };
29
33
  export { RequestContext, ContextCache } from "./core/context";
package/index.js CHANGED
@@ -122,6 +122,10 @@ const query = {
122
122
  ArrayLess: q.ArrayLess,
123
123
  ArrayGreaterEq: q.ArrayGreaterEq,
124
124
  ArrayLessEq: q.ArrayLessEq,
125
+ TsQuery: q.TsQuery,
126
+ PlainToTsQuery: q.PlainToTsQuery,
127
+ PhraseToTsQuery: q.PhraseToTsQuery,
128
+ WebsearchToTsQuery: q.WebsearchToTsQuery,
125
129
  };
126
130
  exports.query = query;
127
131
  var context_1 = require("./core/context");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowtop/ent",
3
- "version": "0.0.39-alpha8",
3
+ "version": "0.0.39-alpha9",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -223,12 +223,18 @@ export interface Constraint {
223
223
  fkey?: ForeignKeyInfo;
224
224
  condition?: string;
225
225
  }
226
+ export interface FullTextWeight {
227
+ A?: string[];
228
+ B?: string[];
229
+ C?: string[];
230
+ D?: string[];
231
+ }
226
232
  export interface FullText {
227
233
  generatedColumnName?: string;
228
234
  language?: "english" | "french" | "german" | "simple";
229
235
  languageColumn?: string;
230
236
  indexType?: "gin" | "gist";
231
- weights?: string[];
237
+ weights?: FullTextWeight;
232
238
  }
233
239
  export interface Index {
234
240
  name: string;