taon-type-sql 21.0.26 → 21.0.28

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.
Files changed (141) hide show
  1. package/browser/package.json +1 -1
  2. package/browser-prod/package.json +1 -1
  3. package/lib/build-info._auto-generated_.d.ts +1 -1
  4. package/lib/build-info._auto-generated_.js +1 -1
  5. package/lib/package.json +1 -1
  6. package/lib-prod/build-info._auto-generated_.d.ts +24 -0
  7. package/lib-prod/build-info._auto-generated_.js +10 -6
  8. package/lib-prod/build-info._auto-generated_.js.map +1 -0
  9. package/lib-prod/builder/column/basic-column.d.ts +8 -0
  10. package/lib-prod/builder/column/basic-column.js +8 -4
  11. package/lib-prod/builder/column/basic-column.js.map +1 -0
  12. package/lib-prod/builder/column/boolean-column.d.ts +9 -0
  13. package/lib-prod/builder/column/boolean-column.js +9 -5
  14. package/lib-prod/builder/column/boolean-column.js.map +1 -0
  15. package/lib-prod/builder/column/comparable-column.d.ts +18 -0
  16. package/lib-prod/builder/column/comparable-column.js +15 -12
  17. package/lib-prod/builder/column/comparable-column.js.map +1 -0
  18. package/lib-prod/builder/column/date-column.d.ts +9 -0
  19. package/lib-prod/builder/column/date-column.js +9 -5
  20. package/lib-prod/builder/column/date-column.js.map +1 -0
  21. package/lib-prod/builder/column/number-column.d.ts +10 -0
  22. package/lib-prod/builder/column/number-column.js +7 -3
  23. package/lib-prod/builder/column/number-column.js.map +1 -0
  24. package/lib-prod/builder/column/query-column.d.ts +18 -0
  25. package/lib-prod/builder/column/query-column.js +12 -4
  26. package/lib-prod/builder/column/query-column.js.map +1 -0
  27. package/lib-prod/builder/column/string-column.d.ts +17 -0
  28. package/lib-prod/builder/column/string-column.js +12 -8
  29. package/lib-prod/builder/column/string-column.js.map +1 -0
  30. package/lib-prod/builder/column/value-column.d.ts +15 -0
  31. package/lib-prod/builder/column/value-column.js +15 -12
  32. package/lib-prod/builder/column/value-column.js.map +1 -0
  33. package/lib-prod/builder/condition/query-column-condition.d.ts +13 -0
  34. package/lib-prod/builder/condition/query-column-condition.js +12 -5
  35. package/lib-prod/builder/condition/query-column-condition.js.map +1 -0
  36. package/lib-prod/builder/condition/query-condition-chain.d.ts +17 -0
  37. package/lib-prod/builder/condition/query-condition-chain.js +12 -4
  38. package/lib-prod/builder/condition/query-condition-chain.js.map +1 -0
  39. package/lib-prod/builder/condition/query-condition.d.ts +7 -0
  40. package/lib-prod/builder/condition/query-condition.js +4 -1
  41. package/lib-prod/builder/condition/query-condition.js.map +1 -0
  42. package/lib-prod/builder/condition/query-join-condition.d.ts +12 -0
  43. package/lib-prod/builder/condition/query-join-condition.js +12 -5
  44. package/lib-prod/builder/condition/query-join-condition.js.map +1 -0
  45. package/lib-prod/builder/helpers/generics-helper.d.ts +2 -0
  46. package/lib-prod/builder/helpers/generics-helper.js +5 -1
  47. package/lib-prod/builder/helpers/generics-helper.js.map +1 -0
  48. package/lib-prod/builder/helpers/internal-types.d.ts +15 -0
  49. package/lib-prod/builder/helpers/internal-types.js +4 -1
  50. package/lib-prod/builder/helpers/internal-types.js.map +1 -0
  51. package/lib-prod/builder/join/joined-tables-chain.d.ts +11 -0
  52. package/lib-prod/builder/join/joined-tables-chain.js +10 -3
  53. package/lib-prod/builder/join/joined-tables-chain.js.map +1 -0
  54. package/lib-prod/builder/join/joined-tables.d.ts +12 -0
  55. package/lib-prod/builder/join/joined-tables.js +12 -6
  56. package/lib-prod/builder/join/joined-tables.js.map +1 -0
  57. package/lib-prod/builder/other/query-ordering.d.ts +10 -0
  58. package/lib-prod/builder/other/query-ordering.js +8 -1
  59. package/lib-prod/builder/other/query-ordering.js.map +1 -0
  60. package/lib-prod/builder/query/select-query.d.ts +29 -0
  61. package/lib-prod/builder/query/select-query.js +16 -7
  62. package/lib-prod/builder/query/select-query.js.map +1 -0
  63. package/lib-prod/builder/query/table-condition-query.d.ts +16 -0
  64. package/lib-prod/builder/query/table-condition-query.js +11 -2
  65. package/lib-prod/builder/query/table-condition-query.js.map +1 -0
  66. package/lib-prod/builder/query/table-query.d.ts +23 -0
  67. package/lib-prod/builder/query/table-query.js +14 -6
  68. package/lib-prod/builder/query/table-query.js.map +1 -0
  69. package/lib-prod/builder/query-source.d.ts +14 -0
  70. package/lib-prod/builder/query-source.js +12 -7
  71. package/lib-prod/builder/query-source.js.map +1 -0
  72. package/lib-prod/builder/query-table.d.ts +15 -0
  73. package/lib-prod/builder/query-table.js +15 -9
  74. package/lib-prod/builder/query-table.js.map +1 -0
  75. package/lib-prod/client/mysql.d.ts +5 -0
  76. package/lib-prod/client/mysql.js +8 -4
  77. package/lib-prod/client/mysql.js.map +1 -0
  78. package/lib-prod/client/pg.d.ts +5 -0
  79. package/lib-prod/client/pg.js +8 -4
  80. package/lib-prod/client/pg.js.map +1 -0
  81. package/lib-prod/client/query-processor.d.ts +10 -0
  82. package/lib-prod/client/query-processor.js +11 -7
  83. package/lib-prod/client/query-processor.js.map +1 -0
  84. package/lib-prod/converter/param-converter.d.ts +2 -0
  85. package/lib-prod/converter/param-converter.js +7 -2
  86. package/lib-prod/converter/param-converter.js.map +1 -0
  87. package/lib-prod/converter/parameterized-converter.d.ts +5 -0
  88. package/lib-prod/converter/parameterized-converter.js +9 -5
  89. package/lib-prod/converter/parameterized-converter.js.map +1 -0
  90. package/lib-prod/converter/query-converter.d.ts +2 -0
  91. package/lib-prod/converter/query-converter.js +12 -8
  92. package/lib-prod/converter/query-converter.js.map +1 -0
  93. package/lib-prod/converter/result-converter.d.ts +2 -0
  94. package/lib-prod/converter/result-converter.js +5 -1
  95. package/lib-prod/converter/result-converter.js.map +1 -0
  96. package/lib-prod/converter/sql-converter.d.ts +2 -0
  97. package/lib-prod/converter/sql-converter.js +8 -4
  98. package/lib-prod/converter/sql-converter.js.map +1 -0
  99. package/lib-prod/converter/type-converter.d.ts +4 -0
  100. package/lib-prod/converter/type-converter.js +11 -4
  101. package/lib-prod/converter/type-converter.js.map +1 -0
  102. package/lib-prod/converter/types.d.ts +5 -0
  103. package/lib-prod/converter/types.js +3 -1
  104. package/lib-prod/converter/types.js.map +1 -0
  105. package/lib-prod/env/env.angular-node-app.d.ts +64 -0
  106. package/lib-prod/env/env.angular-node-app.js +69 -64
  107. package/lib-prod/env/env.angular-node-app.js.map +1 -0
  108. package/lib-prod/env/env.docs-webapp.d.ts +64 -0
  109. package/lib-prod/env/env.docs-webapp.js +69 -64
  110. package/lib-prod/env/env.docs-webapp.js.map +1 -0
  111. package/lib-prod/env/env.electron-app.d.ts +64 -0
  112. package/lib-prod/env/env.electron-app.js +69 -64
  113. package/lib-prod/env/env.electron-app.js.map +1 -0
  114. package/lib-prod/env/env.mobile-app.d.ts +64 -0
  115. package/lib-prod/env/env.mobile-app.js +69 -64
  116. package/lib-prod/env/env.mobile-app.js.map +1 -0
  117. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +64 -0
  118. package/lib-prod/env/env.npm-lib-and-cli-tool.js +69 -64
  119. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -0
  120. package/lib-prod/env/env.vscode-plugin.d.ts +64 -0
  121. package/lib-prod/env/env.vscode-plugin.js +69 -64
  122. package/lib-prod/env/env.vscode-plugin.js.map +1 -0
  123. package/lib-prod/env/index.d.ts +6 -0
  124. package/lib-prod/env/index.js +23 -6
  125. package/lib-prod/env/index.js.map +1 -0
  126. package/lib-prod/index._auto-generated_.d.ts +0 -0
  127. package/lib-prod/index._auto-generated_.js +2 -1
  128. package/lib-prod/index._auto-generated_.js.map +1 -0
  129. package/lib-prod/index.d.ts +25 -0
  130. package/lib-prod/index.js +46 -23
  131. package/lib-prod/index.js.map +1 -0
  132. package/lib-prod/migrations/index.d.ts +1 -0
  133. package/lib-prod/migrations/index.js +18 -1
  134. package/lib-prod/migrations/index.js.map +1 -0
  135. package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
  136. package/lib-prod/migrations/migrations_index._auto-generated_.js +1 -0
  137. package/lib-prod/migrations/migrations_index._auto-generated_.js.map +1 -0
  138. package/lib-prod/package.json +1 -1
  139. package/package.json +1 -1
  140. package/websql/package.json +1 -1
  141. package/websql-prod/package.json +1 -1
@@ -1,4 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  // TODO I had to copy-paste the method implementations to every child class to avoid circular dependencies
2
4
  class QueryCondition {
3
5
  }
4
- export default QueryCondition;
6
+ exports.default = QueryCondition;
7
+ //# sourceMappingURL=query-condition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-condition.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAGA,0GAA0G;AAE1G,MAAe,cAAc;CAK5B;AAED,kBAAe,cAAc,CAAC"}
@@ -0,0 +1,12 @@
1
+ import QueryColumn from "../column/query-column";
2
+ import QueryTable from "../query-table";
3
+ import QueryCondition from "./query-condition";
4
+ import QueryConditionChain from "./query-condition-chain";
5
+ export default class QueryJoinCondition<Table1 extends QueryTable<any, any>, Table2 extends QueryTable<any, any>, T> extends QueryCondition<Table1 | Table2> {
6
+ protected _column: QueryColumn<Table1, T>;
7
+ protected _type: string;
8
+ protected _otherColumn: QueryColumn<Table2, T>;
9
+ constructor(column: QueryColumn<Table1, T>, type: string, otherColumn: QueryColumn<Table2, T>);
10
+ and<Table3 extends QueryTable<any, any>>(condition: QueryCondition<Table3>): QueryConditionChain<Table1 | Table2 | Table3>;
11
+ or<Table3 extends QueryTable<any, any>>(condition: QueryCondition<Table3>): QueryConditionChain<Table1 | Table2 | Table3>;
12
+ }
@@ -1,6 +1,11 @@
1
- import QueryCondition from "./query-condition";
2
- import QueryConditionChain from "./query-condition-chain";
3
- export default class QueryJoinCondition extends QueryCondition {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const query_condition_1 = require("./query-condition");
4
+ const query_condition_chain_1 = require("./query-condition-chain");
5
+ class QueryJoinCondition extends query_condition_1.default {
6
+ _column;
7
+ _type;
8
+ _otherColumn;
4
9
  constructor(column, type, otherColumn) {
5
10
  super();
6
11
  this._column = column;
@@ -8,9 +13,11 @@ export default class QueryJoinCondition extends QueryCondition {
8
13
  this._otherColumn = otherColumn;
9
14
  }
10
15
  and(condition) {
11
- return new QueryConditionChain(this, condition, 'and');
16
+ return new query_condition_chain_1.default(this, condition, 'and');
12
17
  }
13
18
  or(condition) {
14
- return new QueryConditionChain(this, condition, 'or');
19
+ return new query_condition_chain_1.default(this, condition, 'or');
15
20
  }
16
21
  }
22
+ exports.default = QueryJoinCondition;
23
+ //# sourceMappingURL=query-join-condition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-join-condition.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAEA,uDAA+C;AAC/C,mEAA0D;AAG1D,MAAqB,kBAAgG,SAAQ,yBAA+B;IAE9I,OAAO,CAAyB;IAChC,KAAK,CAAS;IACd,YAAY,CAAyB;IAE/C,YAAY,MAA8B,EAAE,IAAY,EAAE,WAAmC;QACzF,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;IACpC,CAAC;IAED,GAAG,CAAsC,SAAiC;QACtE,OAAO,IAAI,+BAAmB,CAA2B,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACrF,CAAC;IAED,EAAE,CAAsC,SAAiC;QACrE,OAAO,IAAI,+BAAmB,CAA2B,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACpF,CAAC;CACJ;AApBD,qCAoBC"}
@@ -0,0 +1,2 @@
1
+ export default class GenericsHelper<T> {
2
+ }
@@ -1,3 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
1
3
  // TODO In TS generic parameters not used in the class are not enforced, so I have to add dummy fields that use them. Replace with nominal typing
2
- export default class GenericsHelper {
4
+ class GenericsHelper {
3
5
  }
6
+ exports.default = GenericsHelper;
7
+ //# sourceMappingURL=generics-helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generics-helper.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,iJAAiJ;AACjJ,MAAqB,cAAc;CAAM;AAAzC,iCAAyC"}
@@ -0,0 +1,15 @@
1
+ export type QueryAction = 'select' | 'insert' | 'update' | 'delete';
2
+ export type ColumnModifierType = 'as' | 'count' | 'min' | 'min' | 'max' | 'sum' | 'avg' | 'lower' | 'upper';
3
+ export interface ColumnModifier {
4
+ name: ColumnModifierType;
5
+ params?: any;
6
+ }
7
+ export type ColumnName = string | {
8
+ name: string;
9
+ alias: string;
10
+ };
11
+ export type ColumnType = 'boolean' | 'number' | 'string' | 'date';
12
+ export type ConditionChainType = 'or' | 'and';
13
+ export type ConditionType = 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte' | 'in' | 'not-in' | 'between' | 'not-between' | 'like' | 'not-like' | 'is-null' | 'is-not-null';
14
+ export type JoinType = 'inner' | 'left' | 'right' | 'full';
15
+ export type QueryProcessor = (query: any) => Promise<any>;
@@ -1 +1,4 @@
1
- export {};
1
+ "use strict";
2
+ // query:
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=internal-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"internal-types.js","sourceRoot":"","sources":[""],"names":[],"mappings":";AACA,SAAS"}
@@ -0,0 +1,11 @@
1
+ import QueryTable from "../query-table";
2
+ import QueryJoinCondition from "../condition/query-join-condition";
3
+ import JoinedTables from "./joined-tables";
4
+ import { JoinType } from "../helpers/internal-types";
5
+ export default class JoinedTablesChain<Tables extends QueryTable<any, any>> {
6
+ protected _table: QueryTable<any, any>;
7
+ protected _modifier: JoinType;
8
+ protected _parent: JoinedTables<Tables> | QueryTable<any, any>;
9
+ constructor(_table: QueryTable<any, any>, _modifier: JoinType, _parent: JoinedTables<Tables> | QueryTable<any, any>);
10
+ on(condition: QueryJoinCondition<Tables, Tables, any>): JoinedTables<Tables>;
11
+ }
@@ -1,11 +1,18 @@
1
- import JoinedTables from "./joined-tables";
2
- export default class JoinedTablesChain {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const joined_tables_1 = require("./joined-tables");
4
+ class JoinedTablesChain {
5
+ _table;
6
+ _modifier;
7
+ _parent;
3
8
  constructor(_table, _modifier, _parent) {
4
9
  this._table = _table;
5
10
  this._modifier = _modifier;
6
11
  this._parent = _parent;
7
12
  }
8
13
  on(condition) {
9
- return new JoinedTables(condition, this);
14
+ return new joined_tables_1.default(condition, this);
10
15
  }
11
16
  }
17
+ exports.default = JoinedTablesChain;
18
+ //# sourceMappingURL=joined-tables-chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joined-tables-chain.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAEA,mDAA2C;AAG3C,MAAqB,iBAAiB;IAGpB;IACA;IACA;IAHd,YACc,MAA4B,EAC5B,SAAmB,EACnB,OAAoD;QAFpD,WAAM,GAAN,MAAM,CAAsB;QAC5B,cAAS,GAAT,SAAS,CAAU;QACnB,YAAO,GAAP,OAAO,CAA6C;IAC/D,CAAC;IAEJ,EAAE,CAAC,SAAkD;QACjD,OAAO,IAAI,uBAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;CACJ;AAXD,oCAWC"}
@@ -0,0 +1,12 @@
1
+ import QueryTable from "../query-table";
2
+ import JoinedTablesChain from "./joined-tables-chain";
3
+ import QueryJoinCondition from "../condition/query-join-condition";
4
+ export default class JoinedTables<Tables extends QueryTable<any, any>> {
5
+ protected _condition: QueryJoinCondition<Tables, Tables, any>;
6
+ protected _parent: JoinedTablesChain<Tables>;
7
+ constructor(_condition: QueryJoinCondition<Tables, Tables, any>, _parent: JoinedTablesChain<Tables>);
8
+ innerJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<Tables | JoinTable>;
9
+ leftJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<Tables | JoinTable>;
10
+ rightJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<Tables | JoinTable>;
11
+ fullJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<Tables | JoinTable>;
12
+ }
@@ -1,19 +1,25 @@
1
- import JoinedTablesChain from "./joined-tables-chain";
2
- export default class JoinedTables {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const joined_tables_chain_1 = require("./joined-tables-chain");
4
+ class JoinedTables {
5
+ _condition;
6
+ _parent;
3
7
  constructor(_condition, _parent) {
4
8
  this._condition = _condition;
5
9
  this._parent = _parent;
6
10
  }
7
11
  innerJoin(table) {
8
- return new JoinedTablesChain(table, 'inner', this);
12
+ return new joined_tables_chain_1.default(table, 'inner', this);
9
13
  }
10
14
  leftJoin(table) {
11
- return new JoinedTablesChain(table, 'left', this);
15
+ return new joined_tables_chain_1.default(table, 'left', this);
12
16
  }
13
17
  rightJoin(table) {
14
- return new JoinedTablesChain(table, 'right', this);
18
+ return new joined_tables_chain_1.default(table, 'right', this);
15
19
  }
16
20
  fullJoin(table) {
17
- return new JoinedTablesChain(table, 'full', this);
21
+ return new joined_tables_chain_1.default(table, 'full', this);
18
22
  }
19
23
  }
24
+ exports.default = JoinedTables;
25
+ //# sourceMappingURL=joined-tables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joined-tables.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,+DAAsD;AAItD,MAAqB,YAAY;IAGf;IACA;IAFd,YACc,UAAmD,EACnD,OAAkC;QADlC,eAAU,GAAV,UAAU,CAAyC;QACnD,YAAO,GAAP,OAAO,CAA2B;IAC7C,CAAC;IAEJ,SAAS,CAAyC,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,QAAQ,CAAyC,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,SAAS,CAAyC,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,QAAQ,CAAyC,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CACJ;AAtBD,+BAsBC"}
@@ -0,0 +1,10 @@
1
+ import QueryColumn from "../column/query-column";
2
+ import QueryTable from "../query-table";
3
+ export default class QueryOrdering<Table extends QueryTable<any, any>> {
4
+ protected _column: QueryColumn<Table, any>;
5
+ protected _direction: 'ASC' | 'DESC';
6
+ protected _nullsPosition: 'FIRST' | 'LAST';
7
+ constructor(column: QueryColumn<Table, any>, direction: 'ASC' | 'DESC');
8
+ nullsFirst(): this;
9
+ nullsLast(): this;
10
+ }
@@ -1,4 +1,9 @@
1
- export default class QueryOrdering {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class QueryOrdering {
4
+ _column;
5
+ _direction;
6
+ _nullsPosition;
2
7
  constructor(column, direction) {
3
8
  this._column = column;
4
9
  this._direction = direction;
@@ -12,3 +17,5 @@ export default class QueryOrdering {
12
17
  return this;
13
18
  }
14
19
  }
20
+ exports.default = QueryOrdering;
21
+ //# sourceMappingURL=query-ordering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-ordering.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAIA,MAAqB,aAAa;IAEpB,OAAO,CAA0B;IACjC,UAAU,CAAiB;IAC3B,cAAc,CAAmB;IAE3C,YAAY,MAA+B,EAAE,SAAyB;QAClE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAED,UAAU;QACN,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,SAAS;QACL,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;CAEJ;AArBD,gCAqBC"}
@@ -0,0 +1,29 @@
1
+ import QueryCondition from "../condition/query-condition";
2
+ import QueryOrdering from "../other/query-ordering";
3
+ import QueryTable from "../query-table";
4
+ import QueryColumn from "../column/query-column";
5
+ import { QueryProcessor, QueryAction } from "../helpers/internal-types";
6
+ export default class SelectQuery<Entity, Table extends QueryTable<Entity, any>> {
7
+ protected _queryProcessor: QueryProcessor;
8
+ protected _tables: Table[];
9
+ constructor(_queryProcessor: QueryProcessor, _tables: Table[]);
10
+ protected _distinct: boolean;
11
+ protected _offset: number;
12
+ protected _limit: number;
13
+ protected _conditions: QueryCondition<Table>[];
14
+ protected _groupBy: QueryColumn<Table, any>[];
15
+ protected _having: QueryCondition<Table>[];
16
+ protected _orderings: (QueryColumn<Table, any> | QueryOrdering<Table>)[];
17
+ protected _columns: QueryColumn<Table, any>[];
18
+ protected _action: QueryAction;
19
+ offset(offset: number): this;
20
+ limit(limit: number): this;
21
+ distinct(): this;
22
+ where(...conditions: QueryCondition<Table>[]): this;
23
+ groupBy(...columns: QueryColumn<Table, any>[]): this;
24
+ having(...conditions: QueryCondition<Table>[]): this;
25
+ orderBy(...orderings: (QueryColumn<Table, any> | QueryOrdering<Table>)[]): this;
26
+ select(): Promise<Entity[]>;
27
+ select<T>(column: QueryColumn<Table, T>): Promise<T[]>;
28
+ select(...columns: QueryColumn<Table, any>[]): Promise<any[]>;
29
+ }
@@ -1,14 +1,21 @@
1
- export default class SelectQuery {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class SelectQuery {
4
+ _queryProcessor;
5
+ _tables;
2
6
  constructor(_queryProcessor, _tables) {
3
7
  this._queryProcessor = _queryProcessor;
4
8
  this._tables = _tables;
5
- this._distinct = false;
6
- this._conditions = [];
7
- this._groupBy = [];
8
- this._having = [];
9
- this._orderings = [];
10
- this._columns = [];
11
9
  }
10
+ _distinct = false;
11
+ _offset;
12
+ _limit;
13
+ _conditions = [];
14
+ _groupBy = [];
15
+ _having = [];
16
+ _orderings = [];
17
+ _columns = [];
18
+ _action;
12
19
  offset(offset) {
13
20
  this._offset = offset;
14
21
  return this;
@@ -43,3 +50,5 @@ export default class SelectQuery {
43
50
  return this._queryProcessor(this);
44
51
  }
45
52
  }
53
+ exports.default = SelectQuery;
54
+ //# sourceMappingURL=select-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAOA,MAAqB,WAAW;IAGd;IACA;IAFd,YACc,eAA+B,EAC/B,OAAgB;QADhB,oBAAe,GAAf,eAAe,CAAgB;QAC/B,YAAO,GAAP,OAAO,CAAS;IAC3B,CAAC;IAEM,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,CAAS;IAChB,MAAM,CAAS;IACf,WAAW,GAA4B,EAAE,CAAC;IAC1C,QAAQ,GAA8B,EAAE,CAAC;IACzC,OAAO,GAA4B,EAAE,CAAC;IACtC,UAAU,GAAuD,EAAE,CAAC;IACpE,QAAQ,GAA8B,EAAE,CAAC;IACzC,OAAO,CAAc;IAE/B,MAAM,CAAC,MAAc;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,KAAa;QACf,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,QAAQ;QACJ,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,CAAC,GAAG,UAAmC;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,GAAG,OAAkC;QACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,GAAG,UAAmC;QACzC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CAAC,GAAG,SAA6D;QACpE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAKD,MAAM,CAAC,GAAG,OAAkC;QACxC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;CACJ;AA5DD,8BA4DC"}
@@ -0,0 +1,16 @@
1
+ import QueryTable from "../query-table";
2
+ import QueryCondition from "../condition/query-condition";
3
+ import QueryColumn from "../column/query-column";
4
+ import { QueryProcessor, QueryAction } from "../helpers/internal-types";
5
+ export default class TableConditionQuery<Entity, Table extends QueryTable<Entity, any>> {
6
+ protected _queryProcessor: QueryProcessor;
7
+ protected _table: Table;
8
+ protected _conditions: QueryCondition<Table>[];
9
+ constructor(_queryProcessor: QueryProcessor, _table: Table, _conditions: QueryCondition<Table>[]);
10
+ protected _columns: QueryColumn<Table, any>[];
11
+ protected _action: QueryAction;
12
+ protected _entity: Entity | Partial<Entity>;
13
+ update(entity: Partial<Entity>): Promise<number>;
14
+ delete(): Promise<number>;
15
+ count(): Promise<number>;
16
+ }
@@ -1,10 +1,17 @@
1
- export default class TableConditionQuery {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class TableConditionQuery {
4
+ _queryProcessor;
5
+ _table;
6
+ _conditions;
2
7
  constructor(_queryProcessor, _table, _conditions) {
3
8
  this._queryProcessor = _queryProcessor;
4
9
  this._table = _table;
5
10
  this._conditions = _conditions;
6
- this._columns = [];
7
11
  }
12
+ _columns = [];
13
+ _action;
14
+ _entity;
8
15
  update(entity) {
9
16
  this._entity = entity;
10
17
  this._action = 'update';
@@ -20,3 +27,5 @@ export default class TableConditionQuery {
20
27
  return this._queryProcessor(this).then((rows) => rows[0]);
21
28
  }
22
29
  }
30
+ exports.default = TableConditionQuery;
31
+ //# sourceMappingURL=table-condition-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-condition-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAMA,MAAqB,mBAAmB;IAGtB;IACA;IACA;IAHd,YACc,eAA+B,EAC/B,MAAa,EACb,WAAoC;QAFpC,oBAAe,GAAf,eAAe,CAAgB;QAC/B,WAAM,GAAN,MAAM,CAAO;QACb,gBAAW,GAAX,WAAW,CAAyB;IAC/C,CAAC;IAEM,QAAQ,GAA8B,EAAE,CAAC;IACzC,OAAO,CAAc;IACrB,OAAO,CAA2B;IAE5C,MAAM,CAAC,MAAuB;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,MAAM;QACF,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,KAAK;QACD,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACxE,CAAC;CACJ;AA5BD,sCA4BC"}
@@ -0,0 +1,23 @@
1
+ import QueryTable from "../query-table";
2
+ import TableConditionQuery from "./table-condition-query";
3
+ import QueryCondition from "../condition/query-condition";
4
+ import QueryColumn from "../column/query-column";
5
+ import { QueryProcessor, QueryAction } from "../helpers/internal-types";
6
+ export default class TableQuery<Entity, Id, Table extends QueryTable<Entity, Id>> {
7
+ protected _queryProcessor: QueryProcessor;
8
+ protected _table: Table;
9
+ constructor(_queryProcessor: QueryProcessor, _table: Table);
10
+ protected _entity: Entity | Entity[] | Partial<Entity>;
11
+ protected _action: QueryAction;
12
+ protected _columns: QueryColumn<Table, any>[];
13
+ where(...conditions: QueryCondition<Table>[]): TableConditionQuery<Entity, Table>;
14
+ insert(entity: Entity): Promise<any>;
15
+ insert(entities: Entity[]): Promise<void>;
16
+ deleteAll(): Promise<number>;
17
+ updateAll(entity: Partial<Entity>): Promise<number>;
18
+ countAll(): Promise<number>;
19
+ delete(id: Id): Promise<boolean>;
20
+ update(id: Id, entity: Partial<Entity>): Promise<boolean>;
21
+ get(id: Id): Promise<Entity | undefined>;
22
+ _whereId(id: Id): TableConditionQuery<Entity, Table>;
23
+ }
@@ -1,13 +1,19 @@
1
- import TableConditionQuery from "./table-condition-query";
2
- import ValueColumn from "../column/value-column";
3
- export default class TableQuery {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const table_condition_query_1 = require("./table-condition-query");
4
+ const value_column_1 = require("../column/value-column");
5
+ class TableQuery {
6
+ _queryProcessor;
7
+ _table;
4
8
  constructor(_queryProcessor, _table) {
5
9
  this._queryProcessor = _queryProcessor;
6
10
  this._table = _table;
7
- this._columns = [];
8
11
  }
12
+ _entity;
13
+ _action;
14
+ _columns = [];
9
15
  where(...conditions) {
10
- return new TableConditionQuery(this._queryProcessor, this._table, conditions);
16
+ return new table_condition_query_1.default(this._queryProcessor, this._table, conditions);
11
17
  }
12
18
  insert(param) {
13
19
  this._entity = param;
@@ -42,7 +48,7 @@ export default class TableQuery {
42
48
  _whereId(id) {
43
49
  // TODO remove assertions if $id typing is fixed
44
50
  let $id = this._table.$id;
45
- if ($id instanceof ValueColumn) {
51
+ if ($id instanceof value_column_1.default) {
46
52
  return this.where($id.eq(id));
47
53
  }
48
54
  else {
@@ -50,3 +56,5 @@ export default class TableQuery {
50
56
  }
51
57
  }
52
58
  }
59
+ exports.default = TableQuery;
60
+ //# sourceMappingURL=table-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,mEAA0D;AAE1D,yDAAiD;AAKjD,MAAqB,UAAU;IAGb;IACA;IAFd,YACc,eAA+B,EAC/B,MAAa;QADb,oBAAe,GAAf,eAAe,CAAgB;QAC/B,WAAM,GAAN,MAAM,CAAO;IACxB,CAAC;IAEM,OAAO,CAAsC;IAC7C,OAAO,CAAc;IACrB,QAAQ,GAA8B,EAAE,CAAC;IAEnD,KAAK,CAAC,GAAG,UAAmC;QACxC,OAAO,IAAI,+BAAmB,CAAgB,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjG,CAAC;IAID,MAAM,CAAC,KAAU;QACb,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,SAAS;QACL,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,SAAS,CAAC,MAAuB;QAC7B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,QAAQ;QACJ,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,MAAM,CAAC,EAAM;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,CAAC,EAAM,EAAE,MAAuB;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,GAAG,CAAC,EAAM;QACN,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,CAAC;aACvD,IAAI,CAAC,CAAC,IAAc,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC;IAED,QAAQ,CAAC,EAAM;QACX,gDAAgD;QAChD,IAAI,GAAG,GAAI,IAAI,CAAC,MAAc,CAAC,GAAG,CAAC;QACnC,IAAI,GAAG,YAAY,sBAAW,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;aAAM,CAAC;YACJ,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAG,IAAI,CAAC,MAAc,CAAC,GAAG,CAA6B,CAAC,EAAE,CAAE,EAAU,CAAC,GAAG,CAAQ,CAAC,CAAC,CAAC,CAAC;QAC1I,CAAC;IACL,CAAC;CACJ;AA/DD,6BA+DC"}
@@ -0,0 +1,14 @@
1
+ import QueryTable from './query-table';
2
+ import SelectQuery from './query/select-query';
3
+ import { QueryProcessor } from "./helpers/internal-types";
4
+ import JoinedTables from "./join/joined-tables";
5
+ import TableQuery from "./query/table-query";
6
+ export default class QuerySource {
7
+ protected _queryProcessor: QueryProcessor;
8
+ constructor(_queryProcessor: QueryProcessor);
9
+ from<Entity, Table1 extends QueryTable<Entity, any>>(table1: Table1 & QueryTable<Entity, any>): SelectQuery<Entity, Table1>;
10
+ from<Tables extends QueryTable<any, any>>(tables: JoinedTables<Tables>): SelectQuery<any, Tables>;
11
+ from<Table1 extends QueryTable<any, any>, Table2 extends QueryTable<any, any>>(table1: Table1, table2: Table2): SelectQuery<any, Table1 | Table2>;
12
+ from<Table1 extends QueryTable<any, any>, Table2 extends QueryTable<any, any>, Table3 extends QueryTable<any, any>>(table1: Table1, table2: Table2, table3: Table3): SelectQuery<any, Table1 | Table2 | Table3>;
13
+ table<Entity, Id, Table extends QueryTable<Entity, Id>>(table: Table & QueryTable<Entity, Id>): TableQuery<Entity, Id, Table>;
14
+ }
@@ -1,17 +1,22 @@
1
- import SelectQuery from './query/select-query';
2
- import TableQuery from "./query/table-query";
3
- export default class QuerySource {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const select_query_1 = require("./query/select-query");
4
+ const table_query_1 = require("./query/table-query");
5
+ class QuerySource {
6
+ _queryProcessor;
4
7
  constructor(_queryProcessor) {
5
8
  this._queryProcessor = _queryProcessor;
6
9
  }
7
10
  from(table1, table2, table3) {
8
11
  if (table3 != null)
9
- return new SelectQuery(this._queryProcessor, [table1, table2, table3]);
12
+ return new select_query_1.default(this._queryProcessor, [table1, table2, table3]);
10
13
  else if (table2 != null)
11
- return new SelectQuery(this._queryProcessor, [table1, table2]);
12
- return new SelectQuery(this._queryProcessor, [table1]);
14
+ return new select_query_1.default(this._queryProcessor, [table1, table2]);
15
+ return new select_query_1.default(this._queryProcessor, [table1]);
13
16
  }
14
17
  table(table) {
15
- return new TableQuery(this._queryProcessor, table);
18
+ return new table_query_1.default(this._queryProcessor, table);
16
19
  }
17
20
  }
21
+ exports.default = QuerySource;
22
+ //# sourceMappingURL=query-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-source.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,uDAA+C;AAG/C,qDAA6C;AAG7C,MAAqB,WAAW;IAEN;IAAtB,YAAsB,eAA+B;QAA/B,oBAAe,GAAf,eAAe,CAAgB;IAAG,CAAC;IAMzD,IAAI,CAAwH,MAAW,EAAE,MAAY,EAAE,MAAY;QAC/J,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,IAAI,sBAAW,CAAgC,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;aACrH,IAAI,MAAM,IAAI,IAAI;YAAE,OAAO,IAAI,sBAAW,CAAuB,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAC9G,OAAO,IAAI,sBAAW,CAAiB,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,CAAmD,KAAqC;QACzF,OAAO,IAAI,qBAAU,CAAoB,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;CACJ;AAjBD,8BAiBC"}
@@ -0,0 +1,15 @@
1
+ import BasicColumn from "./column/basic-column";
2
+ import GenericsHelper from "./helpers/generics-helper";
3
+ import JoinedTablesChain from "./join/joined-tables-chain";
4
+ declare abstract class QueryTable<Entity, Id> {
5
+ protected _$name: string;
6
+ constructor(_$name: string);
7
+ protected _$type: GenericsHelper<Entity>;
8
+ protected _$idType: GenericsHelper<Id>;
9
+ $all: BasicColumn<this, Entity>;
10
+ innerJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<this | JoinTable>;
11
+ leftJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<this | JoinTable>;
12
+ rightJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<this | JoinTable>;
13
+ fullJoin<JoinTable extends QueryTable<any, any>>(table: JoinTable): JoinedTablesChain<this | JoinTable>;
14
+ }
15
+ export default QueryTable;
@@ -1,22 +1,28 @@
1
- import BasicColumn from "./column/basic-column";
2
- import JoinedTablesChain from "./join/joined-tables-chain";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const basic_column_1 = require("./column/basic-column");
4
+ const joined_tables_chain_1 = require("./join/joined-tables-chain");
3
5
  class QueryTable {
6
+ _$name;
4
7
  constructor(_$name) {
5
8
  this._$name = _$name;
6
- // abstract readonly $id; // FIXME I got a dozen incomprehensible type errors
7
- this.$all = new BasicColumn(this, '*');
8
9
  }
10
+ _$type;
11
+ _$idType;
12
+ // abstract readonly $id; // FIXME I got a dozen incomprehensible type errors
13
+ $all = new basic_column_1.default(this, '*');
9
14
  innerJoin(table) {
10
- return new JoinedTablesChain(table, 'inner', this);
15
+ return new joined_tables_chain_1.default(table, 'inner', this);
11
16
  }
12
17
  leftJoin(table) {
13
- return new JoinedTablesChain(table, 'left', this);
18
+ return new joined_tables_chain_1.default(table, 'left', this);
14
19
  }
15
20
  rightJoin(table) {
16
- return new JoinedTablesChain(table, 'right', this);
21
+ return new joined_tables_chain_1.default(table, 'right', this);
17
22
  }
18
23
  fullJoin(table) {
19
- return new JoinedTablesChain(table, 'full', this);
24
+ return new joined_tables_chain_1.default(table, 'full', this);
20
25
  }
21
26
  }
22
- export default QueryTable;
27
+ exports.default = QueryTable;
28
+ //# sourceMappingURL=query-table.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-table.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,wDAAgD;AAEhD,oEAA2D;AAG3D,MAAe,UAAU;IAEC;IAAtB,YAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE9B,MAAM,CAAyB;IAC/B,QAAQ,CAAqB;IAEvC,6EAA6E;IAE7E,IAAI,GAAG,IAAI,sBAAW,CAAe,IAAI,EAAE,GAAG,CAAC,CAAC;IAEhD,SAAS,CAAyC,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,QAAQ,CAAyC,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED,SAAS,CAAyC,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,QAAQ,CAAyC,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;CACJ;AAED,kBAAe,UAAU,CAAC"}
@@ -0,0 +1,5 @@
1
+ import QuerySource from "../builder/query-source";
2
+ import { QueryProcessorOptions } from "./query-processor";
3
+ export default class MySqlQuerySource extends QuerySource {
4
+ constructor(client: any, options?: QueryProcessorOptions);
5
+ }
@@ -1,7 +1,11 @@
1
- import QuerySource from "../builder/query-source";
2
- import { createQueryProcessor } from "./query-processor";
3
- export default class MySqlQuerySource extends QuerySource {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const query_source_1 = require("../builder/query-source");
4
+ const query_processor_1 = require("./query-processor");
5
+ class MySqlQuerySource extends query_source_1.default {
4
6
  constructor(client, options = {}) {
5
- super(createQueryProcessor(client, options, 'mysql'));
7
+ super((0, query_processor_1.createQueryProcessor)(client, options, 'mysql'));
6
8
  }
7
9
  }
10
+ exports.default = MySqlQuerySource;
11
+ //# sourceMappingURL=mysql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mysql.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,0DAAkD;AAClD,uDAA8E;AAE9E,MAAqB,gBAAiB,SAAQ,sBAAW;IAErD,YAAY,MAAW,EAAE,UAAiC,EAAE;QACxD,KAAK,CAAC,IAAA,sCAAoB,EAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1D,CAAC;CACJ;AALD,mCAKC"}
@@ -0,0 +1,5 @@
1
+ import QuerySource from "../builder/query-source";
2
+ import { QueryProcessorOptions } from "./query-processor";
3
+ export default class PgQuerySource extends QuerySource {
4
+ constructor(client: any, options?: QueryProcessorOptions);
5
+ }
@@ -1,7 +1,11 @@
1
- import QuerySource from "../builder/query-source";
2
- import { createQueryProcessor } from "./query-processor";
3
- export default class PgQuerySource extends QuerySource {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const query_source_1 = require("../builder/query-source");
4
+ const query_processor_1 = require("./query-processor");
5
+ class PgQuerySource extends query_source_1.default {
4
6
  constructor(client, options = {}) {
5
- super(createQueryProcessor(client, options, 'pg'));
7
+ super((0, query_processor_1.createQueryProcessor)(client, options, 'pg'));
6
8
  }
7
9
  }
10
+ exports.default = PgQuerySource;
11
+ //# sourceMappingURL=pg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,0DAAkD;AAClD,uDAA8E;AAE9E,MAAqB,aAAc,SAAQ,sBAAW;IAElD,YAAY,MAAW,EAAE,UAAiC,EAAE;QACxD,KAAK,CAAC,IAAA,sCAAoB,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;CACJ;AALD,gCAKC"}
@@ -0,0 +1,10 @@
1
+ import { QueryEngine } from '../converter/types';
2
+ import { QueryProcessor } from '../builder/helpers/internal-types';
3
+ export interface QueryProcessorOptions {
4
+ lineBreaks?: boolean;
5
+ parameterized?: boolean;
6
+ logging?: boolean;
7
+ logger?: (sql: string, params?: any[]) => void;
8
+ identifierQuote?: string;
9
+ }
10
+ export declare function createQueryProcessor(client: any, _options?: QueryProcessorOptions, engine?: QueryEngine): QueryProcessor;