fib-orm 1.4.2 → 2.0.0
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/License +1 -1
- package/README.md +53 -0
- package/lib/cli/commands/ddlFrom.d.ts +2 -0
- package/lib/cli/commands/ddlFrom.js +74 -0
- package/lib/cli/commands/dumpModel.d.ts +2 -0
- package/lib/cli/commands/dumpModel.js +106 -0
- package/lib/cli/commands/escape.d.ts +2 -0
- package/lib/cli/commands/escape.js +68 -0
- package/lib/cli/commands/spinner.d.ts +2 -0
- package/lib/cli/commands/spinner.js +36 -0
- package/lib/cli/commands/upgrade.d.ts +2 -0
- package/lib/cli/commands/upgrade.js +65 -0
- package/lib/cli/helpers/ddl.d.ts +17 -0
- package/lib/cli/helpers/ddl.js +55 -0
- package/lib/cli/helpers/package.d.ts +26 -0
- package/lib/cli/helpers/package.js +56 -0
- package/lib/cli/index.d.ts +2 -0
- package/lib/cli/index.js +18 -0
- package/lib/codepoints-map.json +762 -0
- package/lib/db-driver/Typo.d.ts +112 -0
- package/lib/db-driver/Typo.js +1 -0
- package/lib/db-driver/built-ins/base.class.d.ts +96 -0
- package/lib/db-driver/built-ins/base.class.js +186 -0
- package/lib/db-driver/built-ins/driver-dm.d.ts +18 -0
- package/lib/db-driver/built-ins/driver-dm.js +53 -0
- package/lib/db-driver/built-ins/driver-mongodb.d.ts +24 -0
- package/lib/db-driver/built-ins/driver-mongodb.js +46 -0
- package/lib/db-driver/built-ins/driver-mysql.d.ts +18 -0
- package/lib/db-driver/built-ins/driver-mysql.js +37 -0
- package/lib/db-driver/built-ins/driver-postgresql.d.ts +22 -0
- package/lib/db-driver/built-ins/driver-postgresql.js +76 -0
- package/lib/db-driver/built-ins/driver-redis.d.ts +12 -0
- package/lib/db-driver/built-ins/driver-redis.js +35 -0
- package/lib/db-driver/built-ins/driver-sqlite.d.ts +17 -0
- package/lib/db-driver/built-ins/driver-sqlite.js +34 -0
- package/lib/db-driver/index.d.ts +3 -0
- package/lib/db-driver/index.js +4 -0
- package/lib/db-driver/utils.d.ts +14 -0
- package/lib/db-driver/utils.js +187 -0
- package/lib/knex/deps/tarn/dist/PendingOperation.d.ts +12 -0
- package/lib/knex/deps/tarn/dist/PendingOperation.js +48 -0
- package/lib/knex/deps/tarn/dist/Pool.d.ts +97 -0
- package/lib/knex/deps/tarn/dist/Pool.js +516 -0
- package/lib/knex/deps/tarn/dist/PromiseInspection.d.ts +16 -0
- package/lib/knex/deps/tarn/dist/PromiseInspection.js +21 -0
- package/lib/knex/deps/tarn/dist/Resource.d.ts +9 -0
- package/lib/knex/deps/tarn/dist/Resource.js +19 -0
- package/lib/knex/deps/tarn/dist/TimeoutError.d.ts +2 -0
- package/lib/knex/deps/tarn/dist/TimeoutError.js +5 -0
- package/lib/knex/deps/tarn/dist/tarn.d.ts +3 -0
- package/lib/knex/deps/tarn/dist/tarn.js +10 -0
- package/lib/knex/deps/tarn/dist/utils.d.ts +14 -0
- package/lib/knex/deps/tarn/dist/utils.js +60 -0
- package/lib/knex/knex.d.ts +2 -0
- package/lib/knex/knex.js +3 -0
- package/lib/knex/sandbox.d.ts +4 -0
- package/lib/knex/sandbox.js +22 -0
- package/lib/orm/Adapters.d.ts +3 -0
- package/lib/orm/Adapters.js +44 -0
- package/lib/orm/AggregateFunctions.d.ts +3 -0
- package/lib/orm/AggregateFunctions.js +176 -0
- package/lib/orm/Associations/Extend.d.ts +22 -0
- package/lib/orm/Associations/Extend.js +274 -0
- package/lib/orm/Associations/Many.d.ts +17 -0
- package/lib/orm/Associations/Many.js +569 -0
- package/lib/orm/Associations/One.d.ts +16 -0
- package/lib/orm/Associations/One.js +310 -0
- package/lib/orm/Associations/_utils.d.ts +15 -0
- package/lib/orm/Associations/_utils.js +52 -0
- package/lib/orm/ChainFind.d.ts +3 -0
- package/lib/orm/ChainFind.js +327 -0
- package/lib/orm/ChainInstance.d.ts +6 -0
- package/lib/orm/ChainInstance.js +73 -0
- package/lib/orm/Debug.d.ts +2 -0
- package/lib/orm/Debug.js +17 -0
- package/lib/orm/Drivers/DB/base.d.ts +3 -0
- package/lib/orm/Drivers/DB/base.js +3 -0
- package/lib/orm/Drivers/DB/dm.d.ts +11 -0
- package/lib/orm/Drivers/DB/dm.js +23 -0
- package/lib/orm/Drivers/DB/mysql.d.ts +11 -0
- package/lib/orm/Drivers/DB/mysql.js +23 -0
- package/lib/orm/Drivers/DB/postgres.d.ts +11 -0
- package/lib/orm/Drivers/DB/postgres.js +22 -0
- package/lib/orm/Drivers/DB/sqlite3.d.ts +16 -0
- package/lib/orm/Drivers/DB/sqlite3.js +39 -0
- package/lib/orm/Drivers/DML/_ddl-sql.d.ts +3 -0
- package/lib/orm/Drivers/DML/_ddl-sql.js +51 -0
- package/lib/orm/Drivers/DML/_dml-helpers.d.ts +19 -0
- package/lib/orm/Drivers/DML/_dml-helpers.js +51 -0
- package/lib/orm/Drivers/DML/_shared.d.ts +9 -0
- package/lib/orm/Drivers/DML/_shared.js +38 -0
- package/lib/orm/Drivers/DML/_utils.d.ts +8 -0
- package/lib/orm/Drivers/DML/_utils.js +67 -0
- package/lib/orm/Drivers/DML/constants.d.ts +3 -0
- package/lib/orm/Drivers/DML/constants.js +2 -0
- package/lib/orm/Drivers/DML/dm.d.ts +2 -0
- package/lib/orm/Drivers/DML/dm.js +293 -0
- package/lib/orm/Drivers/DML/index.d.ts +4 -0
- package/lib/orm/Drivers/DML/index.js +6 -0
- package/lib/orm/Drivers/DML/mysql.d.ts +2 -0
- package/lib/orm/Drivers/DML/mysql.js +251 -0
- package/lib/orm/Drivers/DML/postgres.d.ts +3 -0
- package/lib/orm/Drivers/DML/postgres.js +276 -0
- package/lib/orm/Drivers/DML/sqlite.d.ts +2 -0
- package/lib/orm/Drivers/DML/sqlite.js +266 -0
- package/lib/orm/Error.d.ts +11 -0
- package/lib/orm/Error.js +40 -0
- package/lib/orm/Helpers.d.ts +35 -0
- package/lib/orm/Helpers.js +233 -0
- package/lib/orm/Hook.d.ts +13 -0
- package/lib/orm/Hook.js +99 -0
- package/lib/orm/Instance.d.ts +2 -0
- package/lib/orm/Instance.js +697 -0
- package/lib/orm/LazyLoad.d.ts +4 -0
- package/lib/orm/LazyLoad.js +76 -0
- package/lib/orm/Model.d.ts +7 -0
- package/lib/orm/Model.js +971 -0
- package/lib/orm/ORM.d.ts +37 -0
- package/lib/orm/ORM.js +241 -0
- package/lib/orm/Patch/fib-cache.d.ts +40 -0
- package/lib/orm/Patch/fib-cache.js +2 -0
- package/lib/orm/Patch/plugin.d.ts +4 -0
- package/lib/orm/Patch/plugin.js +13 -0
- package/lib/orm/Property.d.ts +9 -0
- package/lib/orm/Property.js +71 -0
- package/lib/orm/Settings.d.ts +42 -0
- package/lib/orm/Settings.js +119 -0
- package/lib/orm/Singleton.d.ts +5 -0
- package/lib/orm/Singleton.js +72 -0
- package/lib/orm/Typo/Adapter.d.ts +5 -0
- package/lib/orm/Typo/Adapter.js +1 -0
- package/lib/orm/Typo/DMLDriver.d.ts +210 -0
- package/lib/orm/Typo/DMLDriver.js +1 -0
- package/lib/orm/Typo/Db.d.ts +38 -0
- package/lib/orm/Typo/Db.js +1 -0
- package/lib/orm/Typo/Error.d.ts +31 -0
- package/lib/orm/Typo/Error.js +1 -0
- package/lib/orm/Typo/ORM.d.ts +233 -0
- package/lib/orm/Typo/ORM.js +3 -0
- package/lib/orm/Typo/Validators.d.ts +32 -0
- package/lib/orm/Typo/Validators.js +2 -0
- package/lib/orm/Typo/_common.d.ts +38 -0
- package/lib/orm/Typo/_common.js +1 -0
- package/lib/orm/Typo/assoc.d.ts +221 -0
- package/lib/orm/Typo/assoc.js +1 -0
- package/lib/orm/Typo/hook.d.ts +42 -0
- package/lib/orm/Typo/hook.js +1 -0
- package/lib/orm/Typo/instance.d.ts +157 -0
- package/lib/orm/Typo/instance.js +1 -0
- package/lib/orm/Typo/model.d.ts +313 -0
- package/lib/orm/Typo/model.js +6 -0
- package/lib/orm/Typo/patch.d.ts +31 -0
- package/lib/orm/Typo/patch.js +1 -0
- package/lib/orm/Typo/property.d.ts +57 -0
- package/lib/orm/Typo/property.js +1 -0
- package/lib/orm/Typo/query.d.ts +216 -0
- package/lib/orm/Typo/query.js +1 -0
- package/lib/orm/Typo/settings.d.ts +35 -0
- package/lib/orm/Typo/settings.js +5 -0
- package/lib/orm/Typo/synchronous.d.ts +47 -0
- package/lib/orm/Typo/synchronous.js +1 -0
- package/lib/orm/Utilities.d.ts +179 -0
- package/lib/orm/Utilities.js +975 -0
- package/lib/orm/Validators.d.ts +34 -0
- package/lib/orm/Validators.js +100 -0
- package/lib/orm/Where/common.d.ts +1 -0
- package/lib/orm/Where/common.js +7 -0
- package/lib/orm/Where/filterDate.d.ts +11 -0
- package/lib/orm/Where/filterDate.js +58 -0
- package/lib/orm/index.d.ts +68 -0
- package/lib/orm/index.js +157 -0
- package/lib/orm-core/callback.d.ts +12 -0
- package/lib/orm-core/callback.js +1 -0
- package/lib/orm-core/dialect.d.ts +80 -0
- package/lib/orm-core/dialect.js +1 -0
- package/lib/orm-core/error.d.ts +16 -0
- package/lib/orm-core/error.js +29 -0
- package/lib/orm-core/index.d.ts +6 -0
- package/lib/orm-core/index.js +6 -0
- package/lib/orm-core/sync.d.ts +12 -0
- package/lib/orm-core/sync.js +1 -0
- package/lib/orm-core/utils.d.ts +1 -0
- package/lib/orm-core/utils.js +5 -0
- package/lib/orm-property/Property.d.ts +78 -0
- package/lib/orm-property/Property.js +1 -0
- package/lib/orm-property/Utils.d.ts +9 -0
- package/lib/orm-property/Utils.js +13 -0
- package/lib/orm-property/customTypes.d.ts +2 -0
- package/lib/orm-property/customTypes.js +13 -0
- package/lib/orm-property/index.d.ts +10 -0
- package/lib/orm-property/index.js +22 -0
- package/lib/orm-property/transformer.d.ts +5 -0
- package/lib/orm-property/transformer.js +10 -0
- package/lib/orm-property/transformers/dm.d.ts +29 -0
- package/lib/orm-property/transformers/dm.js +237 -0
- package/lib/orm-property/transformers/index.d.ts +4 -0
- package/lib/orm-property/transformers/index.js +5 -0
- package/lib/orm-property/transformers/mysql.d.ts +102 -0
- package/lib/orm-property/transformers/mysql.js +261 -0
- package/lib/orm-property/transformers/postgresql.d.ts +54 -0
- package/lib/orm-property/transformers/postgresql.js +189 -0
- package/lib/orm-property/transformers/sqlite.d.ts +19 -0
- package/lib/orm-property/transformers/sqlite.js +171 -0
- package/lib/sql-ddl-sync/Dialects/dm.d.ts +40 -0
- package/lib/sql-ddl-sync/Dialects/dm.js +296 -0
- package/lib/sql-ddl-sync/Dialects/index.d.ts +7 -0
- package/lib/sql-ddl-sync/Dialects/index.js +7 -0
- package/lib/sql-ddl-sync/Dialects/mysql.d.ts +39 -0
- package/lib/sql-ddl-sync/Dialects/mysql.js +240 -0
- package/lib/sql-ddl-sync/Dialects/postgresql.d.ts +40 -0
- package/lib/sql-ddl-sync/Dialects/postgresql.js +286 -0
- package/lib/sql-ddl-sync/Dialects/sqlite.d.ts +44 -0
- package/lib/sql-ddl-sync/Dialects/sqlite.js +256 -0
- package/lib/sql-ddl-sync/SQL.d.ts +12 -0
- package/lib/sql-ddl-sync/SQL.js +108 -0
- package/lib/sql-ddl-sync/Typo/Collection.d.ts +13 -0
- package/lib/sql-ddl-sync/Typo/Collection.js +1 -0
- package/lib/sql-ddl-sync/Typo/DbIndex.d.ts +13 -0
- package/lib/sql-ddl-sync/Typo/DbIndex.js +1 -0
- package/lib/sql-ddl-sync/Typo/Dialect.d.ts +81 -0
- package/lib/sql-ddl-sync/Typo/Dialect.js +1 -0
- package/lib/sql-ddl-sync/Typo/Driver.d.ts +53 -0
- package/lib/sql-ddl-sync/Typo/Driver.js +1 -0
- package/lib/sql-ddl-sync/Typo/Query.d.ts +7 -0
- package/lib/sql-ddl-sync/Typo/Query.js +1 -0
- package/lib/sql-ddl-sync/Typo/SQL.d.ts +31 -0
- package/lib/sql-ddl-sync/Typo/SQL.js +1 -0
- package/lib/sql-ddl-sync/Typo/_common.d.ts +29 -0
- package/lib/sql-ddl-sync/Typo/_common.js +1 -0
- package/lib/sql-ddl-sync/Utils.d.ts +40 -0
- package/lib/sql-ddl-sync/Utils.js +217 -0
- package/lib/sql-ddl-sync/index.d.ts +87 -0
- package/lib/sql-ddl-sync/index.js +371 -0
- package/lib/sql-query/Comparators.d.ts +3 -0
- package/lib/sql-query/Comparators.js +94 -0
- package/lib/sql-query/Create.d.ts +35 -0
- package/lib/sql-query/Create.js +77 -0
- package/lib/sql-query/Dialects/dm.d.ts +3 -0
- package/lib/sql-query/Dialects/dm.js +74 -0
- package/lib/sql-query/Dialects/index.d.ts +10 -0
- package/lib/sql-query/Dialects/index.js +12 -0
- package/lib/sql-query/Dialects/mssql.d.ts +3 -0
- package/lib/sql-query/Dialects/mssql.js +73 -0
- package/lib/sql-query/Dialects/mysql.d.ts +3 -0
- package/lib/sql-query/Dialects/mysql.js +100 -0
- package/lib/sql-query/Dialects/postgresql.d.ts +3 -0
- package/lib/sql-query/Dialects/postgresql.js +76 -0
- package/lib/sql-query/Dialects/sqlite.d.ts +3 -0
- package/lib/sql-query/Dialects/sqlite.js +61 -0
- package/lib/sql-query/Helpers.d.ts +38 -0
- package/lib/sql-query/Helpers.js +259 -0
- package/lib/sql-query/Insert.d.ts +12 -0
- package/lib/sql-query/Insert.js +33 -0
- package/lib/sql-query/Query.d.ts +29 -0
- package/lib/sql-query/Query.js +119 -0
- package/lib/sql-query/Remove.d.ts +16 -0
- package/lib/sql-query/Remove.js +93 -0
- package/lib/sql-query/Select.d.ts +62 -0
- package/lib/sql-query/Select.js +533 -0
- package/lib/sql-query/Set.d.ts +4 -0
- package/lib/sql-query/Set.js +16 -0
- package/lib/sql-query/Typo/Aggregation.d.ts +32 -0
- package/lib/sql-query/Typo/Aggregation.js +1 -0
- package/lib/sql-query/Typo/Comparators.d.ts +140 -0
- package/lib/sql-query/Typo/Comparators.js +1 -0
- package/lib/sql-query/Typo/Dialect.d.ts +39 -0
- package/lib/sql-query/Typo/Dialect.js +1 -0
- package/lib/sql-query/Typo/Field.d.ts +8 -0
- package/lib/sql-query/Typo/Field.js +1 -0
- package/lib/sql-query/Typo/Helper.d.ts +4 -0
- package/lib/sql-query/Typo/Helper.js +1 -0
- package/lib/sql-query/Typo/Query-ChainBuilder.d.ts +80 -0
- package/lib/sql-query/Typo/Query-ChainBuilder.js +1 -0
- package/lib/sql-query/Typo/Query.d.ts +34 -0
- package/lib/sql-query/Typo/Query.js +16 -0
- package/lib/sql-query/Typo/Sql.d.ts +143 -0
- package/lib/sql-query/Typo/Sql.js +1 -0
- package/lib/sql-query/Typo/SubQuery.d.ts +39 -0
- package/lib/sql-query/Typo/SubQuery.js +1 -0
- package/lib/sql-query/Typo/index.d.ts +9 -0
- package/lib/sql-query/Typo/index.js +1 -0
- package/lib/sql-query/Update.d.ts +15 -0
- package/lib/sql-query/Update.js +38 -0
- package/lib/sql-query/Where.d.ts +4 -0
- package/lib/sql-query/Where.js +280 -0
- package/package.json +72 -36
- package/.travis.yml +0 -14
- package/@types/index.d.ts +0 -254
- package/@types/orm_mirror/orm.d.ts +0 -275
- package/@types/orm_mirror/sql-query.d.ts +0 -79
- package/Readme.md +0 -843
- package/lib/index.js +0 -13
- package/lib/modules/mysql.js +0 -35
- package/lib/modules/sqlite3.js +0 -27
- package/lib/patch.js +0 -271
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FxSqlQueryColumns } from "../../../sql-query/Query";
|
|
2
|
+
import { FxOrmDMLDriver } from "../../Typo/DMLDriver";
|
|
3
|
+
import { FxOrmInstance } from "../../Typo/instance";
|
|
4
|
+
import { FxOrmProperty } from "../../Typo/property";
|
|
5
|
+
export declare function safeParseJson<T extends object>(input: string | T, fallbackValue?: any): T;
|
|
6
|
+
export declare function normalizePropertyValueOnFound(data: FxOrmInstance.InstanceDataPayload, property: FxOrmProperty.NormalizedProperty, ctx: {
|
|
7
|
+
driver: FxOrmDMLDriver.DMLDriver;
|
|
8
|
+
}): FxOrmInstance.InstanceDataPayload;
|
|
9
|
+
export declare function pickPointTypeFields(dmlDriver: FxOrmDMLDriver.DMLDriver, modelProperties: Record<string, FxOrmProperty.NormalizedProperty>): string[];
|
|
10
|
+
export declare function filterFieldsOnFind(ctx: {
|
|
11
|
+
dmlDriver: FxOrmDMLDriver.DMLDriver;
|
|
12
|
+
pointPropertiesMapsTo: string[];
|
|
13
|
+
}, ret: {
|
|
14
|
+
selectFields: FxSqlQueryColumns.SelectInputArgType[];
|
|
15
|
+
}): void;
|
|
16
|
+
/**
|
|
17
|
+
* @description for point from sqlite, which stored as text actually
|
|
18
|
+
*/
|
|
19
|
+
export declare function unwrapQuote(stringVal: string): string;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.unwrapQuote = exports.filterFieldsOnFind = exports.pickPointTypeFields = exports.normalizePropertyValueOnFound = exports.safeParseJson = void 0;
|
|
3
|
+
function safeParseJson(input, fallbackValue = {}) {
|
|
4
|
+
if (typeof input !== 'string') {
|
|
5
|
+
return input;
|
|
6
|
+
}
|
|
7
|
+
try {
|
|
8
|
+
return JSON.parse(input);
|
|
9
|
+
}
|
|
10
|
+
catch (e) {
|
|
11
|
+
return fallbackValue;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.safeParseJson = safeParseJson;
|
|
15
|
+
function normalizePropertyValueOnFound(data, property, ctx) {
|
|
16
|
+
if (ctx.driver.db.type !== 'mysql')
|
|
17
|
+
return;
|
|
18
|
+
if (property.type === 'point') {
|
|
19
|
+
}
|
|
20
|
+
return data;
|
|
21
|
+
}
|
|
22
|
+
exports.normalizePropertyValueOnFound = normalizePropertyValueOnFound;
|
|
23
|
+
function pickPointTypeFields(dmlDriver, modelProperties) {
|
|
24
|
+
if (!['mysql', 'sqlite', 'dm'].includes(dmlDriver.db.type))
|
|
25
|
+
return [];
|
|
26
|
+
return Object.values(modelProperties)
|
|
27
|
+
.filter(p => p.type === 'point')
|
|
28
|
+
.map(p => p.mapsTo);
|
|
29
|
+
}
|
|
30
|
+
exports.pickPointTypeFields = pickPointTypeFields;
|
|
31
|
+
function filterFieldsOnFind(ctx, ret) {
|
|
32
|
+
if (ctx.dmlDriver.db.type !== 'mysql')
|
|
33
|
+
return;
|
|
34
|
+
ctx.pointPropertiesMapsTo.forEach(mapsTo => {
|
|
35
|
+
const idx = ret.selectFields.indexOf(mapsTo);
|
|
36
|
+
if (idx === -1)
|
|
37
|
+
return;
|
|
38
|
+
ret.selectFields[idx] = {
|
|
39
|
+
sql: `CONCAT('{','\"x\":', ST_X(${mapsTo}), ',','\"y\":', ST_Y(${mapsTo}),'}')`,
|
|
40
|
+
as: mapsTo,
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
exports.filterFieldsOnFind = filterFieldsOnFind;
|
|
45
|
+
/**
|
|
46
|
+
* @description for point from sqlite, which stored as text actually
|
|
47
|
+
*/
|
|
48
|
+
function unwrapQuote(stringVal) {
|
|
49
|
+
return stringVal.replace(/(?:^\'|\'$)/g, '');
|
|
50
|
+
}
|
|
51
|
+
exports.unwrapQuote = unwrapQuote;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FxSqlQuerySql } from '../../../sql-query/Query';
|
|
2
|
+
import type { FxOrmAssociation } from '../../Typo/assoc';
|
|
3
|
+
import type { FxOrmDMLDriver } from '../../Typo/DMLDriver';
|
|
4
|
+
import type { FxOrmQuery } from '../../Typo/query';
|
|
5
|
+
import type { FxOrmCommon } from '../../Typo/_common';
|
|
6
|
+
export declare function execQuery<T = any>(this: FxOrmDMLDriver.DMLDriver): T;
|
|
7
|
+
export declare function eagerQuery<T = any>(this: FxOrmDMLDriver.DMLDriver, association: FxOrmAssociation.InstanceAssociationItem, opts: FxOrmQuery.ChainFindOptions, keys: string[], cb: FxOrmCommon.ExecutionCallback<T>): T;
|
|
8
|
+
export declare const poolQuery: FxOrmDMLDriver.DMLDriver['poolQuery'];
|
|
9
|
+
export declare function execQuerySync(this: FxOrmDMLDriver.DMLDriver, query: string, opt: FxSqlQuerySql.SqlEscapeArgType[]): any;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.execQuerySync = exports.poolQuery = exports.eagerQuery = exports.execQuery = void 0;
|
|
3
|
+
const util = require("util");
|
|
4
|
+
function execQuery() {
|
|
5
|
+
var query, cb;
|
|
6
|
+
const args = Array.prototype.slice.apply(arguments);
|
|
7
|
+
if (typeof util.last(args) === 'function')
|
|
8
|
+
cb = args.pop();
|
|
9
|
+
query = this.query.escape.apply(this.query, args);
|
|
10
|
+
return this.execSimpleQuery(query, cb);
|
|
11
|
+
}
|
|
12
|
+
exports.execQuery = execQuery;
|
|
13
|
+
function eagerQuery(association, opts, keys, cb) {
|
|
14
|
+
var desiredKey = Object.keys(association.field);
|
|
15
|
+
var assocKey = Object.keys(association.mergeAssocId);
|
|
16
|
+
var where = {};
|
|
17
|
+
// TODO: what if $p has composite association keys?
|
|
18
|
+
where[desiredKey[0]] = keys;
|
|
19
|
+
var query = this.query.select()
|
|
20
|
+
.from(association.model.table)
|
|
21
|
+
.select(opts.only)
|
|
22
|
+
.from(association.mergeTable, assocKey, opts.keys)
|
|
23
|
+
.select(desiredKey).as("$p")
|
|
24
|
+
.where(association.mergeTable, where)
|
|
25
|
+
.build();
|
|
26
|
+
return this.execSimpleQuery(query, cb);
|
|
27
|
+
}
|
|
28
|
+
exports.eagerQuery = eagerQuery;
|
|
29
|
+
const poolQuery = function (query, cb) {
|
|
30
|
+
return this.db.query(query, cb);
|
|
31
|
+
};
|
|
32
|
+
exports.poolQuery = poolQuery;
|
|
33
|
+
function execQuerySync(query, opt) {
|
|
34
|
+
if (arguments.length == 2)
|
|
35
|
+
query = this.query.escape(query, opt);
|
|
36
|
+
return this.db.execute(query);
|
|
37
|
+
}
|
|
38
|
+
exports.execQuerySync = execQuerySync;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FxSqlQueryChainBuilder, FxSqlQuerySubQuery } from "../../../sql-query/Query";
|
|
2
|
+
import type { FxOrmDMLDriver } from "../../Typo/DMLDriver";
|
|
3
|
+
export declare function buildBaseConditionsToQuery(this: FxOrmDMLDriver.DMLDriver, q: FxSqlQueryChainBuilder.ChainBuilder__Select, base_table: string, base_conditions?: FxSqlQuerySubQuery.SubQueryConditions, top_conditions?: FxSqlQuerySubQuery.SubQueryConditions): FxSqlQueryChainBuilder.ChainBuilder__Select;
|
|
4
|
+
export declare function buildMergeToQuery(this: FxOrmDMLDriver.DMLDriver, q: FxSqlQueryChainBuilder.ChainBuilder__Select, merges: FxOrmDMLDriver.DMLDriver_FindOptions['merge']): FxSqlQueryChainBuilder.ChainBuilder__Select;
|
|
5
|
+
export declare function buildExistsToQuery(this: FxOrmDMLDriver.DMLDriver, q: FxSqlQueryChainBuilder.ChainBuilder__Select, table_alias: string, exists: FxOrmDMLDriver.DMLDriver_FindOptions['exists']): void;
|
|
6
|
+
export declare function buildOrderToQuery(this: FxOrmDMLDriver.DMLDriver, q: FxSqlQueryChainBuilder.ChainBuilder__Select, order: FxOrmDMLDriver.DMLDriver_FindOptions['order']): void;
|
|
7
|
+
export declare function getKnexInstance(driver: FxOrmDMLDriver.DMLDriver): void;
|
|
8
|
+
export declare function buildMergeToKnex(this: FxOrmDMLDriver.DMLDriver, knex: import("../../../knex/types").Knex, merges: FxOrmDMLDriver.DMLDriver_FindOptions['merge'], conditions: FxSqlQuerySubQuery.SubQueryConditions): void;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.buildMergeToKnex = exports.getKnexInstance = exports.buildOrderToQuery = exports.buildExistsToQuery = exports.buildMergeToQuery = exports.buildBaseConditionsToQuery = void 0;
|
|
3
|
+
function buildBaseConditionsToQuery(q, base_table, base_conditions, top_conditions) {
|
|
4
|
+
if (top_conditions && Object.keys(top_conditions).length) {
|
|
5
|
+
q = q.where(null, top_conditions);
|
|
6
|
+
}
|
|
7
|
+
if (base_conditions && Object.keys(base_conditions).length) {
|
|
8
|
+
q = q.where(base_table, base_conditions);
|
|
9
|
+
}
|
|
10
|
+
return q;
|
|
11
|
+
}
|
|
12
|
+
exports.buildBaseConditionsToQuery = buildBaseConditionsToQuery;
|
|
13
|
+
function buildMergeToQuery(q, merges) {
|
|
14
|
+
if (merges === null || merges === void 0 ? void 0 : merges.length) {
|
|
15
|
+
merges.forEach(merge => {
|
|
16
|
+
/**
|
|
17
|
+
* you should always pass alias as `merge.from.table` --- it's need indicate where base_conditions;
|
|
18
|
+
* you dont need pass alias as `merge.to.table` --- it's dont need indicate where base_conditions;
|
|
19
|
+
*/
|
|
20
|
+
q
|
|
21
|
+
.from(merge.from.table, merge.from.field, merge.to.table, merge.to.field)
|
|
22
|
+
.select(merge.select);
|
|
23
|
+
/**
|
|
24
|
+
* this means merge where base_conditions is not empty
|
|
25
|
+
*
|
|
26
|
+
* merge.where[0] is aliased table name,
|
|
27
|
+
* merge.where[1] is where base_conditions
|
|
28
|
+
*/
|
|
29
|
+
if (merge.where && Object.keys(merge.where[1]).length) {
|
|
30
|
+
q = q.where(merge.where[0], merge.where[1]);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return q;
|
|
35
|
+
}
|
|
36
|
+
exports.buildMergeToQuery = buildMergeToQuery;
|
|
37
|
+
function buildExistsToQuery(q, table_alias, exists) {
|
|
38
|
+
if (exists) {
|
|
39
|
+
for (let k in exists) {
|
|
40
|
+
const exist_item = exists[k];
|
|
41
|
+
q.whereExists(exist_item.table, table_alias, exist_item.link, exist_item.conditions);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.buildExistsToQuery = buildExistsToQuery;
|
|
46
|
+
function buildOrderToQuery(q, order) {
|
|
47
|
+
if (order) {
|
|
48
|
+
for (let i = 0; i < order.length; i++) {
|
|
49
|
+
q.order(order[i][0], order[i][1]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.buildOrderToQuery = buildOrderToQuery;
|
|
54
|
+
function getKnexInstance(driver) {
|
|
55
|
+
if (!driver.query.knex)
|
|
56
|
+
throw new Error(`[getKnexInstance] driver.query.knex must be init firstly!`);
|
|
57
|
+
Object.defineProperty(driver, 'knex', {
|
|
58
|
+
get() {
|
|
59
|
+
return driver.getQuery().knex;
|
|
60
|
+
},
|
|
61
|
+
configurable: false,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
exports.getKnexInstance = getKnexInstance;
|
|
65
|
+
function buildMergeToKnex(knex, merges, conditions) {
|
|
66
|
+
}
|
|
67
|
+
exports.buildMergeToKnex = buildMergeToKnex;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.Driver = void 0;
|
|
3
|
+
const util = require("util");
|
|
4
|
+
const dm_1 = require("../DB/dm");
|
|
5
|
+
const shared = require("./_shared");
|
|
6
|
+
const DDL = require("./_ddl-sql");
|
|
7
|
+
const Query_1 = require("../../../sql-query/Query");
|
|
8
|
+
const Sync = require("../../../sql-ddl-sync/index");
|
|
9
|
+
const utils = require("./_utils");
|
|
10
|
+
const Utilities = require("../../Utilities");
|
|
11
|
+
const _dml_helpers_1 = require("./_dml-helpers");
|
|
12
|
+
exports.Driver = function (config, connection, opts) {
|
|
13
|
+
this.dialect = 'dm';
|
|
14
|
+
this.opts = opts || {};
|
|
15
|
+
this.customTypes = {};
|
|
16
|
+
Object.defineProperty(this, 'db', {
|
|
17
|
+
value: connection || new dm_1.Database(config),
|
|
18
|
+
writable: false
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(this, 'sqlDriver', {
|
|
21
|
+
value: this.db,
|
|
22
|
+
writable: false
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(this, 'config', {
|
|
25
|
+
value: this.db.config,
|
|
26
|
+
writable: false
|
|
27
|
+
});
|
|
28
|
+
if (!this.config.timezone)
|
|
29
|
+
this.config.timezone = "local";
|
|
30
|
+
Object.defineProperty(this, 'ddlSync', {
|
|
31
|
+
value: Sync.dialect(this.dialect),
|
|
32
|
+
writable: false
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, 'query', {
|
|
35
|
+
value: new Query_1.Query({ dialect: this.dialect, timezone: this.config.timezone }),
|
|
36
|
+
writable: false
|
|
37
|
+
});
|
|
38
|
+
utils.getKnexInstance(this);
|
|
39
|
+
this.aggregate_functions = ["ABS", "CEIL", "FLOOR", "ROUND",
|
|
40
|
+
"AVG", "MIN", "MAX",
|
|
41
|
+
"LOG", "LOG2", "LOG10", "EXP", "POWER",
|
|
42
|
+
"ACOS", "ASIN", "ATAN", "COS", "SIN", "TAN",
|
|
43
|
+
"CONV", ["RANDOM", "RAND"], "RADIANS", "DEGREES",
|
|
44
|
+
"SUM", "COUNT",
|
|
45
|
+
"DISTINCT"];
|
|
46
|
+
};
|
|
47
|
+
util.extend(exports.Driver.prototype, shared, DDL);
|
|
48
|
+
exports.Driver.prototype.ping = function (cb) {
|
|
49
|
+
this.db.ping();
|
|
50
|
+
if (cb)
|
|
51
|
+
setImmediate(cb);
|
|
52
|
+
return this;
|
|
53
|
+
};
|
|
54
|
+
exports.Driver.prototype.on = function (ev, cb) {
|
|
55
|
+
if (ev == "error") {
|
|
56
|
+
this.db.eventor.on("error", cb);
|
|
57
|
+
this.db.eventor.on("unhandledError", cb);
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
};
|
|
61
|
+
exports.Driver.prototype.connect = function (cb) {
|
|
62
|
+
const syncResponse = Utilities.catchBlocking(() => {
|
|
63
|
+
return this.db.connect();
|
|
64
|
+
});
|
|
65
|
+
Utilities.takeAwayResult(syncResponse, { callback: cb });
|
|
66
|
+
return syncResponse.result;
|
|
67
|
+
};
|
|
68
|
+
exports.Driver.prototype.reconnect = function (cb) {
|
|
69
|
+
const connOpts = this.config.href || this.config;
|
|
70
|
+
this.db = new dm_1.Database(connOpts);
|
|
71
|
+
const syncResponse = Utilities.catchBlocking(() => {
|
|
72
|
+
return this.connect();
|
|
73
|
+
});
|
|
74
|
+
if (typeof cb === 'function')
|
|
75
|
+
cb(null, syncResponse.result);
|
|
76
|
+
return syncResponse.result;
|
|
77
|
+
};
|
|
78
|
+
exports.Driver.prototype.close = function (cb) {
|
|
79
|
+
const errResults = Utilities.catchBlocking(() => this.db.close());
|
|
80
|
+
Utilities.takeAwayResult(errResults, { no_throw: !!cb, callback: cb });
|
|
81
|
+
return errResults.result;
|
|
82
|
+
};
|
|
83
|
+
exports.Driver.prototype.getQuery = function () {
|
|
84
|
+
return this.query;
|
|
85
|
+
};
|
|
86
|
+
exports.Driver.prototype.execSimpleQuery = function (query, cb) {
|
|
87
|
+
if (this.opts.debug) {
|
|
88
|
+
require("../../Debug").sql('dm', query);
|
|
89
|
+
}
|
|
90
|
+
return this.db.query(query, cb);
|
|
91
|
+
};
|
|
92
|
+
exports.Driver.prototype.find = function (selectFields, table, conditions, opts) {
|
|
93
|
+
const { from_tuple, pure_table, alias } = Utilities.parseTableInputForSelect(table);
|
|
94
|
+
const __pointTypeMapsTo = opts.__pointTypeMapsTo || [];
|
|
95
|
+
(0, _dml_helpers_1.filterFieldsOnFind)({
|
|
96
|
+
dmlDriver: this,
|
|
97
|
+
pointPropertiesMapsTo: __pointTypeMapsTo,
|
|
98
|
+
}, {
|
|
99
|
+
selectFields,
|
|
100
|
+
});
|
|
101
|
+
const ctx = {
|
|
102
|
+
table,
|
|
103
|
+
fromTuple: from_tuple,
|
|
104
|
+
selectFields,
|
|
105
|
+
selectVirtualFields: opts.selectVirtualFields || []
|
|
106
|
+
};
|
|
107
|
+
let q = this.query.select();
|
|
108
|
+
q = typeof (opts === null || opts === void 0 ? void 0 : opts.generateSqlSelect) === 'function' ? (opts === null || opts === void 0 ? void 0 : opts.generateSqlSelect.call(this, ctx, q)) || q : Utilities.DEFAULT_GENERATE_SQL_QUERY_SELECT.call(this, ctx, q);
|
|
109
|
+
if (opts.offset) {
|
|
110
|
+
q.offset(opts.offset);
|
|
111
|
+
}
|
|
112
|
+
if (typeof opts.limit == "number") {
|
|
113
|
+
q.limit(opts.limit);
|
|
114
|
+
}
|
|
115
|
+
else if (opts.offset) {
|
|
116
|
+
q.limit('18446744073709551615');
|
|
117
|
+
}
|
|
118
|
+
utils.buildBaseConditionsToQuery.apply(this, [q, pure_table, conditions, opts.topConditions]);
|
|
119
|
+
utils.buildOrderToQuery.apply(this, [q, opts.order]);
|
|
120
|
+
utils.buildMergeToQuery.apply(this, [q, opts.merge, conditions]);
|
|
121
|
+
utils.buildExistsToQuery.apply(this, [q, alias, opts.exists]);
|
|
122
|
+
const results = this.execSimpleQuery(q.build());
|
|
123
|
+
if (__pointTypeMapsTo.length > 0 && Array.isArray(results)) {
|
|
124
|
+
results.forEach(item => {
|
|
125
|
+
__pointTypeMapsTo.forEach(field => {
|
|
126
|
+
item[field] = (0, _dml_helpers_1.safeParseJson)(item[field]);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return results;
|
|
131
|
+
};
|
|
132
|
+
exports.Driver.prototype.count = function (table, conditions, opts, cb) {
|
|
133
|
+
const { from_tuple, pure_table, alias } = Utilities.parseTableInputForSelect(table);
|
|
134
|
+
const q = this.query.select()
|
|
135
|
+
.from(from_tuple)
|
|
136
|
+
.count(null, 'c');
|
|
137
|
+
utils.buildBaseConditionsToQuery.apply(this, [q, pure_table, conditions]);
|
|
138
|
+
utils.buildMergeToQuery.apply(this, [q, opts.merge, conditions]);
|
|
139
|
+
utils.buildExistsToQuery.apply(this, [q, alias, opts.exists]);
|
|
140
|
+
return this.execSimpleQuery(q.build(), cb);
|
|
141
|
+
};
|
|
142
|
+
exports.Driver.prototype.insert = function (table, data, keyProperties, cb) {
|
|
143
|
+
const q = this.query.insert()
|
|
144
|
+
.into(table)
|
|
145
|
+
.set(data)
|
|
146
|
+
.build();
|
|
147
|
+
const syncResponse = Utilities.catchBlocking(() => {
|
|
148
|
+
let info;
|
|
149
|
+
const singleKeyProp = keyProperties && keyProperties.length === 1 ? keyProperties[0] : null;
|
|
150
|
+
const isIdentityKey = !!(singleKeyProp && (singleKeyProp.serial || singleKeyProp.type === 'serial'));
|
|
151
|
+
const explicitIdentity = !!(isIdentityKey && data[singleKeyProp.mapsTo] !== undefined && data[singleKeyProp.mapsTo] !== null);
|
|
152
|
+
if (explicitIdentity) {
|
|
153
|
+
this.execSimpleQuery(`SET IDENTITY_INSERT ${this.query.escapeId(table)} ON`);
|
|
154
|
+
try {
|
|
155
|
+
info = this.execSimpleQuery(q);
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
this.execSimpleQuery(`SET IDENTITY_INSERT ${this.query.escapeId(table)} OFF`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
info = this.execSimpleQuery(q);
|
|
163
|
+
}
|
|
164
|
+
const ids = {};
|
|
165
|
+
if (keyProperties) {
|
|
166
|
+
if (keyProperties.length == 1) {
|
|
167
|
+
const keyProp = keyProperties[0];
|
|
168
|
+
const isIdentityKey = !!(keyProp.serial || keyProp.type === 'serial');
|
|
169
|
+
if (isIdentityKey) {
|
|
170
|
+
if (info && info.hasOwnProperty("insertId") && info.insertId !== 0) {
|
|
171
|
+
ids[keyProp.name] = info.insertId;
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
let identityRes = null;
|
|
175
|
+
try {
|
|
176
|
+
identityRes = this.execSimpleQuery('SELECT @@IDENTITY as id');
|
|
177
|
+
}
|
|
178
|
+
catch (e) { }
|
|
179
|
+
if (identityRes && identityRes[0] && identityRes[0].id !== undefined && identityRes[0].id !== null) {
|
|
180
|
+
ids[keyProp.name] = identityRes[0].id;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
ids[keyProp.name] = data[keyProp.mapsTo];
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
ids[keyProp.name] = data[keyProp.mapsTo];
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
else {
|
|
192
|
+
for (let i = 0, prop; i < keyProperties.length; i++) {
|
|
193
|
+
prop = keyProperties[i];
|
|
194
|
+
ids[prop.name] = data[prop.mapsTo];
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return ids;
|
|
199
|
+
});
|
|
200
|
+
Utilities.takeAwayResult(syncResponse, { callback: cb });
|
|
201
|
+
return syncResponse.result;
|
|
202
|
+
};
|
|
203
|
+
exports.Driver.prototype.update = function (table, changes, conditions, cb) {
|
|
204
|
+
var q = this.query.update()
|
|
205
|
+
.into(table)
|
|
206
|
+
.set(changes)
|
|
207
|
+
.where(conditions)
|
|
208
|
+
.build();
|
|
209
|
+
return this.execSimpleQuery(q, cb);
|
|
210
|
+
};
|
|
211
|
+
exports.Driver.prototype.remove = function (table, conditions, cb) {
|
|
212
|
+
var q = this.query.remove()
|
|
213
|
+
.from(table)
|
|
214
|
+
.where(conditions)
|
|
215
|
+
.build();
|
|
216
|
+
return this.execSimpleQuery(q, cb);
|
|
217
|
+
};
|
|
218
|
+
exports.Driver.prototype.clear = function (table, cb) {
|
|
219
|
+
var q = "TRUNCATE TABLE " + this.query.escapeId(table);
|
|
220
|
+
return this.execSimpleQuery(q, cb);
|
|
221
|
+
};
|
|
222
|
+
exports.Driver.prototype.valueToProperty = function (value, property) {
|
|
223
|
+
var customType;
|
|
224
|
+
switch (property.type) {
|
|
225
|
+
case "point":
|
|
226
|
+
if (typeof value === 'string') {
|
|
227
|
+
value = (0, _dml_helpers_1.safeParseJson)(value, null);
|
|
228
|
+
}
|
|
229
|
+
break;
|
|
230
|
+
case "date":
|
|
231
|
+
if (util.isNumber(value) || util.isString(value))
|
|
232
|
+
value = new Date(value);
|
|
233
|
+
break;
|
|
234
|
+
case "boolean":
|
|
235
|
+
value = !!value;
|
|
236
|
+
break;
|
|
237
|
+
case "object":
|
|
238
|
+
if (typeof value == "object" && !Buffer.isBuffer(value)) {
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
try {
|
|
242
|
+
value = JSON.parse(value);
|
|
243
|
+
}
|
|
244
|
+
catch (e) {
|
|
245
|
+
value = null;
|
|
246
|
+
}
|
|
247
|
+
break;
|
|
248
|
+
case "binary": {
|
|
249
|
+
if (value && value.type === 'Buffer' && Array.isArray(value.data)) {
|
|
250
|
+
value = Buffer.from(value.data);
|
|
251
|
+
}
|
|
252
|
+
break;
|
|
253
|
+
}
|
|
254
|
+
default:
|
|
255
|
+
customType = this.customTypes[property.type];
|
|
256
|
+
if (customType && 'valueToProperty' in customType) {
|
|
257
|
+
value = customType.valueToProperty(value, property);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return value;
|
|
261
|
+
};
|
|
262
|
+
exports.Driver.prototype.propertyToValue = function (value, property) {
|
|
263
|
+
var customType;
|
|
264
|
+
switch (property.type) {
|
|
265
|
+
case "point":
|
|
266
|
+
if (value !== null && value !== undefined) {
|
|
267
|
+
value = JSON.stringify(value);
|
|
268
|
+
}
|
|
269
|
+
break;
|
|
270
|
+
case "object":
|
|
271
|
+
if (value !== null) {
|
|
272
|
+
if (!Buffer.isBuffer(value))
|
|
273
|
+
value = JSON.stringify(value);
|
|
274
|
+
}
|
|
275
|
+
break;
|
|
276
|
+
case "date":
|
|
277
|
+
if (util.isNumber(value) || util.isString(value))
|
|
278
|
+
value = new Date(value);
|
|
279
|
+
break;
|
|
280
|
+
case "boolean":
|
|
281
|
+
value = !!value;
|
|
282
|
+
break;
|
|
283
|
+
default:
|
|
284
|
+
customType = this.customTypes[property.type];
|
|
285
|
+
if (customType && 'propertyToValue' in customType) {
|
|
286
|
+
value = customType.propertyToValue(value, property);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return value;
|
|
290
|
+
};
|
|
291
|
+
Object.defineProperty(exports.Driver.prototype, "isSql", {
|
|
292
|
+
value: true
|
|
293
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.dm = exports.sqlite = exports.postgres = exports.mysql = void 0;
|
|
3
|
+
exports.mysql = require("./mysql");
|
|
4
|
+
exports.postgres = require("./postgres");
|
|
5
|
+
exports.sqlite = require("./sqlite");
|
|
6
|
+
exports.dm = require("./dm");
|