taon-type-sql 18.0.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/assets/shared/shared_folder_info.txt +7 -0
- package/browser/README.md +24 -0
- package/browser/esm2022/lib/builder/column/basic-column.mjs +13 -0
- package/browser/esm2022/lib/builder/column/boolean-column.mjs +14 -0
- package/browser/esm2022/lib/builder/column/comparable-column.mjs +41 -0
- package/browser/esm2022/lib/builder/column/date-column.mjs +14 -0
- package/browser/esm2022/lib/builder/column/number-column.mjs +19 -0
- package/browser/esm2022/lib/builder/column/query-column.mjs +21 -0
- package/browser/esm2022/lib/builder/column/string-column.mjs +36 -0
- package/browser/esm2022/lib/builder/column/value-column.mjs +30 -0
- package/browser/esm2022/lib/builder/condition/query-column-condition.mjs +19 -0
- package/browser/esm2022/lib/builder/condition/query-condition-chain.mjs +28 -0
- package/browser/esm2022/lib/builder/condition/query-condition.mjs +6 -0
- package/browser/esm2022/lib/builder/condition/query-join-condition.mjs +19 -0
- package/browser/esm2022/lib/builder/helpers/generics-helper.mjs +5 -0
- package/browser/esm2022/lib/builder/helpers/internal-types.mjs +4 -0
- package/browser/esm2022/lib/builder/join/joined-tables-chain.mjs +14 -0
- package/browser/esm2022/lib/builder/join/joined-tables.mjs +22 -0
- package/browser/esm2022/lib/builder/other/query-ordering.mjs +17 -0
- package/browser/esm2022/lib/builder/query/select-query.mjs +48 -0
- package/browser/esm2022/lib/builder/query/table-condition-query.mjs +25 -0
- package/browser/esm2022/lib/builder/query/table-query.mjs +54 -0
- package/browser/esm2022/lib/builder/query-source.mjs +20 -0
- package/browser/esm2022/lib/builder/query-table.mjs +24 -0
- package/browser/esm2022/lib/client/mysql.mjs +10 -0
- package/browser/esm2022/lib/client/query-processor.mjs +45 -0
- package/browser/esm2022/lib/converter/param-converter.mjs +27 -0
- package/browser/esm2022/lib/converter/parameterized-converter.mjs +17 -0
- package/browser/esm2022/lib/converter/query-converter.mjs +282 -0
- package/browser/esm2022/lib/converter/result-converter.mjs +88 -0
- package/browser/esm2022/lib/converter/sql-converter.mjs +8 -0
- package/browser/esm2022/lib/converter/type-converter.mjs +39 -0
- package/browser/esm2022/lib/converter/types.mjs +4 -0
- package/browser/esm2022/lib/index.mjs +23 -0
- package/browser/esm2022/public-api.mjs +2 -0
- package/browser/esm2022/taon-type-sql.mjs +5 -0
- package/browser/fesm2022/taon-type-sql.mjs +877 -0
- package/browser/fesm2022/taon-type-sql.mjs.map +1 -0
- package/browser/index.d.ts +6 -0
- package/browser/lib/builder/column/basic-column.d.ts +9 -0
- package/browser/lib/builder/column/boolean-column.d.ts +10 -0
- package/browser/lib/builder/column/comparable-column.d.ts +19 -0
- package/browser/lib/builder/column/date-column.d.ts +10 -0
- package/browser/lib/builder/column/number-column.d.ts +11 -0
- package/browser/lib/builder/column/query-column.d.ts +19 -0
- package/browser/lib/builder/column/string-column.d.ts +18 -0
- package/browser/lib/builder/column/value-column.d.ts +16 -0
- package/browser/lib/builder/condition/query-column-condition.d.ts +14 -0
- package/browser/lib/builder/condition/query-condition-chain.d.ts +18 -0
- package/browser/lib/builder/condition/query-condition.d.ts +8 -0
- package/browser/lib/builder/condition/query-join-condition.d.ts +13 -0
- package/browser/lib/builder/helpers/generics-helper.d.ts +3 -0
- package/browser/lib/builder/helpers/internal-types.d.ts +16 -0
- package/browser/lib/builder/join/joined-tables-chain.d.ts +12 -0
- package/browser/lib/builder/join/joined-tables.d.ts +13 -0
- package/browser/lib/builder/other/query-ordering.d.ts +11 -0
- package/browser/lib/builder/query/select-query.d.ts +30 -0
- package/browser/lib/builder/query/table-condition-query.d.ts +17 -0
- package/browser/lib/builder/query/table-query.d.ts +24 -0
- package/browser/lib/builder/query-source.d.ts +15 -0
- package/browser/lib/builder/query-table.d.ts +16 -0
- package/browser/lib/client/mysql.d.ts +6 -0
- package/browser/lib/client/query-processor.d.ts +11 -0
- package/browser/lib/converter/param-converter.d.ts +3 -0
- package/browser/lib/converter/parameterized-converter.d.ts +6 -0
- package/browser/lib/converter/query-converter.d.ts +3 -0
- package/browser/lib/converter/result-converter.d.ts +3 -0
- package/browser/lib/converter/sql-converter.d.ts +3 -0
- package/browser/lib/converter/type-converter.d.ts +5 -0
- package/browser/lib/converter/types.d.ts +6 -0
- package/browser/lib/index.d.ts +26 -0
- package/browser/package.json +25 -0
- package/browser/public-api.d.ts +2 -0
- package/client/README.md +24 -0
- package/client/esm2022/lib/builder/column/basic-column.mjs +13 -0
- package/client/esm2022/lib/builder/column/boolean-column.mjs +14 -0
- package/client/esm2022/lib/builder/column/comparable-column.mjs +41 -0
- package/client/esm2022/lib/builder/column/date-column.mjs +14 -0
- package/client/esm2022/lib/builder/column/number-column.mjs +19 -0
- package/client/esm2022/lib/builder/column/query-column.mjs +21 -0
- package/client/esm2022/lib/builder/column/string-column.mjs +36 -0
- package/client/esm2022/lib/builder/column/value-column.mjs +30 -0
- package/client/esm2022/lib/builder/condition/query-column-condition.mjs +19 -0
- package/client/esm2022/lib/builder/condition/query-condition-chain.mjs +28 -0
- package/client/esm2022/lib/builder/condition/query-condition.mjs +6 -0
- package/client/esm2022/lib/builder/condition/query-join-condition.mjs +19 -0
- package/client/esm2022/lib/builder/helpers/generics-helper.mjs +5 -0
- package/client/esm2022/lib/builder/helpers/internal-types.mjs +4 -0
- package/client/esm2022/lib/builder/join/joined-tables-chain.mjs +14 -0
- package/client/esm2022/lib/builder/join/joined-tables.mjs +22 -0
- package/client/esm2022/lib/builder/other/query-ordering.mjs +17 -0
- package/client/esm2022/lib/builder/query/select-query.mjs +48 -0
- package/client/esm2022/lib/builder/query/table-condition-query.mjs +25 -0
- package/client/esm2022/lib/builder/query/table-query.mjs +54 -0
- package/client/esm2022/lib/builder/query-source.mjs +20 -0
- package/client/esm2022/lib/builder/query-table.mjs +24 -0
- package/client/esm2022/lib/client/mysql.mjs +10 -0
- package/client/esm2022/lib/client/query-processor.mjs +45 -0
- package/client/esm2022/lib/converter/param-converter.mjs +27 -0
- package/client/esm2022/lib/converter/parameterized-converter.mjs +17 -0
- package/client/esm2022/lib/converter/query-converter.mjs +282 -0
- package/client/esm2022/lib/converter/result-converter.mjs +88 -0
- package/client/esm2022/lib/converter/sql-converter.mjs +8 -0
- package/client/esm2022/lib/converter/type-converter.mjs +39 -0
- package/client/esm2022/lib/converter/types.mjs +4 -0
- package/client/esm2022/lib/index.mjs +23 -0
- package/client/esm2022/public-api.mjs +2 -0
- package/client/esm2022/taon-type-sql.mjs +5 -0
- package/client/fesm2022/taon-type-sql.mjs +877 -0
- package/client/fesm2022/taon-type-sql.mjs.map +1 -0
- package/client/index.d.ts +6 -0
- package/client/lib/builder/column/basic-column.d.ts +9 -0
- package/client/lib/builder/column/boolean-column.d.ts +10 -0
- package/client/lib/builder/column/comparable-column.d.ts +19 -0
- package/client/lib/builder/column/date-column.d.ts +10 -0
- package/client/lib/builder/column/number-column.d.ts +11 -0
- package/client/lib/builder/column/query-column.d.ts +19 -0
- package/client/lib/builder/column/string-column.d.ts +18 -0
- package/client/lib/builder/column/value-column.d.ts +16 -0
- package/client/lib/builder/condition/query-column-condition.d.ts +14 -0
- package/client/lib/builder/condition/query-condition-chain.d.ts +18 -0
- package/client/lib/builder/condition/query-condition.d.ts +8 -0
- package/client/lib/builder/condition/query-join-condition.d.ts +13 -0
- package/client/lib/builder/helpers/generics-helper.d.ts +3 -0
- package/client/lib/builder/helpers/internal-types.d.ts +16 -0
- package/client/lib/builder/join/joined-tables-chain.d.ts +12 -0
- package/client/lib/builder/join/joined-tables.d.ts +13 -0
- package/client/lib/builder/other/query-ordering.d.ts +11 -0
- package/client/lib/builder/query/select-query.d.ts +30 -0
- package/client/lib/builder/query/table-condition-query.d.ts +17 -0
- package/client/lib/builder/query/table-query.d.ts +24 -0
- package/client/lib/builder/query-source.d.ts +15 -0
- package/client/lib/builder/query-table.d.ts +16 -0
- package/client/lib/client/mysql.d.ts +6 -0
- package/client/lib/client/query-processor.d.ts +11 -0
- package/client/lib/converter/param-converter.d.ts +3 -0
- package/client/lib/converter/parameterized-converter.d.ts +6 -0
- package/client/lib/converter/query-converter.d.ts +3 -0
- package/client/lib/converter/result-converter.d.ts +3 -0
- package/client/lib/converter/sql-converter.d.ts +3 -0
- package/client/lib/converter/type-converter.d.ts +5 -0
- package/client/lib/converter/types.d.ts +6 -0
- package/client/lib/index.d.ts +26 -0
- package/client/public-api.d.ts +2 -0
- package/index.d.ts +1 -0
- package/index.js +7 -0
- package/index.js.map +1 -0
- package/lib/build-info._auto-generated_.d.ts +1 -0
- package/lib/build-info._auto-generated_.js +5 -0
- package/lib/build-info._auto-generated_.js.map +1 -0
- package/lib/builder/column/basic-column.d.ts +8 -0
- package/lib/builder/column/basic-column.js +19 -0
- package/lib/builder/column/basic-column.js.map +1 -0
- package/lib/builder/column/boolean-column.d.ts +9 -0
- package/lib/builder/column/boolean-column.js +20 -0
- package/lib/builder/column/boolean-column.js.map +1 -0
- package/lib/builder/column/comparable-column.d.ts +18 -0
- package/lib/builder/column/comparable-column.js +46 -0
- package/lib/builder/column/comparable-column.js.map +1 -0
- package/lib/builder/column/date-column.d.ts +9 -0
- package/lib/builder/column/date-column.js +20 -0
- package/lib/builder/column/date-column.js.map +1 -0
- package/lib/builder/column/number-column.d.ts +10 -0
- package/lib/builder/column/number-column.js +25 -0
- package/lib/builder/column/number-column.js.map +1 -0
- package/lib/builder/column/query-column.d.ts +18 -0
- package/lib/builder/column/query-column.js +23 -0
- package/lib/builder/column/query-column.js.map +1 -0
- package/lib/builder/column/string-column.d.ts +17 -0
- package/lib/builder/column/string-column.js +42 -0
- package/lib/builder/column/string-column.js.map +1 -0
- package/lib/builder/column/value-column.d.ts +15 -0
- package/lib/builder/column/value-column.js +34 -0
- package/lib/builder/column/value-column.js.map +1 -0
- package/lib/builder/condition/query-column-condition.d.ts +13 -0
- package/lib/builder/condition/query-column-condition.js +28 -0
- package/lib/builder/condition/query-column-condition.js.map +1 -0
- package/lib/builder/condition/query-condition-chain.d.ts +17 -0
- package/lib/builder/condition/query-condition-chain.js +34 -0
- package/lib/builder/condition/query-condition-chain.js.map +1 -0
- package/lib/builder/condition/query-condition.d.ts +7 -0
- package/lib/builder/condition/query-condition.js +10 -0
- package/lib/builder/condition/query-condition.js.map +1 -0
- package/lib/builder/condition/query-join-condition.d.ts +12 -0
- package/lib/builder/condition/query-join-condition.js +24 -0
- package/lib/builder/condition/query-join-condition.js.map +1 -0
- package/lib/builder/helpers/generics-helper.d.ts +2 -0
- package/lib/builder/helpers/generics-helper.js +10 -0
- package/lib/builder/helpers/generics-helper.js.map +1 -0
- package/lib/builder/helpers/internal-types.d.ts +15 -0
- package/lib/builder/helpers/internal-types.js +4 -0
- package/lib/builder/helpers/internal-types.js.map +1 -0
- package/lib/builder/join/joined-tables-chain.d.ts +11 -0
- package/lib/builder/join/joined-tables-chain.js +16 -0
- package/lib/builder/join/joined-tables-chain.js.map +1 -0
- package/lib/builder/join/joined-tables.d.ts +12 -0
- package/lib/builder/join/joined-tables.js +24 -0
- package/lib/builder/join/joined-tables.js.map +1 -0
- package/lib/builder/other/query-ordering.d.ts +10 -0
- package/lib/builder/other/query-ordering.js +19 -0
- package/lib/builder/other/query-ordering.js.map +1 -0
- package/lib/builder/query/select-query.d.ts +29 -0
- package/lib/builder/query/select-query.js +70 -0
- package/lib/builder/query/select-query.js.map +1 -0
- package/lib/builder/query/table-condition-query.d.ts +16 -0
- package/lib/builder/query/table-condition-query.js +27 -0
- package/lib/builder/query/table-condition-query.js.map +1 -0
- package/lib/builder/query/table-query.d.ts +23 -0
- package/lib/builder/query/table-query.js +63 -0
- package/lib/builder/query/table-query.js.map +1 -0
- package/lib/builder/query-source.d.ts +14 -0
- package/lib/builder/query-source.js +22 -0
- package/lib/builder/query-source.js.map +1 -0
- package/lib/builder/query-table.d.ts +15 -0
- package/lib/builder/query-table.js +26 -0
- package/lib/builder/query-table.js.map +1 -0
- package/lib/client/mysql.d.ts +5 -0
- package/lib/client/mysql.js +15 -0
- package/lib/client/mysql.js.map +1 -0
- package/lib/client/pg.d.ts +5 -0
- package/lib/client/pg.js +15 -0
- package/lib/client/pg.js.map +1 -0
- package/lib/client/query-processor.d.ts +10 -0
- package/lib/client/query-processor.js +75 -0
- package/lib/client/query-processor.js.map +1 -0
- package/lib/converter/param-converter.d.ts +2 -0
- package/lib/converter/param-converter.js +31 -0
- package/lib/converter/param-converter.js.map +1 -0
- package/lib/converter/parameterized-converter.d.ts +5 -0
- package/lib/converter/parameterized-converter.js +18 -0
- package/lib/converter/parameterized-converter.js.map +1 -0
- package/lib/converter/query-converter.d.ts +2 -0
- package/lib/converter/query-converter.js +286 -0
- package/lib/converter/query-converter.js.map +1 -0
- package/lib/converter/result-converter.d.ts +2 -0
- package/lib/converter/result-converter.js +89 -0
- package/lib/converter/result-converter.js.map +1 -0
- package/lib/converter/sql-converter.d.ts +2 -0
- package/lib/converter/sql-converter.js +9 -0
- package/lib/converter/sql-converter.js.map +1 -0
- package/lib/converter/type-converter.d.ts +4 -0
- package/lib/converter/type-converter.js +43 -0
- package/lib/converter/type-converter.js.map +1 -0
- package/lib/converter/types.d.ts +5 -0
- package/lib/converter/types.js +3 -0
- package/lib/converter/types.js.map +1 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +48 -0
- package/lib/index.js.map +1 -0
- package/package.json +38 -0
- package/src.d.ts +6 -0
- package/taon.jsonc +23 -0
- package/tmp-environment.json +359 -0
- package/websql/README.md +24 -0
- package/websql/esm2022/lib/builder/column/basic-column.mjs +13 -0
- package/websql/esm2022/lib/builder/column/boolean-column.mjs +14 -0
- package/websql/esm2022/lib/builder/column/comparable-column.mjs +41 -0
- package/websql/esm2022/lib/builder/column/date-column.mjs +14 -0
- package/websql/esm2022/lib/builder/column/number-column.mjs +19 -0
- package/websql/esm2022/lib/builder/column/query-column.mjs +21 -0
- package/websql/esm2022/lib/builder/column/string-column.mjs +36 -0
- package/websql/esm2022/lib/builder/column/value-column.mjs +30 -0
- package/websql/esm2022/lib/builder/condition/query-column-condition.mjs +19 -0
- package/websql/esm2022/lib/builder/condition/query-condition-chain.mjs +28 -0
- package/websql/esm2022/lib/builder/condition/query-condition.mjs +6 -0
- package/websql/esm2022/lib/builder/condition/query-join-condition.mjs +19 -0
- package/websql/esm2022/lib/builder/helpers/generics-helper.mjs +5 -0
- package/websql/esm2022/lib/builder/helpers/internal-types.mjs +4 -0
- package/websql/esm2022/lib/builder/join/joined-tables-chain.mjs +14 -0
- package/websql/esm2022/lib/builder/join/joined-tables.mjs +22 -0
- package/websql/esm2022/lib/builder/other/query-ordering.mjs +17 -0
- package/websql/esm2022/lib/builder/query/select-query.mjs +48 -0
- package/websql/esm2022/lib/builder/query/table-condition-query.mjs +25 -0
- package/websql/esm2022/lib/builder/query/table-query.mjs +54 -0
- package/websql/esm2022/lib/builder/query-source.mjs +20 -0
- package/websql/esm2022/lib/builder/query-table.mjs +24 -0
- package/websql/esm2022/lib/client/mysql.mjs +10 -0
- package/websql/esm2022/lib/client/query-processor.mjs +45 -0
- package/websql/esm2022/lib/converter/param-converter.mjs +27 -0
- package/websql/esm2022/lib/converter/parameterized-converter.mjs +17 -0
- package/websql/esm2022/lib/converter/query-converter.mjs +282 -0
- package/websql/esm2022/lib/converter/result-converter.mjs +88 -0
- package/websql/esm2022/lib/converter/sql-converter.mjs +8 -0
- package/websql/esm2022/lib/converter/type-converter.mjs +39 -0
- package/websql/esm2022/lib/converter/types.mjs +4 -0
- package/websql/esm2022/lib/index.mjs +23 -0
- package/websql/esm2022/public-api.mjs +2 -0
- package/websql/esm2022/taon-type-sql.mjs +5 -0
- package/websql/fesm2022/taon-type-sql.mjs +877 -0
- package/websql/fesm2022/taon-type-sql.mjs.map +1 -0
- package/websql/index.d.ts +6 -0
- package/websql/lib/builder/column/basic-column.d.ts +9 -0
- package/websql/lib/builder/column/boolean-column.d.ts +10 -0
- package/websql/lib/builder/column/comparable-column.d.ts +19 -0
- package/websql/lib/builder/column/date-column.d.ts +10 -0
- package/websql/lib/builder/column/number-column.d.ts +11 -0
- package/websql/lib/builder/column/query-column.d.ts +19 -0
- package/websql/lib/builder/column/string-column.d.ts +18 -0
- package/websql/lib/builder/column/value-column.d.ts +16 -0
- package/websql/lib/builder/condition/query-column-condition.d.ts +14 -0
- package/websql/lib/builder/condition/query-condition-chain.d.ts +18 -0
- package/websql/lib/builder/condition/query-condition.d.ts +8 -0
- package/websql/lib/builder/condition/query-join-condition.d.ts +13 -0
- package/websql/lib/builder/helpers/generics-helper.d.ts +3 -0
- package/websql/lib/builder/helpers/internal-types.d.ts +16 -0
- package/websql/lib/builder/join/joined-tables-chain.d.ts +12 -0
- package/websql/lib/builder/join/joined-tables.d.ts +13 -0
- package/websql/lib/builder/other/query-ordering.d.ts +11 -0
- package/websql/lib/builder/query/select-query.d.ts +30 -0
- package/websql/lib/builder/query/table-condition-query.d.ts +17 -0
- package/websql/lib/builder/query/table-query.d.ts +24 -0
- package/websql/lib/builder/query-source.d.ts +15 -0
- package/websql/lib/builder/query-table.d.ts +16 -0
- package/websql/lib/client/mysql.d.ts +6 -0
- package/websql/lib/client/query-processor.d.ts +11 -0
- package/websql/lib/converter/param-converter.d.ts +3 -0
- package/websql/lib/converter/parameterized-converter.d.ts +6 -0
- package/websql/lib/converter/query-converter.d.ts +3 -0
- package/websql/lib/converter/result-converter.d.ts +3 -0
- package/websql/lib/converter/sql-converter.d.ts +3 -0
- package/websql/lib/converter/type-converter.d.ts +5 -0
- package/websql/lib/converter/types.d.ts +6 -0
- package/websql/lib/index.d.ts +26 -0
- package/websql/package.json +25 -0
- package/websql/public-api.d.ts +2 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var query_condition_1 = require("./query-condition");
|
|
5
|
+
var query_condition_chain_1 = require("./query-condition-chain");
|
|
6
|
+
var QueryJoinCondition = /** @class */ (function (_super) {
|
|
7
|
+
tslib_1.__extends(QueryJoinCondition, _super);
|
|
8
|
+
function QueryJoinCondition(column, type, otherColumn) {
|
|
9
|
+
var _this = _super.call(this) || this;
|
|
10
|
+
_this._column = column;
|
|
11
|
+
_this._type = type;
|
|
12
|
+
_this._otherColumn = otherColumn;
|
|
13
|
+
return _this;
|
|
14
|
+
}
|
|
15
|
+
QueryJoinCondition.prototype.and = function (condition) {
|
|
16
|
+
return new query_condition_chain_1.default(this, condition, 'and');
|
|
17
|
+
};
|
|
18
|
+
QueryJoinCondition.prototype.or = function (condition) {
|
|
19
|
+
return new query_condition_chain_1.default(this, condition, 'or');
|
|
20
|
+
};
|
|
21
|
+
return QueryJoinCondition;
|
|
22
|
+
}(query_condition_1.default));
|
|
23
|
+
exports.default = QueryJoinCondition;
|
|
24
|
+
//# sourceMappingURL=query-join-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-join-condition.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAEA,qDAA+C;AAC/C,iEAA0D;AAG1D;IAA6H,8CAA+B;IAMxJ,4BAAY,MAA8B,EAAE,IAAY,EAAE,WAAmC;QACzF,YAAA,MAAK,WAAE,SAAC;QACR,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,KAAI,CAAC,YAAY,GAAG,WAAW,CAAC;;IACpC,CAAC;IAED,gCAAG,GAAH,UAAyC,SAAiC;QACtE,OAAO,IAAI,+BAAmB,CAA2B,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACrF,CAAC;IAED,+BAAE,GAAF,UAAwC,SAAiC;QACrE,OAAO,IAAI,+BAAmB,CAA2B,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IACpF,CAAC;IACL,yBAAC;AAAD,CAAC,AApBD,CAA6H,yBAAc,GAoB1I"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
var GenericsHelper = /** @class */ (function () {
|
|
5
|
+
function GenericsHelper() {
|
|
6
|
+
}
|
|
7
|
+
return GenericsHelper;
|
|
8
|
+
}());
|
|
9
|
+
exports.default = GenericsHelper;
|
|
10
|
+
//# sourceMappingURL=generics-helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generics-helper.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,iJAAiJ;AACjJ;IAAA;IAAwC,CAAC;IAAD,qBAAC;AAAD,CAAC,AAAzC,IAAyC"}
|
|
@@ -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>;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var joined_tables_1 = require("./joined-tables");
|
|
4
|
+
var JoinedTablesChain = /** @class */ (function () {
|
|
5
|
+
function JoinedTablesChain(_table, _modifier, _parent) {
|
|
6
|
+
this._table = _table;
|
|
7
|
+
this._modifier = _modifier;
|
|
8
|
+
this._parent = _parent;
|
|
9
|
+
}
|
|
10
|
+
JoinedTablesChain.prototype.on = function (condition) {
|
|
11
|
+
return new joined_tables_1.default(condition, this);
|
|
12
|
+
};
|
|
13
|
+
return JoinedTablesChain;
|
|
14
|
+
}());
|
|
15
|
+
exports.default = JoinedTablesChain;
|
|
16
|
+
//# sourceMappingURL=joined-tables-chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joined-tables-chain.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAEA,iDAA2C;AAG3C;IAEI,2BACc,MAA4B,EAC5B,SAAmB,EACnB,OAAoD;QAFpD,WAAM,GAAN,MAAM,CAAsB;QAC5B,cAAS,GAAT,SAAS,CAAU;QACnB,YAAO,GAAP,OAAO,CAA6C;IAC/D,CAAC;IAEJ,8BAAE,GAAF,UAAG,SAAkD;QACjD,OAAO,IAAI,uBAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IACL,wBAAC;AAAD,CAAC,AAXD,IAWC"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var joined_tables_chain_1 = require("./joined-tables-chain");
|
|
4
|
+
var JoinedTables = /** @class */ (function () {
|
|
5
|
+
function JoinedTables(_condition, _parent) {
|
|
6
|
+
this._condition = _condition;
|
|
7
|
+
this._parent = _parent;
|
|
8
|
+
}
|
|
9
|
+
JoinedTables.prototype.innerJoin = function (table) {
|
|
10
|
+
return new joined_tables_chain_1.default(table, 'inner', this);
|
|
11
|
+
};
|
|
12
|
+
JoinedTables.prototype.leftJoin = function (table) {
|
|
13
|
+
return new joined_tables_chain_1.default(table, 'left', this);
|
|
14
|
+
};
|
|
15
|
+
JoinedTables.prototype.rightJoin = function (table) {
|
|
16
|
+
return new joined_tables_chain_1.default(table, 'right', this);
|
|
17
|
+
};
|
|
18
|
+
JoinedTables.prototype.fullJoin = function (table) {
|
|
19
|
+
return new joined_tables_chain_1.default(table, 'full', this);
|
|
20
|
+
};
|
|
21
|
+
return JoinedTables;
|
|
22
|
+
}());
|
|
23
|
+
exports.default = JoinedTables;
|
|
24
|
+
//# sourceMappingURL=joined-tables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"joined-tables.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AACA,6DAAsD;AAItD;IAEI,sBACc,UAAmD,EACnD,OAAkC;QADlC,eAAU,GAAV,UAAU,CAAyC;QACnD,YAAO,GAAP,OAAO,CAA2B;IAC7C,CAAC;IAEJ,gCAAS,GAAT,UAAkD,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,+BAAQ,GAAR,UAAiD,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,gCAAS,GAAT,UAAkD,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,+BAAQ,GAAR,UAAiD,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;IACL,mBAAC;AAAD,CAAC,AAtBD,IAsBC"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var QueryOrdering = /** @class */ (function () {
|
|
4
|
+
function QueryOrdering(column, direction) {
|
|
5
|
+
this._column = column;
|
|
6
|
+
this._direction = direction;
|
|
7
|
+
}
|
|
8
|
+
QueryOrdering.prototype.nullsFirst = function () {
|
|
9
|
+
this._nullsPosition = 'FIRST';
|
|
10
|
+
return this;
|
|
11
|
+
};
|
|
12
|
+
QueryOrdering.prototype.nullsLast = function () {
|
|
13
|
+
this._nullsPosition = 'LAST';
|
|
14
|
+
return this;
|
|
15
|
+
};
|
|
16
|
+
return QueryOrdering;
|
|
17
|
+
}());
|
|
18
|
+
exports.default = QueryOrdering;
|
|
19
|
+
//# sourceMappingURL=query-ordering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-ordering.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAIA;IAMI,uBAAY,MAA+B,EAAE,SAAyB;QAClE,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAChC,CAAC;IAED,kCAAU,GAAV;QACI,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,iCAAS,GAAT;QACI,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC;IAChB,CAAC;IAEL,oBAAC;AAAD,CAAC,AArBD,IAqBC"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var SelectQuery = /** @class */ (function () {
|
|
4
|
+
function SelectQuery(_queryProcessor, _tables) {
|
|
5
|
+
this._queryProcessor = _queryProcessor;
|
|
6
|
+
this._tables = _tables;
|
|
7
|
+
this._distinct = false;
|
|
8
|
+
this._conditions = [];
|
|
9
|
+
this._groupBy = [];
|
|
10
|
+
this._having = [];
|
|
11
|
+
this._orderings = [];
|
|
12
|
+
this._columns = [];
|
|
13
|
+
}
|
|
14
|
+
SelectQuery.prototype.offset = function (offset) {
|
|
15
|
+
this._offset = offset;
|
|
16
|
+
return this;
|
|
17
|
+
};
|
|
18
|
+
SelectQuery.prototype.limit = function (limit) {
|
|
19
|
+
this._limit = limit;
|
|
20
|
+
return this;
|
|
21
|
+
};
|
|
22
|
+
SelectQuery.prototype.distinct = function () {
|
|
23
|
+
this._distinct = true;
|
|
24
|
+
return this;
|
|
25
|
+
};
|
|
26
|
+
SelectQuery.prototype.where = function () {
|
|
27
|
+
var conditions = [];
|
|
28
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
29
|
+
conditions[_i] = arguments[_i];
|
|
30
|
+
}
|
|
31
|
+
this._conditions = conditions;
|
|
32
|
+
return this;
|
|
33
|
+
};
|
|
34
|
+
SelectQuery.prototype.groupBy = function () {
|
|
35
|
+
var columns = [];
|
|
36
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
37
|
+
columns[_i] = arguments[_i];
|
|
38
|
+
}
|
|
39
|
+
this._groupBy = columns;
|
|
40
|
+
return this;
|
|
41
|
+
};
|
|
42
|
+
SelectQuery.prototype.having = function () {
|
|
43
|
+
var conditions = [];
|
|
44
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
45
|
+
conditions[_i] = arguments[_i];
|
|
46
|
+
}
|
|
47
|
+
this._having = conditions;
|
|
48
|
+
return this;
|
|
49
|
+
};
|
|
50
|
+
SelectQuery.prototype.orderBy = function () {
|
|
51
|
+
var orderings = [];
|
|
52
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
53
|
+
orderings[_i] = arguments[_i];
|
|
54
|
+
}
|
|
55
|
+
this._orderings = orderings;
|
|
56
|
+
return this;
|
|
57
|
+
};
|
|
58
|
+
SelectQuery.prototype.select = function () {
|
|
59
|
+
var columns = [];
|
|
60
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
61
|
+
columns[_i] = arguments[_i];
|
|
62
|
+
}
|
|
63
|
+
this._columns = columns;
|
|
64
|
+
this._action = 'select';
|
|
65
|
+
return this._queryProcessor(this);
|
|
66
|
+
};
|
|
67
|
+
return SelectQuery;
|
|
68
|
+
}());
|
|
69
|
+
exports.default = SelectQuery;
|
|
70
|
+
//# sourceMappingURL=select-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAOA;IAEI,qBACc,eAA+B,EAC/B,OAAgB;QADhB,oBAAe,GAAf,eAAe,CAAgB;QAC/B,YAAO,GAAP,OAAO,CAAS;QAGpB,cAAS,GAAG,KAAK,CAAC;QAGlB,gBAAW,GAA4B,EAAE,CAAC;QAC1C,aAAQ,GAA8B,EAAE,CAAC;QACzC,YAAO,GAA4B,EAAE,CAAC;QACtC,eAAU,GAAuD,EAAE,CAAC;QACpE,aAAQ,GAA8B,EAAE,CAAC;IAThD,CAAC;IAYJ,4BAAM,GAAN,UAAO,MAAc;QACjB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,2BAAK,GAAL,UAAM,KAAa;QACf,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,8BAAQ,GAAR;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,2BAAK,GAAL;QAAM,oBAAsC;aAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;YAAtC,+BAAsC;;QACxC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,6BAAO,GAAP;QAAQ,iBAAqC;aAArC,UAAqC,EAArC,qBAAqC,EAArC,IAAqC;YAArC,4BAAqC;;QACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,4BAAM,GAAN;QAAO,oBAAsC;aAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;YAAtC,+BAAsC;;QACzC,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;QAC1B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,6BAAO,GAAP;QAAQ,mBAAgE;aAAhE,UAAgE,EAAhE,qBAAgE,EAAhE,IAAgE;YAAhE,8BAAgE;;QACpE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,OAAO,IAAI,CAAC;IAChB,CAAC;IAKD,4BAAM,GAAN;QAAO,iBAAqC;aAArC,UAAqC,EAArC,qBAAqC,EAArC,IAAqC;YAArC,4BAAqC;;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;IACL,kBAAC;AAAD,CAAC,AA5DD,IA4DC"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var TableConditionQuery = /** @class */ (function () {
|
|
4
|
+
function TableConditionQuery(_queryProcessor, _table, _conditions) {
|
|
5
|
+
this._queryProcessor = _queryProcessor;
|
|
6
|
+
this._table = _table;
|
|
7
|
+
this._conditions = _conditions;
|
|
8
|
+
this._columns = [];
|
|
9
|
+
}
|
|
10
|
+
TableConditionQuery.prototype.update = function (entity) {
|
|
11
|
+
this._entity = entity;
|
|
12
|
+
this._action = 'update';
|
|
13
|
+
return this._queryProcessor(this);
|
|
14
|
+
};
|
|
15
|
+
TableConditionQuery.prototype.delete = function () {
|
|
16
|
+
this._action = 'delete';
|
|
17
|
+
return this._queryProcessor(this);
|
|
18
|
+
};
|
|
19
|
+
TableConditionQuery.prototype.count = function () {
|
|
20
|
+
this._columns = [this._table.$all.count()];
|
|
21
|
+
this._action = 'select';
|
|
22
|
+
return this._queryProcessor(this).then(function (rows) { return rows[0]; });
|
|
23
|
+
};
|
|
24
|
+
return TableConditionQuery;
|
|
25
|
+
}());
|
|
26
|
+
exports.default = TableConditionQuery;
|
|
27
|
+
//# sourceMappingURL=table-condition-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-condition-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAMA;IAEI,6BACc,eAA+B,EAC/B,MAAa,EACb,WAAoC;QAFpC,oBAAe,GAAf,eAAe,CAAgB;QAC/B,WAAM,GAAN,MAAM,CAAO;QACb,gBAAW,GAAX,WAAW,CAAyB;QAGxC,aAAQ,GAA8B,EAAE,CAAC;IAFhD,CAAC;IAMJ,oCAAM,GAAN,UAAO,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,oCAAM,GAAN;QACI,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,mCAAK,GAAL;QACI,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,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,CAAC,CAAC,EAAP,CAAO,CAAC,CAAC;IACxE,CAAC;IACL,0BAAC;AAAD,CAAC,AA5BD,IA4BC"}
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var table_condition_query_1 = require("./table-condition-query");
|
|
5
|
+
var value_column_1 = require("../column/value-column");
|
|
6
|
+
var TableQuery = /** @class */ (function () {
|
|
7
|
+
function TableQuery(_queryProcessor, _table) {
|
|
8
|
+
this._queryProcessor = _queryProcessor;
|
|
9
|
+
this._table = _table;
|
|
10
|
+
this._columns = [];
|
|
11
|
+
}
|
|
12
|
+
TableQuery.prototype.where = function () {
|
|
13
|
+
var conditions = [];
|
|
14
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15
|
+
conditions[_i] = arguments[_i];
|
|
16
|
+
}
|
|
17
|
+
return new table_condition_query_1.default(this._queryProcessor, this._table, conditions);
|
|
18
|
+
};
|
|
19
|
+
TableQuery.prototype.insert = function (param) {
|
|
20
|
+
this._entity = param;
|
|
21
|
+
this._action = 'insert';
|
|
22
|
+
return this._queryProcessor(this);
|
|
23
|
+
};
|
|
24
|
+
TableQuery.prototype.deleteAll = function () {
|
|
25
|
+
this._action = 'delete';
|
|
26
|
+
return this._queryProcessor(this);
|
|
27
|
+
};
|
|
28
|
+
TableQuery.prototype.updateAll = function (entity) {
|
|
29
|
+
this._entity = entity;
|
|
30
|
+
this._action = 'update';
|
|
31
|
+
return this._queryProcessor(this);
|
|
32
|
+
};
|
|
33
|
+
TableQuery.prototype.countAll = function () {
|
|
34
|
+
this._columns = [this._table.$all.count()];
|
|
35
|
+
this._action = 'select';
|
|
36
|
+
return this._queryProcessor(this).then(function (rows) { return rows[0]; });
|
|
37
|
+
};
|
|
38
|
+
TableQuery.prototype.delete = function (id) {
|
|
39
|
+
return this._whereId(id).delete().then(function (count) { return count > 0; });
|
|
40
|
+
};
|
|
41
|
+
TableQuery.prototype.update = function (id, entity) {
|
|
42
|
+
return this._whereId(id).update(entity).then(function (count) { return count > 0; });
|
|
43
|
+
};
|
|
44
|
+
TableQuery.prototype.get = function (id) {
|
|
45
|
+
var query = this._whereId(id);
|
|
46
|
+
return this._queryProcessor(tslib_1.__assign({ _action: 'select' }, query))
|
|
47
|
+
.then(function (rows) { return rows[0]; });
|
|
48
|
+
};
|
|
49
|
+
TableQuery.prototype._whereId = function (id) {
|
|
50
|
+
var _this = this;
|
|
51
|
+
// TODO remove assertions if $id typing is fixed
|
|
52
|
+
var $id = this._table.$id;
|
|
53
|
+
if ($id instanceof value_column_1.default) {
|
|
54
|
+
return this.where($id.eq(id));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
return this.where.apply(this, tslib_1.__spreadArray([], tslib_1.__read(Object.keys($id).map(function (key) { return _this._table[key].eq(id[key]); })), false));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
return TableQuery;
|
|
61
|
+
}());
|
|
62
|
+
exports.default = TableQuery;
|
|
63
|
+
//# sourceMappingURL=table-query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-query.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AACA,iEAA0D;AAE1D,uDAAiD;AAKjD;IAEI,oBACc,eAA+B,EAC/B,MAAa;QADb,oBAAe,GAAf,eAAe,CAAgB;QAC/B,WAAM,GAAN,MAAM,CAAO;QAKjB,aAAQ,GAA8B,EAAE,CAAC;IAJhD,CAAC;IAMJ,0BAAK,GAAL;QAAM,oBAAsC;aAAtC,UAAsC,EAAtC,qBAAsC,EAAtC,IAAsC;YAAtC,+BAAsC;;QACxC,OAAO,IAAI,+BAAmB,CAAgB,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACjG,CAAC;IAID,2BAAM,GAAN,UAAO,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,8BAAS,GAAT;QACI,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,8BAAS,GAAT,UAAU,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,6BAAQ,GAAR;QACI,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,UAAC,IAAW,IAAK,OAAA,IAAI,CAAC,CAAC,CAAC,EAAP,CAAO,CAAC,CAAC;IACrE,CAAC;IAED,2BAAM,GAAN,UAAO,EAAM;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,GAAG,CAAC,EAAT,CAAS,CAAC,CAAC;IAC/D,CAAC;IAED,2BAAM,GAAN,UAAO,EAAM,EAAE,MAAuB;QAClC,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,KAAK,GAAG,CAAC,EAAT,CAAS,CAAC,CAAC;IACrE,CAAC;IAED,wBAAG,GAAH,UAAI,EAAM;QACN,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,eAAe,oBAAG,OAAO,EAAE,QAAQ,IAAK,KAAK,EAAG;aACvD,IAAI,CAAC,UAAC,IAAc,IAAK,OAAA,IAAI,CAAC,CAAC,CAAC,EAAP,CAAO,CAAC,CAAC;IAC3C,CAAC;IAED,6BAAQ,GAAR,UAAS,EAAM;QAAf,iBAQC;QAPG,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,OAAV,IAAI,2CAAU,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAA,GAAG,IAAI,OAAE,KAAI,CAAC,MAAc,CAAC,GAAG,CAA6B,CAAC,EAAE,CAAE,EAAU,CAAC,GAAG,CAAQ,CAAC,EAAlF,CAAkF,CAAC,WAAE;QAC1I,CAAC;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AA/DD,IA+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
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var select_query_1 = require("./query/select-query");
|
|
4
|
+
var table_query_1 = require("./query/table-query");
|
|
5
|
+
var QuerySource = /** @class */ (function () {
|
|
6
|
+
function QuerySource(_queryProcessor) {
|
|
7
|
+
this._queryProcessor = _queryProcessor;
|
|
8
|
+
}
|
|
9
|
+
QuerySource.prototype.from = function (table1, table2, table3) {
|
|
10
|
+
if (table3 != null)
|
|
11
|
+
return new select_query_1.default(this._queryProcessor, [table1, table2, table3]);
|
|
12
|
+
else if (table2 != null)
|
|
13
|
+
return new select_query_1.default(this._queryProcessor, [table1, table2]);
|
|
14
|
+
return new select_query_1.default(this._queryProcessor, [table1]);
|
|
15
|
+
};
|
|
16
|
+
QuerySource.prototype.table = function (table) {
|
|
17
|
+
return new table_query_1.default(this._queryProcessor, table);
|
|
18
|
+
};
|
|
19
|
+
return QuerySource;
|
|
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,qDAA+C;AAG/C,mDAA6C;AAG7C;IAEI,qBAAsB,eAA+B;QAA/B,oBAAe,GAAf,eAAe,CAAgB;IAAG,CAAC;IAMzD,0BAAI,GAAJ,UAA4H,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,2BAAK,GAAL,UAAwD,KAAqC;QACzF,OAAO,IAAI,qBAAU,CAAoB,IAAI,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC1E,CAAC;IACL,kBAAC;AAAD,CAAC,AAjBD,IAiBC"}
|
|
@@ -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;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var basic_column_1 = require("./column/basic-column");
|
|
4
|
+
var joined_tables_chain_1 = require("./join/joined-tables-chain");
|
|
5
|
+
var QueryTable = /** @class */ (function () {
|
|
6
|
+
function QueryTable(_$name) {
|
|
7
|
+
this._$name = _$name;
|
|
8
|
+
// abstract readonly $id; // FIXME I got a dozen incomprehensible type errors
|
|
9
|
+
this.$all = new basic_column_1.default(this, '*');
|
|
10
|
+
}
|
|
11
|
+
QueryTable.prototype.innerJoin = function (table) {
|
|
12
|
+
return new joined_tables_chain_1.default(table, 'inner', this);
|
|
13
|
+
};
|
|
14
|
+
QueryTable.prototype.leftJoin = function (table) {
|
|
15
|
+
return new joined_tables_chain_1.default(table, 'left', this);
|
|
16
|
+
};
|
|
17
|
+
QueryTable.prototype.rightJoin = function (table) {
|
|
18
|
+
return new joined_tables_chain_1.default(table, 'right', this);
|
|
19
|
+
};
|
|
20
|
+
QueryTable.prototype.fullJoin = function (table) {
|
|
21
|
+
return new joined_tables_chain_1.default(table, 'full', this);
|
|
22
|
+
};
|
|
23
|
+
return QueryTable;
|
|
24
|
+
}());
|
|
25
|
+
exports.default = QueryTable;
|
|
26
|
+
//# sourceMappingURL=query-table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-table.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;AAAA,sDAAgD;AAEhD,kEAA2D;AAG3D;IAEI,oBAAsB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAKpC,6EAA6E;QAE7E,SAAI,GAAG,IAAI,sBAAW,CAAe,IAAI,EAAE,GAAG,CAAC,CAAC;IAPT,CAAC;IASxC,8BAAS,GAAT,UAAkD,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,6BAAQ,GAAR,UAAiD,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IAED,8BAAS,GAAT,UAAkD,KAAgB;QAC9D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACzE,CAAC;IAED,6BAAQ,GAAR,UAAiD,KAAgB;QAC7D,OAAO,IAAI,6BAAiB,CAAmB,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;IACL,iBAAC;AAAD,CAAC,AA1BD,IA0BC;AAED,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var query_source_1 = require("../builder/query-source");
|
|
5
|
+
var query_processor_1 = require("./query-processor");
|
|
6
|
+
var MySqlQuerySource = /** @class */ (function (_super) {
|
|
7
|
+
tslib_1.__extends(MySqlQuerySource, _super);
|
|
8
|
+
function MySqlQuerySource(client, options) {
|
|
9
|
+
if (options === void 0) { options = {}; }
|
|
10
|
+
return _super.call(this, (0, query_processor_1.createQueryProcessor)(client, options, 'mysql')) || this;
|
|
11
|
+
}
|
|
12
|
+
return MySqlQuerySource;
|
|
13
|
+
}(query_source_1.default));
|
|
14
|
+
exports.default = MySqlQuerySource;
|
|
15
|
+
//# sourceMappingURL=mysql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mysql.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,wDAAkD;AAClD,qDAA8E;AAE9E;IAA8C,4CAAW;IAErD,0BAAY,MAAW,EAAE,OAAmC;QAAnC,wBAAA,EAAA,YAAmC;QACxD,OAAA,MAAK,YAAC,IAAA,sCAAoB,EAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAC;IAC1D,CAAC;IACL,uBAAC;AAAD,CAAC,AALD,CAA8C,sBAAW,GAKxD"}
|
package/lib/client/pg.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var query_source_1 = require("../builder/query-source");
|
|
5
|
+
var query_processor_1 = require("./query-processor");
|
|
6
|
+
var PgQuerySource = /** @class */ (function (_super) {
|
|
7
|
+
tslib_1.__extends(PgQuerySource, _super);
|
|
8
|
+
function PgQuerySource(client, options) {
|
|
9
|
+
if (options === void 0) { options = {}; }
|
|
10
|
+
return _super.call(this, (0, query_processor_1.createQueryProcessor)(client, options, 'pg')) || this;
|
|
11
|
+
}
|
|
12
|
+
return PgQuerySource;
|
|
13
|
+
}(query_source_1.default));
|
|
14
|
+
exports.default = PgQuerySource;
|
|
15
|
+
//# sourceMappingURL=pg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pg.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,wDAAkD;AAClD,qDAA8E;AAE9E;IAA2C,yCAAW;IAElD,uBAAY,MAAW,EAAE,OAAmC;QAAnC,wBAAA,EAAA,YAAmC;QACxD,OAAA,MAAK,YAAC,IAAA,sCAAoB,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,SAAC;IACvD,CAAC;IACL,oBAAC;AAAD,CAAC,AALD,CAA2C,sBAAW,GAKrD"}
|
|
@@ -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;
|