taon-type-sql 21.0.21 → 21.0.23

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_.js +14 -30
  7. package/lib-prod/builder/column/basic-column.js +12 -14
  8. package/lib-prod/builder/column/boolean-column.js +13 -14
  9. package/lib-prod/builder/column/comparable-column.js +41 -41
  10. package/lib-prod/builder/column/date-column.js +13 -14
  11. package/lib-prod/builder/column/number-column.js +18 -19
  12. package/lib-prod/builder/column/query-column.js +22 -24
  13. package/lib-prod/builder/column/string-column.js +35 -36
  14. package/lib-prod/builder/column/value-column.js +27 -28
  15. package/lib-prod/builder/condition/query-column-condition.js +21 -22
  16. package/lib-prod/builder/condition/query-condition-chain.js +32 -33
  17. package/lib-prod/builder/condition/query-condition.js +4 -5
  18. package/lib-prod/builder/condition/query-join-condition.js +21 -22
  19. package/lib-prod/builder/helpers/generics-helper.js +3 -5
  20. package/lib-prod/builder/helpers/internal-types.js +0 -4
  21. package/lib-prod/builder/join/joined-tables-chain.js +12 -16
  22. package/lib-prod/builder/join/joined-tables.js +20 -23
  23. package/lib-prod/builder/other/query-ordering.js +18 -19
  24. package/lib-prod/builder/query/select-query.js +49 -52
  25. package/lib-prod/builder/query/table-condition-query.js +25 -29
  26. package/lib-prod/builder/query/table-query.js +52 -58
  27. package/lib-prod/builder/query-source.js +16 -20
  28. package/lib-prod/builder/query-table.js +25 -26
  29. package/lib-prod/client/mysql.js +9 -10
  30. package/lib-prod/client/pg.js +9 -10
  31. package/lib-prod/client/query-processor.js +39 -68
  32. package/lib-prod/converter/param-converter.js +19 -27
  33. package/lib-prod/converter/parameterized-converter.js +13 -14
  34. package/lib-prod/converter/query-converter.js +243 -259
  35. package/lib-prod/converter/result-converter.js +61 -73
  36. package/lib-prod/converter/sql-converter.js +6 -7
  37. package/lib-prod/converter/type-converter.js +24 -35
  38. package/lib-prod/converter/types.js +0 -3
  39. package/lib-prod/env/env.angular-node-app.js +130 -71
  40. package/lib-prod/env/env.docs-webapp.js +130 -71
  41. package/lib-prod/env/env.electron-app.js +130 -71
  42. package/lib-prod/env/env.mobile-app.js +130 -71
  43. package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -71
  44. package/lib-prod/env/env.vscode-plugin.js +130 -71
  45. package/lib-prod/env/index.js +6 -23
  46. package/lib-prod/index._auto-generated_.js +0 -6
  47. package/lib-prod/index.js +46 -48
  48. package/lib-prod/migrations/index.js +1 -19
  49. package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -4
  50. package/lib-prod/package.json +1 -1
  51. package/package.json +1 -1
  52. package/websql/package.json +1 -1
  53. package/websql-prod/package.json +1 -1
  54. package/lib-prod/build-info._auto-generated_.d.ts +0 -24
  55. package/lib-prod/build-info._auto-generated_.js.map +0 -1
  56. package/lib-prod/builder/column/basic-column.d.ts +0 -8
  57. package/lib-prod/builder/column/basic-column.js.map +0 -1
  58. package/lib-prod/builder/column/boolean-column.d.ts +0 -9
  59. package/lib-prod/builder/column/boolean-column.js.map +0 -1
  60. package/lib-prod/builder/column/comparable-column.d.ts +0 -18
  61. package/lib-prod/builder/column/comparable-column.js.map +0 -1
  62. package/lib-prod/builder/column/date-column.d.ts +0 -9
  63. package/lib-prod/builder/column/date-column.js.map +0 -1
  64. package/lib-prod/builder/column/number-column.d.ts +0 -10
  65. package/lib-prod/builder/column/number-column.js.map +0 -1
  66. package/lib-prod/builder/column/query-column.d.ts +0 -18
  67. package/lib-prod/builder/column/query-column.js.map +0 -1
  68. package/lib-prod/builder/column/string-column.d.ts +0 -17
  69. package/lib-prod/builder/column/string-column.js.map +0 -1
  70. package/lib-prod/builder/column/value-column.d.ts +0 -15
  71. package/lib-prod/builder/column/value-column.js.map +0 -1
  72. package/lib-prod/builder/condition/query-column-condition.d.ts +0 -13
  73. package/lib-prod/builder/condition/query-column-condition.js.map +0 -1
  74. package/lib-prod/builder/condition/query-condition-chain.d.ts +0 -17
  75. package/lib-prod/builder/condition/query-condition-chain.js.map +0 -1
  76. package/lib-prod/builder/condition/query-condition.d.ts +0 -7
  77. package/lib-prod/builder/condition/query-condition.js.map +0 -1
  78. package/lib-prod/builder/condition/query-join-condition.d.ts +0 -12
  79. package/lib-prod/builder/condition/query-join-condition.js.map +0 -1
  80. package/lib-prod/builder/helpers/generics-helper.d.ts +0 -2
  81. package/lib-prod/builder/helpers/generics-helper.js.map +0 -1
  82. package/lib-prod/builder/helpers/internal-types.d.ts +0 -15
  83. package/lib-prod/builder/helpers/internal-types.js.map +0 -1
  84. package/lib-prod/builder/join/joined-tables-chain.d.ts +0 -11
  85. package/lib-prod/builder/join/joined-tables-chain.js.map +0 -1
  86. package/lib-prod/builder/join/joined-tables.d.ts +0 -12
  87. package/lib-prod/builder/join/joined-tables.js.map +0 -1
  88. package/lib-prod/builder/other/query-ordering.d.ts +0 -10
  89. package/lib-prod/builder/other/query-ordering.js.map +0 -1
  90. package/lib-prod/builder/query/select-query.d.ts +0 -29
  91. package/lib-prod/builder/query/select-query.js.map +0 -1
  92. package/lib-prod/builder/query/table-condition-query.d.ts +0 -16
  93. package/lib-prod/builder/query/table-condition-query.js.map +0 -1
  94. package/lib-prod/builder/query/table-query.d.ts +0 -23
  95. package/lib-prod/builder/query/table-query.js.map +0 -1
  96. package/lib-prod/builder/query-source.d.ts +0 -14
  97. package/lib-prod/builder/query-source.js.map +0 -1
  98. package/lib-prod/builder/query-table.d.ts +0 -15
  99. package/lib-prod/builder/query-table.js.map +0 -1
  100. package/lib-prod/client/mysql.d.ts +0 -5
  101. package/lib-prod/client/mysql.js.map +0 -1
  102. package/lib-prod/client/pg.d.ts +0 -5
  103. package/lib-prod/client/pg.js.map +0 -1
  104. package/lib-prod/client/query-processor.d.ts +0 -10
  105. package/lib-prod/client/query-processor.js.map +0 -1
  106. package/lib-prod/converter/param-converter.d.ts +0 -2
  107. package/lib-prod/converter/param-converter.js.map +0 -1
  108. package/lib-prod/converter/parameterized-converter.d.ts +0 -5
  109. package/lib-prod/converter/parameterized-converter.js.map +0 -1
  110. package/lib-prod/converter/query-converter.d.ts +0 -2
  111. package/lib-prod/converter/query-converter.js.map +0 -1
  112. package/lib-prod/converter/result-converter.d.ts +0 -2
  113. package/lib-prod/converter/result-converter.js.map +0 -1
  114. package/lib-prod/converter/sql-converter.d.ts +0 -2
  115. package/lib-prod/converter/sql-converter.js.map +0 -1
  116. package/lib-prod/converter/type-converter.d.ts +0 -4
  117. package/lib-prod/converter/type-converter.js.map +0 -1
  118. package/lib-prod/converter/types.d.ts +0 -5
  119. package/lib-prod/converter/types.js.map +0 -1
  120. package/lib-prod/env/env.angular-node-app.d.ts +0 -64
  121. package/lib-prod/env/env.angular-node-app.js.map +0 -1
  122. package/lib-prod/env/env.docs-webapp.d.ts +0 -64
  123. package/lib-prod/env/env.docs-webapp.js.map +0 -1
  124. package/lib-prod/env/env.electron-app.d.ts +0 -64
  125. package/lib-prod/env/env.electron-app.js.map +0 -1
  126. package/lib-prod/env/env.mobile-app.d.ts +0 -64
  127. package/lib-prod/env/env.mobile-app.js.map +0 -1
  128. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +0 -64
  129. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +0 -1
  130. package/lib-prod/env/env.vscode-plugin.d.ts +0 -64
  131. package/lib-prod/env/env.vscode-plugin.js.map +0 -1
  132. package/lib-prod/env/index.d.ts +0 -6
  133. package/lib-prod/env/index.js.map +0 -1
  134. package/lib-prod/index._auto-generated_.d.ts +0 -0
  135. package/lib-prod/index._auto-generated_.js.map +0 -1
  136. package/lib-prod/index.d.ts +0 -25
  137. package/lib-prod/index.js.map +0 -1
  138. package/lib-prod/migrations/index.d.ts +0 -1
  139. package/lib-prod/migrations/index.js.map +0 -1
  140. package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
  141. package/lib-prod/migrations/migrations_index._auto-generated_.js.map +0 -1
@@ -1,23 +1,22 @@
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;
9
- constructor(column, type, otherColumn) {
10
- super();
11
- this._column = column;
12
- this._type = type;
13
- this._otherColumn = otherColumn;
14
- }
15
- and(condition) {
16
- return new query_condition_chain_1.default(this, condition, 'and');
17
- }
18
- or(condition) {
19
- return new query_condition_chain_1.default(this, condition, 'or');
20
- }
1
+ import QueryCondition from "./query-condition";
2
+ import QueryConditionChain from "./query-condition-chain";
3
+ class QueryJoinCondition extends QueryCondition {
4
+ _column;
5
+ _type;
6
+ _otherColumn;
7
+ constructor(column, type, otherColumn) {
8
+ super();
9
+ this._column = column;
10
+ this._type = type;
11
+ this._otherColumn = otherColumn;
12
+ }
13
+ and(condition) {
14
+ return new QueryConditionChain(this, condition, "and");
15
+ }
16
+ or(condition) {
17
+ return new QueryConditionChain(this, condition, "or");
18
+ }
21
19
  }
22
- exports.default = QueryJoinCondition;
23
- //# sourceMappingURL=query-join-condition.js.map
20
+ export {
21
+ QueryJoinCondition as default
22
+ };
@@ -1,7 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
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
4
1
  class GenericsHelper {
5
2
  }
6
- exports.default = GenericsHelper;
7
- //# sourceMappingURL=generics-helper.js.map
3
+ export {
4
+ GenericsHelper as default
5
+ };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // query:
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- //# sourceMappingURL=internal-types.js.map
@@ -1,18 +1,14 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const joined_tables_1 = require("./joined-tables");
1
+ import JoinedTables from "./joined-tables";
4
2
  class JoinedTablesChain {
5
- _table;
6
- _modifier;
7
- _parent;
8
- constructor(_table, _modifier, _parent) {
9
- this._table = _table;
10
- this._modifier = _modifier;
11
- this._parent = _parent;
12
- }
13
- on(condition) {
14
- return new joined_tables_1.default(condition, this);
15
- }
3
+ constructor(_table, _modifier, _parent) {
4
+ this._table = _table;
5
+ this._modifier = _modifier;
6
+ this._parent = _parent;
7
+ }
8
+ on(condition) {
9
+ return new JoinedTables(condition, this);
10
+ }
16
11
  }
17
- exports.default = JoinedTablesChain;
18
- //# sourceMappingURL=joined-tables-chain.js.map
12
+ export {
13
+ JoinedTablesChain as default
14
+ };
@@ -1,25 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const joined_tables_chain_1 = require("./joined-tables-chain");
1
+ import JoinedTablesChain from "./joined-tables-chain";
4
2
  class JoinedTables {
5
- _condition;
6
- _parent;
7
- constructor(_condition, _parent) {
8
- this._condition = _condition;
9
- this._parent = _parent;
10
- }
11
- innerJoin(table) {
12
- return new joined_tables_chain_1.default(table, 'inner', this);
13
- }
14
- leftJoin(table) {
15
- return new joined_tables_chain_1.default(table, 'left', this);
16
- }
17
- rightJoin(table) {
18
- return new joined_tables_chain_1.default(table, 'right', this);
19
- }
20
- fullJoin(table) {
21
- return new joined_tables_chain_1.default(table, 'full', this);
22
- }
3
+ constructor(_condition, _parent) {
4
+ this._condition = _condition;
5
+ this._parent = _parent;
6
+ }
7
+ innerJoin(table) {
8
+ return new JoinedTablesChain(table, "inner", this);
9
+ }
10
+ leftJoin(table) {
11
+ return new JoinedTablesChain(table, "left", this);
12
+ }
13
+ rightJoin(table) {
14
+ return new JoinedTablesChain(table, "right", this);
15
+ }
16
+ fullJoin(table) {
17
+ return new JoinedTablesChain(table, "full", this);
18
+ }
23
19
  }
24
- exports.default = JoinedTables;
25
- //# sourceMappingURL=joined-tables.js.map
20
+ export {
21
+ JoinedTables as default
22
+ };
@@ -1,21 +1,20 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  class QueryOrdering {
4
- _column;
5
- _direction;
6
- _nullsPosition;
7
- constructor(column, direction) {
8
- this._column = column;
9
- this._direction = direction;
10
- }
11
- nullsFirst() {
12
- this._nullsPosition = 'FIRST';
13
- return this;
14
- }
15
- nullsLast() {
16
- this._nullsPosition = 'LAST';
17
- return this;
18
- }
2
+ _column;
3
+ _direction;
4
+ _nullsPosition;
5
+ constructor(column, direction) {
6
+ this._column = column;
7
+ this._direction = direction;
8
+ }
9
+ nullsFirst() {
10
+ this._nullsPosition = "FIRST";
11
+ return this;
12
+ }
13
+ nullsLast() {
14
+ this._nullsPosition = "LAST";
15
+ return this;
16
+ }
19
17
  }
20
- exports.default = QueryOrdering;
21
- //# sourceMappingURL=query-ordering.js.map
18
+ export {
19
+ QueryOrdering as default
20
+ };
@@ -1,54 +1,51 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  class SelectQuery {
4
- _queryProcessor;
5
- _tables;
6
- constructor(_queryProcessor, _tables) {
7
- this._queryProcessor = _queryProcessor;
8
- this._tables = _tables;
9
- }
10
- _distinct = false;
11
- _offset;
12
- _limit;
13
- _conditions = [];
14
- _groupBy = [];
15
- _having = [];
16
- _orderings = [];
17
- _columns = [];
18
- _action;
19
- offset(offset) {
20
- this._offset = offset;
21
- return this;
22
- }
23
- limit(limit) {
24
- this._limit = limit;
25
- return this;
26
- }
27
- distinct() {
28
- this._distinct = true;
29
- return this;
30
- }
31
- where(...conditions) {
32
- this._conditions = conditions;
33
- return this;
34
- }
35
- groupBy(...columns) {
36
- this._groupBy = columns;
37
- return this;
38
- }
39
- having(...conditions) {
40
- this._having = conditions;
41
- return this;
42
- }
43
- orderBy(...orderings) {
44
- this._orderings = orderings;
45
- return this;
46
- }
47
- select(...columns) {
48
- this._columns = columns;
49
- this._action = 'select';
50
- return this._queryProcessor(this);
51
- }
2
+ constructor(_queryProcessor, _tables) {
3
+ this._queryProcessor = _queryProcessor;
4
+ this._tables = _tables;
5
+ }
6
+ _distinct = false;
7
+ _offset;
8
+ _limit;
9
+ _conditions = [];
10
+ _groupBy = [];
11
+ _having = [];
12
+ _orderings = [];
13
+ _columns = [];
14
+ _action;
15
+ offset(offset) {
16
+ this._offset = offset;
17
+ return this;
18
+ }
19
+ limit(limit) {
20
+ this._limit = limit;
21
+ return this;
22
+ }
23
+ distinct() {
24
+ this._distinct = true;
25
+ return this;
26
+ }
27
+ where(...conditions) {
28
+ this._conditions = conditions;
29
+ return this;
30
+ }
31
+ groupBy(...columns) {
32
+ this._groupBy = columns;
33
+ return this;
34
+ }
35
+ having(...conditions) {
36
+ this._having = conditions;
37
+ return this;
38
+ }
39
+ orderBy(...orderings) {
40
+ this._orderings = orderings;
41
+ return this;
42
+ }
43
+ select(...columns) {
44
+ this._columns = columns;
45
+ this._action = "select";
46
+ return this._queryProcessor(this);
47
+ }
52
48
  }
53
- exports.default = SelectQuery;
54
- //# sourceMappingURL=select-query.js.map
49
+ export {
50
+ SelectQuery as default
51
+ };
@@ -1,31 +1,27 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  class TableConditionQuery {
4
- _queryProcessor;
5
- _table;
6
- _conditions;
7
- constructor(_queryProcessor, _table, _conditions) {
8
- this._queryProcessor = _queryProcessor;
9
- this._table = _table;
10
- this._conditions = _conditions;
11
- }
12
- _columns = [];
13
- _action;
14
- _entity;
15
- update(entity) {
16
- this._entity = entity;
17
- this._action = 'update';
18
- return this._queryProcessor(this);
19
- }
20
- delete() {
21
- this._action = 'delete';
22
- return this._queryProcessor(this);
23
- }
24
- count() {
25
- this._columns = [this._table.$all.count()];
26
- this._action = 'select';
27
- return this._queryProcessor(this).then((rows) => rows[0]);
28
- }
2
+ constructor(_queryProcessor, _table, _conditions) {
3
+ this._queryProcessor = _queryProcessor;
4
+ this._table = _table;
5
+ this._conditions = _conditions;
6
+ }
7
+ _columns = [];
8
+ _action;
9
+ _entity;
10
+ update(entity) {
11
+ this._entity = entity;
12
+ this._action = "update";
13
+ return this._queryProcessor(this);
14
+ }
15
+ delete() {
16
+ this._action = "delete";
17
+ return this._queryProcessor(this);
18
+ }
19
+ count() {
20
+ this._columns = [this._table.$all.count()];
21
+ this._action = "select";
22
+ return this._queryProcessor(this).then((rows) => rows[0]);
23
+ }
29
24
  }
30
- exports.default = TableConditionQuery;
31
- //# sourceMappingURL=table-condition-query.js.map
25
+ export {
26
+ TableConditionQuery as default
27
+ };
@@ -1,60 +1,54 @@
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");
1
+ import TableConditionQuery from "./table-condition-query";
2
+ import ValueColumn from "../column/value-column";
5
3
  class TableQuery {
6
- _queryProcessor;
7
- _table;
8
- constructor(_queryProcessor, _table) {
9
- this._queryProcessor = _queryProcessor;
10
- this._table = _table;
11
- }
12
- _entity;
13
- _action;
14
- _columns = [];
15
- where(...conditions) {
16
- return new table_condition_query_1.default(this._queryProcessor, this._table, conditions);
17
- }
18
- insert(param) {
19
- this._entity = param;
20
- this._action = 'insert';
21
- return this._queryProcessor(this);
22
- }
23
- deleteAll() {
24
- this._action = 'delete';
25
- return this._queryProcessor(this);
26
- }
27
- updateAll(entity) {
28
- this._entity = entity;
29
- this._action = 'update';
30
- return this._queryProcessor(this);
31
- }
32
- countAll() {
33
- this._columns = [this._table.$all.count()];
34
- this._action = 'select';
35
- return this._queryProcessor(this).then((rows) => rows[0]);
36
- }
37
- delete(id) {
38
- return this._whereId(id).delete().then(count => count > 0);
39
- }
40
- update(id, entity) {
41
- return this._whereId(id).update(entity).then(count => count > 0);
42
- }
43
- get(id) {
44
- let query = this._whereId(id);
45
- return this._queryProcessor({ _action: 'select', ...query })
46
- .then((rows) => rows[0]);
47
- }
48
- _whereId(id) {
49
- // TODO remove assertions if $id typing is fixed
50
- let $id = this._table.$id;
51
- if ($id instanceof value_column_1.default) {
52
- return this.where($id.eq(id));
53
- }
54
- else {
55
- return this.where(...Object.keys($id).map(key => this._table[key].eq(id[key])));
56
- }
57
- }
4
+ constructor(_queryProcessor, _table) {
5
+ this._queryProcessor = _queryProcessor;
6
+ this._table = _table;
7
+ }
8
+ _entity;
9
+ _action;
10
+ _columns = [];
11
+ where(...conditions) {
12
+ return new TableConditionQuery(this._queryProcessor, this._table, conditions);
13
+ }
14
+ insert(param) {
15
+ this._entity = param;
16
+ this._action = "insert";
17
+ return this._queryProcessor(this);
18
+ }
19
+ deleteAll() {
20
+ this._action = "delete";
21
+ return this._queryProcessor(this);
22
+ }
23
+ updateAll(entity) {
24
+ this._entity = entity;
25
+ this._action = "update";
26
+ return this._queryProcessor(this);
27
+ }
28
+ countAll() {
29
+ this._columns = [this._table.$all.count()];
30
+ this._action = "select";
31
+ return this._queryProcessor(this).then((rows) => rows[0]);
32
+ }
33
+ delete(id) {
34
+ return this._whereId(id).delete().then((count) => count > 0);
35
+ }
36
+ update(id, entity) {
37
+ return this._whereId(id).update(entity).then((count) => count > 0);
38
+ }
39
+ get(id) {
40
+ let query = this._whereId(id);
41
+ return this._queryProcessor({ _action: "select", ...query }).then((rows) => rows[0]);
42
+ }
43
+ _whereId(id) {
44
+ let $id = this._table.$id;
45
+ if ($id instanceof ValueColumn) {
46
+ return this.where($id.eq(id));
47
+ } else {
48
+ return this.where(...Object.keys($id).map((key) => this._table[key].eq(id[key])));
49
+ }
50
+ }
58
51
  }
59
- exports.default = TableQuery;
60
- //# sourceMappingURL=table-query.js.map
52
+ export {
53
+ TableQuery as default
54
+ };
@@ -1,22 +1,18 @@
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");
1
+ import SelectQuery from "./query/select-query";
2
+ import TableQuery from "./query/table-query";
5
3
  class QuerySource {
6
- _queryProcessor;
7
- constructor(_queryProcessor) {
8
- this._queryProcessor = _queryProcessor;
9
- }
10
- from(table1, table2, table3) {
11
- if (table3 != null)
12
- return new select_query_1.default(this._queryProcessor, [table1, table2, table3]);
13
- else if (table2 != null)
14
- return new select_query_1.default(this._queryProcessor, [table1, table2]);
15
- return new select_query_1.default(this._queryProcessor, [table1]);
16
- }
17
- table(table) {
18
- return new table_query_1.default(this._queryProcessor, table);
19
- }
4
+ constructor(_queryProcessor) {
5
+ this._queryProcessor = _queryProcessor;
6
+ }
7
+ from(table1, table2, table3) {
8
+ if (table3 != null) return new SelectQuery(this._queryProcessor, [table1, table2, table3]);
9
+ else if (table2 != null) return new SelectQuery(this._queryProcessor, [table1, table2]);
10
+ return new SelectQuery(this._queryProcessor, [table1]);
11
+ }
12
+ table(table) {
13
+ return new TableQuery(this._queryProcessor, table);
14
+ }
20
15
  }
21
- exports.default = QuerySource;
22
- //# sourceMappingURL=query-source.js.map
16
+ export {
17
+ QuerySource as default
18
+ };
@@ -1,28 +1,27 @@
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");
1
+ import BasicColumn from "./column/basic-column";
2
+ import JoinedTablesChain from "./join/joined-tables-chain";
5
3
  class QueryTable {
6
- _$name;
7
- constructor(_$name) {
8
- this._$name = _$name;
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, '*');
14
- innerJoin(table) {
15
- return new joined_tables_chain_1.default(table, 'inner', this);
16
- }
17
- leftJoin(table) {
18
- return new joined_tables_chain_1.default(table, 'left', this);
19
- }
20
- rightJoin(table) {
21
- return new joined_tables_chain_1.default(table, 'right', this);
22
- }
23
- fullJoin(table) {
24
- return new joined_tables_chain_1.default(table, 'full', this);
25
- }
4
+ constructor(_$name) {
5
+ this._$name = _$name;
6
+ }
7
+ _$type;
8
+ _$idType;
9
+ // abstract readonly $id; // FIXME I got a dozen incomprehensible type errors
10
+ $all = new BasicColumn(this, "*");
11
+ innerJoin(table) {
12
+ return new JoinedTablesChain(table, "inner", this);
13
+ }
14
+ leftJoin(table) {
15
+ return new JoinedTablesChain(table, "left", this);
16
+ }
17
+ rightJoin(table) {
18
+ return new JoinedTablesChain(table, "right", this);
19
+ }
20
+ fullJoin(table) {
21
+ return new JoinedTablesChain(table, "full", this);
22
+ }
26
23
  }
27
- exports.default = QueryTable;
28
- //# sourceMappingURL=query-table.js.map
24
+ var query_table_default = QueryTable;
25
+ export {
26
+ query_table_default as default
27
+ };
@@ -1,11 +1,10 @@
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 {
6
- constructor(client, options = {}) {
7
- super((0, query_processor_1.createQueryProcessor)(client, options, 'mysql'));
8
- }
1
+ import QuerySource from "../builder/query-source";
2
+ import { createQueryProcessor } from "./query-processor";
3
+ class MySqlQuerySource extends QuerySource {
4
+ constructor(client, options = {}) {
5
+ super(createQueryProcessor(client, options, "mysql"));
6
+ }
9
7
  }
10
- exports.default = MySqlQuerySource;
11
- //# sourceMappingURL=mysql.js.map
8
+ export {
9
+ MySqlQuerySource as default
10
+ };
@@ -1,11 +1,10 @@
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 {
6
- constructor(client, options = {}) {
7
- super((0, query_processor_1.createQueryProcessor)(client, options, 'pg'));
8
- }
1
+ import QuerySource from "../builder/query-source";
2
+ import { createQueryProcessor } from "./query-processor";
3
+ class PgQuerySource extends QuerySource {
4
+ constructor(client, options = {}) {
5
+ super(createQueryProcessor(client, options, "pg"));
6
+ }
9
7
  }
10
- exports.default = PgQuerySource;
11
- //# sourceMappingURL=pg.js.map
8
+ export {
9
+ PgQuerySource as default
10
+ };