@snowtop/ent 0.2.0-alpha.8 → 0.2.0-alpha.9

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/base.d.ts CHANGED
@@ -86,6 +86,7 @@ interface JoinOptions<T2 extends Data = Data, K2 = keyof T2> {
86
86
  tableName: string;
87
87
  alias?: string;
88
88
  clause: clause.Clause<T2, K2>;
89
+ type?: "inner" | "outer" | "left" | "right";
89
90
  }
90
91
  export interface QueryDataOptions<T extends Data = Data, K = keyof T> {
91
92
  distinct?: boolean;
@@ -36,7 +36,24 @@ function getJoinInfo(join, clauseIdx = 1) {
36
36
  ? `${join.tableName} ${join.alias}`
37
37
  : join.tableName;
38
38
  valuesUsed += join.clause.values().length;
39
- return `JOIN ${joinTable} ON ${join.clause.clause(clauseIdx)}`;
39
+ let joinType;
40
+ switch (join.type) {
41
+ case "left":
42
+ joinType = "LEFT JOIN";
43
+ break;
44
+ case "right":
45
+ joinType = "RIGHT JOIN";
46
+ break;
47
+ case "outer":
48
+ joinType = "FULL OUTER JOIN";
49
+ break;
50
+ case "inner":
51
+ joinType = "INNER JOIN";
52
+ break;
53
+ default:
54
+ joinType = "JOIN";
55
+ }
56
+ return `${joinType} ${joinTable} ON ${join.clause.clause(clauseIdx)}`;
40
57
  })
41
58
  .join(" ");
42
59
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowtop/ent",
3
- "version": "0.2.0-alpha.8",
3
+ "version": "0.2.0-alpha.9",
4
4
  "description": "snowtop ent framework",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -247,6 +247,7 @@ export interface FieldOptions {
247
247
  getDerivedFields?(name: string): FieldMap;
248
248
  convert?: ConvertType;
249
249
  fetchOnDemand?: boolean;
250
+ disableBase64Encode?: boolean;
250
251
  dbOnly?: boolean;
251
252
  [x: string]: any;
252
253
  }