sasat 0.22.5 → 0.22.6

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/index.cjs CHANGED
@@ -112,6 +112,7 @@ const Sql = {
112
112
  case 8: return Sql.in(expr);
113
113
  case 6: return Sql.isNull(expr);
114
114
  case 14: return Sql.exists(expr);
115
+ case 15: return expr.expr;
115
116
  }
116
117
  },
117
118
  exists: (expr) => {
@@ -626,7 +627,7 @@ const createQuery = (baseTableName, fields, options, tableInfo, relationMap, con
626
627
  parentTableAlias: tableAlias,
627
628
  childTableAlias: table.tableAlias || "t" + current,
628
629
  context
629
- }), table.joinOn), "LEFT");
630
+ }), table.joinOn), table.joinType ?? "LEFT");
630
631
  }).filter(require_util.nonNullable), tableAlias);
631
632
  };
632
633
  return {
package/dist/index.d.cts CHANGED
@@ -128,7 +128,7 @@ type ExistsExpression = {
128
128
  kind: QueryNodeKind.Exists;
129
129
  query: Query | RawExpression;
130
130
  };
131
- type BooleanValueExpression = CompoundExpression | ComparisonExpression | IsNullExpression | ParenthesisExpression | InExpression | BetweenExpression | ContainsExpression | ExistsExpression;
131
+ type BooleanValueExpression = CompoundExpression | ComparisonExpression | IsNullExpression | ParenthesisExpression | InExpression | BetweenExpression | ContainsExpression | ExistsExpression | RawExpression;
132
132
  type IsNullExpression = {
133
133
  kind: QueryNodeKind.IsNullExpr;
134
134
  expr: Value;
@@ -195,6 +195,7 @@ type Fields<Entity, Relation = Record<string, unknown>> = {
195
195
  relations?: Relation;
196
196
  tableAlias?: string;
197
197
  joinOn?: BooleanValueExpression;
198
+ joinType?: "INNER" | "LEFT";
198
199
  };
199
200
  //#endregion
200
201
  //#region src/runtime/dsl/query/createQueryResolveInfo.d.ts
package/dist/index.d.mts CHANGED
@@ -128,7 +128,7 @@ type ExistsExpression = {
128
128
  kind: QueryNodeKind.Exists;
129
129
  query: Query | RawExpression;
130
130
  };
131
- type BooleanValueExpression = CompoundExpression | ComparisonExpression | IsNullExpression | ParenthesisExpression | InExpression | BetweenExpression | ContainsExpression | ExistsExpression;
131
+ type BooleanValueExpression = CompoundExpression | ComparisonExpression | IsNullExpression | ParenthesisExpression | InExpression | BetweenExpression | ContainsExpression | ExistsExpression | RawExpression;
132
132
  type IsNullExpression = {
133
133
  kind: QueryNodeKind.IsNullExpr;
134
134
  expr: Value;
@@ -195,6 +195,7 @@ type Fields<Entity, Relation = Record<string, unknown>> = {
195
195
  relations?: Relation;
196
196
  tableAlias?: string;
197
197
  joinOn?: BooleanValueExpression;
198
+ joinType?: "INNER" | "LEFT";
198
199
  };
199
200
  //#endregion
200
201
  //#region src/runtime/dsl/query/createQueryResolveInfo.d.ts
package/dist/index.mjs CHANGED
@@ -110,6 +110,7 @@ const Sql = {
110
110
  case 8: return Sql.in(expr);
111
111
  case 6: return Sql.isNull(expr);
112
112
  case 14: return Sql.exists(expr);
113
+ case 15: return expr.expr;
113
114
  }
114
115
  },
115
116
  exists: (expr) => {
@@ -624,7 +625,7 @@ const createQuery = (baseTableName, fields, options, tableInfo, relationMap, con
624
625
  parentTableAlias: tableAlias,
625
626
  childTableAlias: table.tableAlias || "t" + current,
626
627
  context
627
- }), table.joinOn), "LEFT");
628
+ }), table.joinOn), table.joinType ?? "LEFT");
628
629
  }).filter(nonNullable), tableAlias);
629
630
  };
630
631
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sasat",
3
- "version": "0.22.5",
3
+ "version": "0.22.6",
4
4
  "repository": "https://github.com/nin138/sasat.git",
5
5
  "author": "nin138 <ninian138@gmail.com>",
6
6
  "license": "MIT",