@simplysm/sd-cli 10.0.22 → 10.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SdTsIncrementalBuilder.d.ts +1 -1
- package/dist/SdTsIncrementalBuilder.js.map +1 -1
- package/dist/SdTsIncrementalBuilder.mjs +39 -16
- package/dist/entry/SdCliLocalUpdate.d.ts +5 -0
- package/dist/entry/SdCliLocalUpdate.js.map +1 -1
- package/dist/entry/SdCliLocalUpdate.mjs +46 -1
- package/dist/entry/SdCliProject.js.map +1 -1
- package/dist/entry/SdCliProject.mjs +5 -0
- package/package.json +4 -4
- package/src/SdTsIncrementalBuilder.ts +29 -4
- package/src/entry/SdCliLocalUpdate.ts +53 -1
- package/src/entry/SdCliProject.ts +6 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.d.ts +0 -20
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.js.map +0 -1
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.mjs +0 -12
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.d.ts +0 -43
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.js.map +0 -1
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.mjs +0 -54
- package/dist/sd-core-common/src/decorators/PropertyValidate.d.ts +0 -16
- package/dist/sd-core-common/src/decorators/PropertyValidate.js.map +0 -1
- package/dist/sd-core-common/src/decorators/PropertyValidate.mjs +0 -26
- package/dist/sd-core-common/src/decorators/decorator-return-types.d.ts +0 -14
- package/dist/sd-core-common/src/decorators/decorator-return-types.js.map +0 -1
- package/dist/sd-core-common/src/decorators/decorator-return-types.mjs +0 -2
- package/dist/sd-core-common/src/errors/ArgumentError.d.ts +0 -10
- package/dist/sd-core-common/src/errors/ArgumentError.js.map +0 -1
- package/dist/sd-core-common/src/errors/ArgumentError.mjs +0 -13
- package/dist/sd-core-common/src/errors/NeverEntryError.d.ts +0 -10
- package/dist/sd-core-common/src/errors/NeverEntryError.js.map +0 -1
- package/dist/sd-core-common/src/errors/NeverEntryError.mjs +0 -13
- package/dist/sd-core-common/src/errors/NotImplementError.d.ts +0 -10
- package/dist/sd-core-common/src/errors/NotImplementError.js.map +0 -1
- package/dist/sd-core-common/src/errors/NotImplementError.mjs +0 -13
- package/dist/sd-core-common/src/errors/SdError.d.ts +0 -23
- package/dist/sd-core-common/src/errors/SdError.js.map +0 -1
- package/dist/sd-core-common/src/errors/SdError.mjs +0 -40
- package/dist/sd-core-common/src/errors/TimeoutError.d.ts +0 -11
- package/dist/sd-core-common/src/errors/TimeoutError.js.map +0 -1
- package/dist/sd-core-common/src/errors/TimeoutError.mjs +0 -16
- package/dist/sd-core-common/src/extensions/ArrayExtension.d.ts +0 -147
- package/dist/sd-core-common/src/extensions/ArrayExtension.js.map +0 -1
- package/dist/sd-core-common/src/extensions/ArrayExtension.mjs +0 -448
- package/dist/sd-core-common/src/extensions/MapExtension.d.ts +0 -4
- package/dist/sd-core-common/src/extensions/MapExtension.js.map +0 -1
- package/dist/sd-core-common/src/extensions/MapExtension.mjs +0 -15
- package/dist/sd-core-common/src/extensions/SetExtension.d.ts +0 -3
- package/dist/sd-core-common/src/extensions/SetExtension.js.map +0 -1
- package/dist/sd-core-common/src/extensions/SetExtension.mjs +0 -10
- package/dist/sd-core-common/src/index.d.ts +0 -32
- package/dist/sd-core-common/src/index.js.map +0 -1
- package/dist/sd-core-common/src/index.mjs +0 -33
- package/dist/sd-core-common/src/types/DateOnly.d.ts +0 -135
- package/dist/sd-core-common/src/types/DateOnly.js.map +0 -1
- package/dist/sd-core-common/src/types/DateOnly.mjs +0 -220
- package/dist/sd-core-common/src/types/DateTime.d.ts +0 -42
- package/dist/sd-core-common/src/types/DateTime.js.map +0 -1
- package/dist/sd-core-common/src/types/DateTime.mjs +0 -156
- package/dist/sd-core-common/src/types/DeepPartial.d.ts +0 -3
- package/dist/sd-core-common/src/types/DeepPartial.js.map +0 -1
- package/dist/sd-core-common/src/types/DeepPartial.mjs +0 -2
- package/dist/sd-core-common/src/types/ObjectSet.d.ts +0 -4
- package/dist/sd-core-common/src/types/ObjectSet.js.map +0 -1
- package/dist/sd-core-common/src/types/ObjectSet.mjs +0 -18
- package/dist/sd-core-common/src/types/Time.d.ts +0 -27
- package/dist/sd-core-common/src/types/Time.js.map +0 -1
- package/dist/sd-core-common/src/types/Time.mjs +0 -108
- package/dist/sd-core-common/src/types/Type.d.ts +0 -7
- package/dist/sd-core-common/src/types/Type.js.map +0 -1
- package/dist/sd-core-common/src/types/Type.mjs +0 -2
- package/dist/sd-core-common/src/types/UnwrappedType.d.ts +0 -1
- package/dist/sd-core-common/src/types/UnwrappedType.js.map +0 -1
- package/dist/sd-core-common/src/types/UnwrappedType.mjs +0 -2
- package/dist/sd-core-common/src/types/Uuid.d.ts +0 -8
- package/dist/sd-core-common/src/types/Uuid.js.map +0 -1
- package/dist/sd-core-common/src/types/Uuid.mjs +0 -26
- package/dist/sd-core-common/src/types/WrappedType.d.ts +0 -1
- package/dist/sd-core-common/src/types/WrappedType.js.map +0 -1
- package/dist/sd-core-common/src/types/WrappedType.mjs +0 -2
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.d.ts +0 -12
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.mjs +0 -67
- package/dist/sd-core-common/src/utils/FunctionQueue.d.ts +0 -8
- package/dist/sd-core-common/src/utils/FunctionQueue.js.map +0 -1
- package/dist/sd-core-common/src/utils/FunctionQueue.mjs +0 -46
- package/dist/sd-core-common/src/utils/FunctionUtil.d.ts +0 -6
- package/dist/sd-core-common/src/utils/FunctionUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/FunctionUtil.mjs +0 -31
- package/dist/sd-core-common/src/utils/JsonConvert.d.ts +0 -8
- package/dist/sd-core-common/src/utils/JsonConvert.js.map +0 -1
- package/dist/sd-core-common/src/utils/JsonConvert.mjs +0 -78
- package/dist/sd-core-common/src/utils/MathUtil.d.ts +0 -3
- package/dist/sd-core-common/src/utils/MathUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/MathUtil.mjs +0 -6
- package/dist/sd-core-common/src/utils/NumberUtil.d.ts +0 -6
- package/dist/sd-core-common/src/utils/NumberUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/NumberUtil.mjs +0 -32
- package/dist/sd-core-common/src/utils/ObjectUtil.d.ts +0 -80
- package/dist/sd-core-common/src/utils/ObjectUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/ObjectUtil.mjs +0 -452
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.d.ts +0 -6
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.js.map +0 -1
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.mjs +0 -27
- package/dist/sd-core-common/src/utils/StringUtil.d.ts +0 -8
- package/dist/sd-core-common/src/utils/StringUtil.js.map +0 -1
- package/dist/sd-core-common/src/utils/StringUtil.mjs +0 -77
- package/dist/sd-core-common/src/utils/Wait.d.ts +0 -4
- package/dist/sd-core-common/src/utils/Wait.js.map +0 -1
- package/dist/sd-core-common/src/utils/Wait.mjs +0 -23
- package/dist/sd-core-node/src/index.d.ts +0 -6
- package/dist/sd-core-node/src/index.js.map +0 -1
- package/dist/sd-core-node/src/index.mjs +0 -7
- package/dist/sd-core-node/src/utils/FsUtil.d.ts +0 -44
- package/dist/sd-core-node/src/utils/FsUtil.js.map +0 -1
- package/dist/sd-core-node/src/utils/FsUtil.mjs +0 -493
- package/dist/sd-core-node/src/utils/Logger.d.ts +0 -91
- package/dist/sd-core-node/src/utils/Logger.js.map +0 -1
- package/dist/sd-core-node/src/utils/Logger.mjs +0 -185
- package/dist/sd-core-node/src/utils/PathUtil.d.ts +0 -6
- package/dist/sd-core-node/src/utils/PathUtil.js.map +0 -1
- package/dist/sd-core-node/src/utils/PathUtil.mjs +0 -24
- package/dist/sd-core-node/src/utils/SdFsWatcher.d.ts +0 -15
- package/dist/sd-core-node/src/utils/SdFsWatcher.js.map +0 -1
- package/dist/sd-core-node/src/utils/SdFsWatcher.mjs +0 -43
- package/dist/sd-core-node/src/utils/SdProcess.d.ts +0 -5
- package/dist/sd-core-node/src/utils/SdProcess.js.map +0 -1
- package/dist/sd-core-node/src/utils/SdProcess.mjs +0 -36
- package/dist/sd-orm-common/src/CaseQueryHelper.d.ts +0 -12
- package/dist/sd-orm-common/src/CaseQueryHelper.js.map +0 -1
- package/dist/sd-orm-common/src/CaseQueryHelper.mjs +0 -19
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.d.ts +0 -12
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.js.map +0 -1
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.mjs +0 -20
- package/dist/sd-orm-common/src/DbContext.d.ts +0 -81
- package/dist/sd-orm-common/src/DbContext.js.map +0 -1
- package/dist/sd-orm-common/src/DbContext.mjs +0 -635
- package/dist/sd-orm-common/src/IDbConnection.d.ts +0 -15
- package/dist/sd-orm-common/src/IDbConnection.js.map +0 -1
- package/dist/sd-orm-common/src/IDbConnection.mjs +0 -2
- package/dist/sd-orm-common/src/IDbContextExecutor.d.ts +0 -17
- package/dist/sd-orm-common/src/IDbContextExecutor.js.map +0 -1
- package/dist/sd-orm-common/src/IDbContextExecutor.mjs +0 -2
- package/dist/sd-orm-common/src/IDbMigration.d.ts +0 -4
- package/dist/sd-orm-common/src/IDbMigration.js.map +0 -1
- package/dist/sd-orm-common/src/IDbMigration.mjs +0 -2
- package/dist/sd-orm-common/src/QueryBuilder.d.ts +0 -48
- package/dist/sd-orm-common/src/QueryBuilder.js.map +0 -1
- package/dist/sd-orm-common/src/QueryBuilder.mjs +0 -1022
- package/dist/sd-orm-common/src/QueryHelper.d.ts +0 -75
- package/dist/sd-orm-common/src/QueryHelper.js.map +0 -1
- package/dist/sd-orm-common/src/QueryHelper.mjs +0 -627
- package/dist/sd-orm-common/src/QueryUnit.d.ts +0 -10
- package/dist/sd-orm-common/src/QueryUnit.js.map +0 -1
- package/dist/sd-orm-common/src/QueryUnit.mjs +0 -16
- package/dist/sd-orm-common/src/Queryable.d.ts +0 -105
- package/dist/sd-orm-common/src/Queryable.js.map +0 -1
- package/dist/sd-orm-common/src/Queryable.mjs +0 -1375
- package/dist/sd-orm-common/src/SdOrmDataType.d.ts +0 -21
- package/dist/sd-orm-common/src/SdOrmDataType.js.map +0 -1
- package/dist/sd-orm-common/src/SdOrmDataType.mjs +0 -2
- package/dist/sd-orm-common/src/commons.d.ts +0 -400
- package/dist/sd-orm-common/src/commons.js.map +0 -1
- package/dist/sd-orm-common/src/commons.mjs +0 -8
- package/dist/sd-orm-common/src/decorators.d.ts +0 -29
- package/dist/sd-orm-common/src/decorators.js.map +0 -1
- package/dist/sd-orm-common/src/decorators.mjs +0 -89
- package/dist/sd-orm-common/src/index.d.ts +0 -17
- package/dist/sd-orm-common/src/index.js.map +0 -1
- package/dist/sd-orm-common/src/index.mjs +0 -18
- package/dist/sd-orm-common/src/models/SystemMigration.d.ts +0 -3
- package/dist/sd-orm-common/src/models/SystemMigration.js.map +0 -1
- package/dist/sd-orm-common/src/models/SystemMigration.mjs +0 -13
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.d.ts +0 -14
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.js.map +0 -1
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.mjs +0 -66
- package/dist/sd-orm-common/src/utils/SdOrmUtil.d.ts +0 -8
- package/dist/sd-orm-common/src/utils/SdOrmUtil.js.map +0 -1
- package/dist/sd-orm-common/src/utils/SdOrmUtil.mjs +0 -248
- package/dist/sd-orm-node/src/DbConnectionFactory.d.ts +0 -4
- package/dist/sd-orm-node/src/DbConnectionFactory.js.map +0 -1
- package/dist/sd-orm-node/src/DbConnectionFactory.mjs +0 -17
- package/dist/sd-orm-node/src/NodeDbContextExecutor.d.ts +0 -19
- package/dist/sd-orm-node/src/NodeDbContextExecutor.js.map +0 -1
- package/dist/sd-orm-node/src/NodeDbContextExecutor.mjs +0 -71
- package/dist/sd-orm-node/src/SdOrm.d.ts +0 -10
- package/dist/sd-orm-node/src/SdOrm.js.map +0 -1
- package/dist/sd-orm-node/src/SdOrm.mjs +0 -25
- package/dist/sd-orm-node/src/index.d.ts +0 -4
- package/dist/sd-orm-node/src/index.js.map +0 -1
- package/dist/sd-orm-node/src/index.mjs +0 -5
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.d.ts +0 -25
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.js.map +0 -1
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.mjs +0 -321
- package/dist/sd-orm-node-mssql/src/index.d.ts +0 -2
- package/dist/sd-orm-node-mssql/src/index.js.map +0 -1
- package/dist/sd-orm-node-mssql/src/index.mjs +0 -3
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.d.ts +0 -22
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.js.map +0 -1
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.mjs +0 -200
- package/dist/sd-orm-node-mysql/src/index.d.ts +0 -2
- package/dist/sd-orm-node-mysql/src/index.js.map +0 -1
- package/dist/sd-orm-node-mysql/src/index.mjs +0 -3
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.d.ts +0 -22
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.js.map +0 -1
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.mjs +0 -172
- package/dist/sd-orm-node-sqlite/src/index.d.ts +0 -2
- package/dist/sd-orm-node-sqlite/src/index.js.map +0 -1
- package/dist/sd-orm-node-sqlite/src/index.mjs +0 -3
- package/dist/sd-service-common/src/commons-orm.d.ts +0 -4
- package/dist/sd-service-common/src/commons-orm.js.map +0 -1
- package/dist/sd-service-common/src/commons-orm.mjs +0 -2
- package/dist/sd-service-common/src/commons-smtp.d.ts +0 -29
- package/dist/sd-service-common/src/commons-smtp.js.map +0 -1
- package/dist/sd-service-common/src/commons-smtp.mjs +0 -2
- package/dist/sd-service-common/src/commons.d.ts +0 -57
- package/dist/sd-service-common/src/commons.js.map +0 -1
- package/dist/sd-service-common/src/commons.mjs +0 -3
- package/dist/sd-service-common/src/index.d.ts +0 -3
- package/dist/sd-service-common/src/index.js.map +0 -1
- package/dist/sd-service-common/src/index.mjs +0 -4
- package/dist/sd-service-server/src/ApiServiceError.d.ts +0 -12
- package/dist/sd-service-server/src/ApiServiceError.js.map +0 -1
- package/dist/sd-service-server/src/ApiServiceError.mjs +0 -15
- package/dist/sd-service-server/src/SdServiceServer.d.ts +0 -39
- package/dist/sd-service-server/src/SdServiceServer.js.map +0 -1
- package/dist/sd-service-server/src/SdServiceServer.mjs +0 -513
- package/dist/sd-service-server/src/commons.d.ts +0 -23
- package/dist/sd-service-server/src/commons.js.map +0 -1
- package/dist/sd-service-server/src/commons.mjs +0 -3
- package/dist/sd-service-server/src/index.d.ts +0 -8
- package/dist/sd-service-server/src/index.js.map +0 -1
- package/dist/sd-service-server/src/index.mjs +0 -9
- package/dist/sd-service-server/src/services/SdAutoUpdateService.d.ts +0 -4
- package/dist/sd-service-server/src/services/SdAutoUpdateService.js.map +0 -1
- package/dist/sd-service-server/src/services/SdAutoUpdateService.mjs +0 -20
- package/dist/sd-service-server/src/services/SdCryptoService.d.ts +0 -7
- package/dist/sd-service-server/src/services/SdCryptoService.js.map +0 -1
- package/dist/sd-service-server/src/services/SdCryptoService.mjs +0 -39
- package/dist/sd-service-server/src/services/SdOrmService.d.ts +0 -22
- package/dist/sd-service-server/src/services/SdOrmService.js.map +0 -1
- package/dist/sd-service-server/src/services/SdOrmService.mjs +0 -115
- package/dist/sd-service-server/src/services/SdSmtpClientService.d.ts +0 -6
- package/dist/sd-service-server/src/services/SdSmtpClientService.js.map +0 -1
- package/dist/sd-service-server/src/services/SdSmtpClientService.mjs +0 -44
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.d.ts +0 -4
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.js.map +0 -1
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.mjs +0 -36
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type TSdOrmDataType = ISdOrmDataTypeOfText | ISdOrmDataTypeOfDecimal | ISdOrmDataTypeOfString | ISdOrmDataTypeOfFixString | ISdOrmDataTypeOfBinary;
|
|
2
|
-
export interface ISdOrmDataTypeOfText {
|
|
3
|
-
type: "TEXT";
|
|
4
|
-
}
|
|
5
|
-
export interface ISdOrmDataTypeOfDecimal {
|
|
6
|
-
type: "DECIMAL";
|
|
7
|
-
precision: number;
|
|
8
|
-
digits?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface ISdOrmDataTypeOfString {
|
|
11
|
-
type: "STRING";
|
|
12
|
-
length?: number | "MAX";
|
|
13
|
-
}
|
|
14
|
-
export interface ISdOrmDataTypeOfFixString {
|
|
15
|
-
type: "FIXSTRING";
|
|
16
|
-
length: number;
|
|
17
|
-
}
|
|
18
|
-
export interface ISdOrmDataTypeOfBinary {
|
|
19
|
-
type: "BINARY";
|
|
20
|
-
length?: number | "MAX";
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SdOrmDataType.js","sourceRoot":"","sources":["../../../../sd-orm-common/src/SdOrmDataType.ts"],"names":[],"mappings":""}
|
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
import { TFlatType, Type, UnwrappedType, WrappedType } from "@simplysm/sd-core-common";
|
|
2
|
-
import { QueryUnit } from "./QueryUnit";
|
|
3
|
-
import { DbContext } from "./DbContext";
|
|
4
|
-
import { Queryable } from "./Queryable";
|
|
5
|
-
import { TSdOrmDataType } from "./SdOrmDataType";
|
|
6
|
-
export type TQueryBuilderValue = string | ISelectQueryDef | TQueryBuilderValue[];
|
|
7
|
-
export type TQueryDef = ((ISelectQueryDef & {
|
|
8
|
-
type: "select";
|
|
9
|
-
}) | (IInsertIntoQueryDef & {
|
|
10
|
-
type: "insertInto";
|
|
11
|
-
}) | (IInsertQueryDef & {
|
|
12
|
-
type: "insert";
|
|
13
|
-
}) | (IUpdateQueryDef & {
|
|
14
|
-
type: "update";
|
|
15
|
-
}) | (IDeleteQueryDef & {
|
|
16
|
-
type: "delete";
|
|
17
|
-
}) | (IInsertIfNotExistsQueryDef & {
|
|
18
|
-
type: "insertIfNotExists";
|
|
19
|
-
}) | (IUpsertQueryDef & {
|
|
20
|
-
type: "upsert";
|
|
21
|
-
}) | (ITruncateTableQueryDef & {
|
|
22
|
-
type: "truncateTable";
|
|
23
|
-
}) | (ICreateDatabaseIfNotExistsQueryDef & {
|
|
24
|
-
type: "createDatabaseIfNotExists";
|
|
25
|
-
}) | (IClearDatabaseIfExistsQueryDef & {
|
|
26
|
-
type: "clearDatabaseIfExists";
|
|
27
|
-
}) | (IGetDatabaseInfoDef & {
|
|
28
|
-
type: "getDatabaseInfo";
|
|
29
|
-
}) | (IGetTableInfosDef & {
|
|
30
|
-
type: "getTableInfos";
|
|
31
|
-
}) | (IGetTableInfoDef & {
|
|
32
|
-
type: "getTableInfo";
|
|
33
|
-
}) | (IGetTableColumnInfosDef & {
|
|
34
|
-
type: "getTableColumnInfos";
|
|
35
|
-
}) | (IGetTablePrimaryKeysDef & {
|
|
36
|
-
type: "getTablePrimaryKeys";
|
|
37
|
-
}) | (IGetTableForeignKeysDef & {
|
|
38
|
-
type: "getTableForeignKeys";
|
|
39
|
-
}) | (IGetTableIndexesDef & {
|
|
40
|
-
type: "getTableIndexes";
|
|
41
|
-
}) | (ICreateTableQueryDef & {
|
|
42
|
-
type: "createTable";
|
|
43
|
-
}) | (ICreateViewQueryDef & {
|
|
44
|
-
type: "createView";
|
|
45
|
-
}) | (IDropTableQueryDef & {
|
|
46
|
-
type: "dropTable";
|
|
47
|
-
}) | (IAddColumnQueryDef & {
|
|
48
|
-
type: "addColumn";
|
|
49
|
-
}) | (IRemoveColumnQueryDef & {
|
|
50
|
-
type: "removeColumn";
|
|
51
|
-
}) | (IModifyColumnQueryDef & {
|
|
52
|
-
type: "modifyColumn";
|
|
53
|
-
}) | (IRenameColumnQueryDef & {
|
|
54
|
-
type: "renameColumn";
|
|
55
|
-
}) | (IDropPrimaryKeyQueryDef & {
|
|
56
|
-
type: "dropPrimaryKey";
|
|
57
|
-
}) | (IAddPrimaryKeyQueryDef & {
|
|
58
|
-
type: "addPrimaryKey";
|
|
59
|
-
}) | (IAddForeignKeyQueryDef & {
|
|
60
|
-
type: "addForeignKey";
|
|
61
|
-
}) | (IRemoveForeignKeyQueryDef & {
|
|
62
|
-
type: "removeForeignKey";
|
|
63
|
-
}) | (ICreateIndexQueryDef & {
|
|
64
|
-
type: "createIndex";
|
|
65
|
-
}) | (IDropIndexQueryDef & {
|
|
66
|
-
type: "dropIndex";
|
|
67
|
-
}) | (IConfigIdentityInsertQueryDef & {
|
|
68
|
-
type: "configIdentityInsert";
|
|
69
|
-
}) | (IConfigForeignKeyCheckQueryDef & {
|
|
70
|
-
type: "configForeignKeyCheck";
|
|
71
|
-
}));
|
|
72
|
-
export type TDbDateSeparator = "year" | "quarter" | "month" | "day" | "week" | "hour" | "minute" | "second" | "millisecond" | "microsecond" | "nanosecond";
|
|
73
|
-
export interface IQueryTableNameDef {
|
|
74
|
-
database?: string;
|
|
75
|
-
schema?: string;
|
|
76
|
-
name: string;
|
|
77
|
-
}
|
|
78
|
-
export interface IQueryColumnDef {
|
|
79
|
-
name: string;
|
|
80
|
-
dataType: Type<TQueryValue> | TSdOrmDataType | string;
|
|
81
|
-
autoIncrement?: boolean;
|
|
82
|
-
nullable?: boolean;
|
|
83
|
-
}
|
|
84
|
-
export interface IQueryPrimaryKeyDef {
|
|
85
|
-
columnName: string;
|
|
86
|
-
orderBy: "ASC" | "DESC";
|
|
87
|
-
}
|
|
88
|
-
export interface ICreateTableQueryDef {
|
|
89
|
-
table: IQueryTableNameDef;
|
|
90
|
-
columns: IQueryColumnDef[];
|
|
91
|
-
primaryKeys: IQueryPrimaryKeyDef[];
|
|
92
|
-
}
|
|
93
|
-
export interface ICreateViewQueryDef {
|
|
94
|
-
table: IQueryTableNameDef;
|
|
95
|
-
queryDef: ISelectQueryDef;
|
|
96
|
-
}
|
|
97
|
-
export interface ICreateDatabaseIfNotExistsQueryDef {
|
|
98
|
-
database: string;
|
|
99
|
-
}
|
|
100
|
-
export interface IClearDatabaseIfExistsQueryDef {
|
|
101
|
-
database: string;
|
|
102
|
-
}
|
|
103
|
-
export interface IGetDatabaseInfoDef {
|
|
104
|
-
database: string;
|
|
105
|
-
}
|
|
106
|
-
export interface IGetTableInfosDef {
|
|
107
|
-
database?: string;
|
|
108
|
-
schema?: string;
|
|
109
|
-
}
|
|
110
|
-
export interface IGetTableInfoDef {
|
|
111
|
-
table: IQueryTableNameDef;
|
|
112
|
-
}
|
|
113
|
-
export interface IGetTableColumnInfosDef {
|
|
114
|
-
table: IQueryTableNameDef;
|
|
115
|
-
}
|
|
116
|
-
export interface IGetTablePrimaryKeysDef {
|
|
117
|
-
table: IQueryTableNameDef;
|
|
118
|
-
}
|
|
119
|
-
export interface IGetTableForeignKeysDef {
|
|
120
|
-
table: IQueryTableNameDef;
|
|
121
|
-
}
|
|
122
|
-
export interface IGetTableIndexesDef {
|
|
123
|
-
table: IQueryTableNameDef;
|
|
124
|
-
}
|
|
125
|
-
export interface IDropTableQueryDef {
|
|
126
|
-
table: IQueryTableNameDef;
|
|
127
|
-
}
|
|
128
|
-
export interface IAddColumnQueryDef {
|
|
129
|
-
table: IQueryTableNameDef;
|
|
130
|
-
column: IQueryColumnDef & {
|
|
131
|
-
defaultValue?: TQueryBuilderValue;
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
export interface IRemoveColumnQueryDef {
|
|
135
|
-
table: IQueryTableNameDef;
|
|
136
|
-
column: string;
|
|
137
|
-
}
|
|
138
|
-
export interface IModifyColumnQueryDef {
|
|
139
|
-
table: IQueryTableNameDef;
|
|
140
|
-
column: IQueryColumnDef & {
|
|
141
|
-
defaultValue?: TQueryBuilderValue;
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
export interface IRenameColumnQueryDef {
|
|
145
|
-
table: IQueryTableNameDef;
|
|
146
|
-
prevName: string;
|
|
147
|
-
nextName: string;
|
|
148
|
-
}
|
|
149
|
-
export interface IDropPrimaryKeyQueryDef {
|
|
150
|
-
table: IQueryTableNameDef;
|
|
151
|
-
}
|
|
152
|
-
export interface IAddPrimaryKeyQueryDef {
|
|
153
|
-
table: IQueryTableNameDef;
|
|
154
|
-
columns: string[];
|
|
155
|
-
}
|
|
156
|
-
export interface IAddForeignKeyQueryDef {
|
|
157
|
-
table: IQueryTableNameDef;
|
|
158
|
-
foreignKey: {
|
|
159
|
-
name: string;
|
|
160
|
-
fkColumns: string[];
|
|
161
|
-
targetTable: IQueryTableNameDef;
|
|
162
|
-
targetPkColumns: string[];
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
export interface IRemoveForeignKeyQueryDef {
|
|
166
|
-
table: IQueryTableNameDef;
|
|
167
|
-
foreignKey: string;
|
|
168
|
-
}
|
|
169
|
-
export interface ICreateIndexQueryDef {
|
|
170
|
-
table: IQueryTableNameDef;
|
|
171
|
-
index: {
|
|
172
|
-
name: string;
|
|
173
|
-
columns: {
|
|
174
|
-
name: string;
|
|
175
|
-
orderBy: "ASC" | "DESC";
|
|
176
|
-
unique: boolean;
|
|
177
|
-
}[];
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
export interface IDropIndexQueryDef {
|
|
181
|
-
table: IQueryTableNameDef;
|
|
182
|
-
index: string;
|
|
183
|
-
}
|
|
184
|
-
export interface IConfigIdentityInsertQueryDef {
|
|
185
|
-
table: IQueryTableNameDef;
|
|
186
|
-
state: "on" | "off";
|
|
187
|
-
}
|
|
188
|
-
export interface IConfigForeignKeyCheckQueryDef {
|
|
189
|
-
table: IQueryTableNameDef;
|
|
190
|
-
useCheck: boolean;
|
|
191
|
-
}
|
|
192
|
-
export interface ISelectQueryDef {
|
|
193
|
-
from?: string | ISelectQueryDef | ISelectQueryDef[];
|
|
194
|
-
as?: string;
|
|
195
|
-
join?: IJoinQueryDef[];
|
|
196
|
-
distinct?: true;
|
|
197
|
-
where?: TQueryBuilderValue[];
|
|
198
|
-
top?: number;
|
|
199
|
-
groupBy?: TQueryBuilderValue[];
|
|
200
|
-
having?: TQueryBuilderValue[];
|
|
201
|
-
orderBy?: [TQueryBuilderValue, "ASC" | "DESC"][];
|
|
202
|
-
limit?: [number, number];
|
|
203
|
-
pivot?: {
|
|
204
|
-
valueColumn: TQueryBuilderValue;
|
|
205
|
-
pivotColumn: TQueryBuilderValue;
|
|
206
|
-
pivotKeys: string[];
|
|
207
|
-
};
|
|
208
|
-
unpivot?: {
|
|
209
|
-
valueColumn: TQueryBuilderValue;
|
|
210
|
-
pivotColumn: TQueryBuilderValue;
|
|
211
|
-
pivotKeys: string[];
|
|
212
|
-
};
|
|
213
|
-
lock?: boolean;
|
|
214
|
-
sample?: number;
|
|
215
|
-
select?: Record<string, TQueryBuilderValue>;
|
|
216
|
-
}
|
|
217
|
-
export interface IJoinQueryDef extends ISelectQueryDef {
|
|
218
|
-
isCustomSelect: boolean;
|
|
219
|
-
}
|
|
220
|
-
export interface IInsertIntoQueryDef extends ISelectQueryDef {
|
|
221
|
-
select: Record<string, TQueryBuilderValue>;
|
|
222
|
-
target: string;
|
|
223
|
-
}
|
|
224
|
-
export interface IInsertQueryDef {
|
|
225
|
-
from: string;
|
|
226
|
-
record: Record<string, string>;
|
|
227
|
-
output?: string[];
|
|
228
|
-
}
|
|
229
|
-
export interface IUpdateQueryDef extends ISelectQueryDef {
|
|
230
|
-
from: string;
|
|
231
|
-
record: Record<string, string>;
|
|
232
|
-
output?: string[];
|
|
233
|
-
}
|
|
234
|
-
export interface IInsertIfNotExistsQueryDef {
|
|
235
|
-
from: string;
|
|
236
|
-
as: string;
|
|
237
|
-
insertRecord: Record<string, string>;
|
|
238
|
-
where: TQueryBuilderValue[];
|
|
239
|
-
output?: string[];
|
|
240
|
-
}
|
|
241
|
-
export interface IUpsertQueryDef {
|
|
242
|
-
from: string;
|
|
243
|
-
as: string;
|
|
244
|
-
updateRecord: Record<string, string>;
|
|
245
|
-
insertRecord: Record<string, string>;
|
|
246
|
-
where: TQueryBuilderValue[];
|
|
247
|
-
output?: string[];
|
|
248
|
-
}
|
|
249
|
-
export interface ITruncateTableQueryDef {
|
|
250
|
-
table: IQueryTableNameDef;
|
|
251
|
-
}
|
|
252
|
-
export interface IDeleteQueryDef extends ISelectQueryDef {
|
|
253
|
-
from: string;
|
|
254
|
-
output?: string[];
|
|
255
|
-
}
|
|
256
|
-
export interface IQueryResultParseOption {
|
|
257
|
-
columns?: Record<string, {
|
|
258
|
-
dataType: string | undefined;
|
|
259
|
-
}>;
|
|
260
|
-
joins?: Record<string, {
|
|
261
|
-
isSingle: boolean;
|
|
262
|
-
}>;
|
|
263
|
-
}
|
|
264
|
-
export type TQueryValue = TFlatType;
|
|
265
|
-
export type TStrippedQueryValue = UnwrappedType<TQueryValue>;
|
|
266
|
-
export interface ITableNameDef {
|
|
267
|
-
database?: string;
|
|
268
|
-
schema?: string;
|
|
269
|
-
name: string;
|
|
270
|
-
}
|
|
271
|
-
export interface ITableDef extends ITableNameDef {
|
|
272
|
-
description: string;
|
|
273
|
-
columns: IColumnDef[];
|
|
274
|
-
foreignKeys: IForeignKeyDef[];
|
|
275
|
-
foreignKeyTargets: IForeignKeyTargetDef[];
|
|
276
|
-
indexes: IIndexDef[];
|
|
277
|
-
referenceKeys: IReferenceKeyDef[];
|
|
278
|
-
referenceKeyTargets: IReferenceKeyTargetDef[];
|
|
279
|
-
view?: (db: any) => Queryable<DbContext, any>;
|
|
280
|
-
}
|
|
281
|
-
export interface IColumnDef {
|
|
282
|
-
description?: string;
|
|
283
|
-
propertyKey: string;
|
|
284
|
-
name: string;
|
|
285
|
-
dataType?: Type<TQueryValue> | TSdOrmDataType | string;
|
|
286
|
-
nullable?: boolean;
|
|
287
|
-
autoIncrement?: boolean;
|
|
288
|
-
primaryKey?: number;
|
|
289
|
-
typeFwd: () => Type<TStrippedQueryValue>;
|
|
290
|
-
}
|
|
291
|
-
export interface IForeignKeyDef {
|
|
292
|
-
description?: string;
|
|
293
|
-
propertyKey: string;
|
|
294
|
-
name: string;
|
|
295
|
-
columnPropertyKeys: string[];
|
|
296
|
-
targetTypeFwd: () => Type<any>;
|
|
297
|
-
}
|
|
298
|
-
export interface IForeignKeyTargetDef {
|
|
299
|
-
description?: string;
|
|
300
|
-
propertyKey: string;
|
|
301
|
-
name: string;
|
|
302
|
-
sourceKeyPropertyKey: string;
|
|
303
|
-
sourceTypeFwd: () => Type<any>;
|
|
304
|
-
}
|
|
305
|
-
export interface IIndexDef {
|
|
306
|
-
description?: string;
|
|
307
|
-
name: string;
|
|
308
|
-
columns: {
|
|
309
|
-
columnPropertyKey: string;
|
|
310
|
-
order: number;
|
|
311
|
-
orderBy: "ASC" | "DESC";
|
|
312
|
-
unique: boolean;
|
|
313
|
-
}[];
|
|
314
|
-
}
|
|
315
|
-
export interface IReferenceKeyDef {
|
|
316
|
-
description?: string;
|
|
317
|
-
propertyKey: string;
|
|
318
|
-
name: string;
|
|
319
|
-
columnPropertyKeys: string[];
|
|
320
|
-
targetTypeFwd: () => Type<any>;
|
|
321
|
-
}
|
|
322
|
-
export interface IReferenceKeyTargetDef {
|
|
323
|
-
description?: string;
|
|
324
|
-
propertyKey: string;
|
|
325
|
-
name: string;
|
|
326
|
-
sourceKeyPropertyKey: string;
|
|
327
|
-
sourceTypeFwd: () => Type<any>;
|
|
328
|
-
}
|
|
329
|
-
export type TEntityValue<T extends TQueryValue> = T | QueryUnit<T>;
|
|
330
|
-
export type TEntityValueOrQueryable<D extends DbContext, T extends TQueryValue> = TEntityValue<T> | Queryable<D, T>;
|
|
331
|
-
export type TEntityValueOrQueryableOrArray<D extends DbContext, T extends TQueryValue> = TEntityValueOrQueryable<D, T> | TEntityValueOrQueryableOrArray<D, T>[];
|
|
332
|
-
export type TEntity<T> = {
|
|
333
|
-
[K in keyof T]-?: T[K] extends TQueryValue ? QueryUnit<T[K]> : T[K] extends (infer A)[] ? TEntity<A>[] : TEntity<T[K]>;
|
|
334
|
-
};
|
|
335
|
-
export type TSelectEntity<T> = {
|
|
336
|
-
[K in keyof T]: T[K] extends TQueryValue ? QueryUnit<T[K]> : T[K] extends (infer A)[] ? TEntity<A>[] : TEntity<T[K]>;
|
|
337
|
-
};
|
|
338
|
-
export type TEntityUnwrap<T> = {
|
|
339
|
-
[K in keyof T]: T[K] extends QueryUnit<any> ? T[K]["T"] : T[K] extends (infer A)[] ? TEntityUnwrap<A>[] : TEntityUnwrap<T[K]>;
|
|
340
|
-
};
|
|
341
|
-
export type TIncludeEntity<T> = {
|
|
342
|
-
[K in keyof T]-?: T[K] extends TQueryValue ? QueryUnit<T[K]> : T[K] extends (infer A)[] ? TIncludeEntity<A>[] : TIncludeEntity<T[K]>;
|
|
343
|
-
};
|
|
344
|
-
export interface IQueryableDef {
|
|
345
|
-
from: string | ISelectQueryDef | ISelectQueryDef[];
|
|
346
|
-
join?: (IJoinQueryDef & {
|
|
347
|
-
isSingle: boolean;
|
|
348
|
-
})[];
|
|
349
|
-
distinct?: true;
|
|
350
|
-
where?: TQueryBuilderValue[];
|
|
351
|
-
top?: number;
|
|
352
|
-
groupBy?: TQueryBuilderValue[];
|
|
353
|
-
having?: TQueryBuilderValue[];
|
|
354
|
-
orderBy?: [TQueryBuilderValue, "ASC" | "DESC"][];
|
|
355
|
-
limit?: [number, number];
|
|
356
|
-
pivot?: {
|
|
357
|
-
valueColumn: TQueryBuilderValue;
|
|
358
|
-
pivotColumn: TQueryBuilderValue;
|
|
359
|
-
pivotKeys: string[];
|
|
360
|
-
};
|
|
361
|
-
unpivot?: {
|
|
362
|
-
valueColumn: TQueryBuilderValue;
|
|
363
|
-
pivotColumn: TQueryBuilderValue;
|
|
364
|
-
pivotKeys: string[];
|
|
365
|
-
};
|
|
366
|
-
lock?: boolean;
|
|
367
|
-
sample?: number;
|
|
368
|
-
}
|
|
369
|
-
export type TQueryValuePropertyNames<T> = {
|
|
370
|
-
[K in keyof T]: undefined extends T[K] ? never : T[K] extends TQueryValue ? K : never;
|
|
371
|
-
}[keyof T];
|
|
372
|
-
export type TUndefinedPropertyNames<T> = {
|
|
373
|
-
[K in keyof T]: undefined extends T[K] ? K : never;
|
|
374
|
-
}[keyof T];
|
|
375
|
-
export type TOnlyQueryValueProperty<T> = Pick<T, TQueryValuePropertyNames<T>> & Partial<Pick<T, TUndefinedPropertyNames<T>>>;
|
|
376
|
-
export type TInsertObject<T> = TOnlyQueryValueProperty<T>;
|
|
377
|
-
export type TUpdateObject<T> = TOnlyQueryValueProperty<{
|
|
378
|
-
[K in keyof T]?: T[K] | QueryUnit<T[K]> | QueryUnit<WrappedType<T[K]>>;
|
|
379
|
-
}>;
|
|
380
|
-
export type TDbConnectionConfig = IDefaultDbConnectionConfig | ISqliteDbConnectionConfig;
|
|
381
|
-
export interface IDefaultDbConnectionConfig {
|
|
382
|
-
dialect: "mysql" | "mssql" | "mssql-azure";
|
|
383
|
-
host: string;
|
|
384
|
-
port?: number;
|
|
385
|
-
username: string;
|
|
386
|
-
password: string;
|
|
387
|
-
database?: string;
|
|
388
|
-
schema?: string;
|
|
389
|
-
defaultIsolationLevel?: ISOLATION_LEVEL;
|
|
390
|
-
}
|
|
391
|
-
export interface ISqliteDbConnectionConfig {
|
|
392
|
-
dialect: "sqlite";
|
|
393
|
-
filePath: string;
|
|
394
|
-
}
|
|
395
|
-
export declare enum ISOLATION_LEVEL {
|
|
396
|
-
READ_UNCOMMITTED = "READ_UNCOMMITTED",
|
|
397
|
-
READ_COMMITTED = "READ_COMMITTED",
|
|
398
|
-
REPEATABLE_READ = "REPEATABLE_READ",
|
|
399
|
-
SERIALIZABLE = "SERIALIZABLE"
|
|
400
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commons.js","sourceRoot":"","sources":["../../../../sd-orm-common/src/commons.ts"],"names":[],"mappings":"AAwdA,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,wDAAqC,CAAA;IACrC,oDAAiC,CAAA;IACjC,sDAAmC,CAAA;IACnC,gDAA6B,CAAA;AAC/B,CAAC,EALW,eAAe,KAAf,eAAe,QAK1B"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export var ISOLATION_LEVEL;
|
|
2
|
-
(function (ISOLATION_LEVEL) {
|
|
3
|
-
ISOLATION_LEVEL["READ_UNCOMMITTED"] = "READ_UNCOMMITTED";
|
|
4
|
-
ISOLATION_LEVEL["READ_COMMITTED"] = "READ_COMMITTED";
|
|
5
|
-
ISOLATION_LEVEL["REPEATABLE_READ"] = "REPEATABLE_READ";
|
|
6
|
-
ISOLATION_LEVEL["SERIALIZABLE"] = "SERIALIZABLE";
|
|
7
|
-
})(ISOLATION_LEVEL || (ISOLATION_LEVEL = {}));
|
|
8
|
-
//# sourceMappingURL=commons.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { TClassDecoratorReturn, TPropertyDecoratorReturn, Type } from "@simplysm/sd-core-common";
|
|
2
|
-
import { TSdOrmDataType } from "./SdOrmDataType";
|
|
3
|
-
import { DbContext } from "./DbContext";
|
|
4
|
-
import { Queryable } from "./Queryable";
|
|
5
|
-
export declare function Table<T>(def: {
|
|
6
|
-
description: string;
|
|
7
|
-
database?: string;
|
|
8
|
-
schema?: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
view?: (db: any) => Queryable<DbContext, any>;
|
|
11
|
-
}): TClassDecoratorReturn<T>;
|
|
12
|
-
export declare function Column<T extends object>(columnDef: {
|
|
13
|
-
description: string;
|
|
14
|
-
name?: string;
|
|
15
|
-
dataType?: TSdOrmDataType;
|
|
16
|
-
nullable?: boolean;
|
|
17
|
-
autoIncrement?: boolean;
|
|
18
|
-
primaryKey?: number;
|
|
19
|
-
}): TPropertyDecoratorReturn<T>;
|
|
20
|
-
export declare function ForeignKey<T>(columnNames: (keyof T)[], targetTypeFwd: () => Type<any>, description: string): TPropertyDecoratorReturn<Partial<T>>;
|
|
21
|
-
export declare function ForeignKeyTarget<T extends object, P>(sourceTypeFwd: () => Type<P>, foreignKeyPropertyKey: keyof P, description: string): TPropertyDecoratorReturn<T>;
|
|
22
|
-
export declare function Index<T extends object>(def?: {
|
|
23
|
-
name?: string;
|
|
24
|
-
order?: number;
|
|
25
|
-
orderBy?: "ASC" | "DESC";
|
|
26
|
-
unique?: boolean;
|
|
27
|
-
}): TPropertyDecoratorReturn<T>;
|
|
28
|
-
export declare function ReferenceKey<T>(columnNames: (keyof T)[], targetTypeFwd: () => Type<any>, description: string): TPropertyDecoratorReturn<Partial<T>>;
|
|
29
|
-
export declare function ReferenceKeyTarget<T extends object, P>(sourceTypeFwd: () => Type<P>, referenceKeyPropertyKey: keyof P, description: string): TPropertyDecoratorReturn<T>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../sd-orm-common/src/decorators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D,MAAM,UAAU,KAAK,CAAI,GAMxB;IACC,OAAO,CAAC,SAAkB,EAAQ,EAAE;QAClC,gBAAgB,CAAC,aAAa,CAAC,SAAS,EAAE;YACxC,IAAI,EAAE,SAAS,CAAC,IAAI;YACpB,GAAG,GAAG;SACP,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,MAAM,CAAmB,SAOxC;IACC,OAAO,CAAC,MAAS,EAAE,WAAmB,EAAQ,EAAE;QAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,WAAsB,CAAC;QAEhD,gBAAgB,CAAC,YAAY,CAAC,SAAS,EAAE;YACvC,WAAW;YACX,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,WAAW;YACnC,QAAQ,EAAE,SAAS,CAAC,QAAQ;YAC5B,QAAQ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;oBACE,iBAAiB,EAAE,WAAW;oBAC9B,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;oBACtB,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,KAAK;oBAC9B,MAAM,EAAE,GAAG,EAAE,MAAM,IAAI,KAAK;iBAC7B;aACF;SACF,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,WAAwB,EACxB,aAA8B,EAC9B,WAAmB;IAEnB,OAAO,CAAC,MAAkB,EAAE,WAAmB,EAAQ,EAAE;QACvD,MAAM,SAAS,GAAG,MAAM,CAAC,WAAsB,CAAC;QAEhD,gBAAgB,CAAC,kBAAkB,CAAC,SAAS,EAAE;YAC7C,WAAW;YACX,IAAI,EAAE,WAAW;YACjB,kBAAkB,EAAE,WAAuB;YAC3C,WAAW;YACX,aAAa;SACd,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,aAA4B,EAC5B,uBAAgC,EAChC,WAAmB;IAEnB,OAAO,CAAC,MAAS,EAAE,WAAmB,EAAQ,EAAE;QAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,WAAsB,CAAC;QAEhD,gBAAgB,CAAC,wBAAwB,CAAC,SAAS,EAAE;YACnD,WAAW;YACX,IAAI,EAAE,WAAW;YACjB,aAAa;YACb,WAAW;YACX,oBAAoB,EAAE,uBAAiC;SACxD,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { DbDefinitionUtil } from "./utils/DbDefinitionUtil";
|
|
2
|
-
export function Table(def) {
|
|
3
|
-
return (classType) => {
|
|
4
|
-
DbDefinitionUtil.mergeTableDef(classType, {
|
|
5
|
-
name: classType.name,
|
|
6
|
-
...def
|
|
7
|
-
});
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export function Column(columnDef) {
|
|
11
|
-
return (object, propertyKey) => {
|
|
12
|
-
const classType = object.constructor;
|
|
13
|
-
DbDefinitionUtil.addColumnDef(classType, {
|
|
14
|
-
propertyKey,
|
|
15
|
-
name: columnDef.name ?? propertyKey,
|
|
16
|
-
dataType: columnDef.dataType,
|
|
17
|
-
nullable: columnDef.nullable,
|
|
18
|
-
autoIncrement: columnDef.autoIncrement,
|
|
19
|
-
primaryKey: columnDef.primaryKey,
|
|
20
|
-
description: columnDef.description,
|
|
21
|
-
typeFwd: () => Reflect.getMetadata("design:type", object, propertyKey)
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export function ForeignKey(columnNames, targetTypeFwd, description) {
|
|
26
|
-
return (object, propertyKey) => {
|
|
27
|
-
const classType = object.constructor;
|
|
28
|
-
DbDefinitionUtil.addForeignKeyDef(classType, {
|
|
29
|
-
propertyKey,
|
|
30
|
-
name: propertyKey,
|
|
31
|
-
columnPropertyKeys: columnNames,
|
|
32
|
-
description,
|
|
33
|
-
targetTypeFwd
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export function ForeignKeyTarget(sourceTypeFwd, foreignKeyPropertyKey, description) {
|
|
38
|
-
return (object, propertyKey) => {
|
|
39
|
-
const classType = object.constructor;
|
|
40
|
-
DbDefinitionUtil.addForeignKeyTargetDef(classType, {
|
|
41
|
-
propertyKey,
|
|
42
|
-
name: propertyKey,
|
|
43
|
-
sourceTypeFwd,
|
|
44
|
-
description,
|
|
45
|
-
sourceKeyPropertyKey: foreignKeyPropertyKey
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
export function Index(def) {
|
|
50
|
-
return (object, propertyKey) => {
|
|
51
|
-
const classType = object.constructor;
|
|
52
|
-
DbDefinitionUtil.addIndexDef(classType, {
|
|
53
|
-
name: def?.name ?? propertyKey,
|
|
54
|
-
columns: [
|
|
55
|
-
{
|
|
56
|
-
columnPropertyKey: propertyKey,
|
|
57
|
-
order: def?.order ?? 1,
|
|
58
|
-
orderBy: def?.orderBy ?? "ASC",
|
|
59
|
-
unique: def?.unique ?? false
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export function ReferenceKey(columnNames, targetTypeFwd, description) {
|
|
66
|
-
return (object, propertyKey) => {
|
|
67
|
-
const classType = object.constructor;
|
|
68
|
-
DbDefinitionUtil.addReferenceKeyDef(classType, {
|
|
69
|
-
propertyKey,
|
|
70
|
-
name: propertyKey,
|
|
71
|
-
columnPropertyKeys: columnNames,
|
|
72
|
-
description,
|
|
73
|
-
targetTypeFwd
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
export function ReferenceKeyTarget(sourceTypeFwd, referenceKeyPropertyKey, description) {
|
|
78
|
-
return (object, propertyKey) => {
|
|
79
|
-
const classType = object.constructor;
|
|
80
|
-
DbDefinitionUtil.addReferenceKeyTargetDef(classType, {
|
|
81
|
-
propertyKey,
|
|
82
|
-
name: propertyKey,
|
|
83
|
-
sourceTypeFwd,
|
|
84
|
-
description,
|
|
85
|
-
sourceKeyPropertyKey: referenceKeyPropertyKey
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=decorators.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "@simplysm/sd-core-common";
|
|
2
|
-
export * from "./SdOrmDataType";
|
|
3
|
-
export * from "./QueryUnit";
|
|
4
|
-
export * from "./QueryHelper";
|
|
5
|
-
export * from "./QueryBuilder";
|
|
6
|
-
export * from "./Queryable";
|
|
7
|
-
export * from "./IDbMigration";
|
|
8
|
-
export * from "./IDbContextExecutor";
|
|
9
|
-
export * from "./IDbConnection";
|
|
10
|
-
export * from "./decorators";
|
|
11
|
-
export * from "./DbContext";
|
|
12
|
-
export * from "./commons";
|
|
13
|
-
export * from "./CaseWhenQueryHelper";
|
|
14
|
-
export * from "./CaseQueryHelper";
|
|
15
|
-
export * from "./utils/SdOrmUtil";
|
|
16
|
-
export * from "./utils/DbDefinitionUtil";
|
|
17
|
-
export * from "./models/SystemMigration";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sd-orm-common/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "@simplysm/sd-core-common";
|
|
2
|
-
export * from "./SdOrmDataType";
|
|
3
|
-
export * from "./QueryUnit";
|
|
4
|
-
export * from "./QueryHelper";
|
|
5
|
-
export * from "./QueryBuilder";
|
|
6
|
-
export * from "./Queryable";
|
|
7
|
-
export * from "./IDbMigration";
|
|
8
|
-
export * from "./IDbContextExecutor";
|
|
9
|
-
export * from "./IDbConnection";
|
|
10
|
-
export * from "./decorators";
|
|
11
|
-
export * from "./DbContext";
|
|
12
|
-
export * from "./commons";
|
|
13
|
-
export * from "./CaseWhenQueryHelper";
|
|
14
|
-
export * from "./CaseQueryHelper";
|
|
15
|
-
export * from "./utils/SdOrmUtil";
|
|
16
|
-
export * from "./utils/DbDefinitionUtil";
|
|
17
|
-
export * from "./models/SystemMigration";
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SystemMigration.js","sourceRoot":"","sources":["../../../../../sd-orm-common/src/models/SystemMigration.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGvC,IAAM,eAAe,GAArB,MAAM,eAAe;CAG3B,CAAA;AAFC;IAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;6CACxB;AAFV,eAAe;IAD3B,KAAK,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;GACxC,eAAe,CAG3B;SAHY,eAAe"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Column, Table } from "../decorators";
|
|
3
|
-
let SystemMigration = class SystemMigration {
|
|
4
|
-
};
|
|
5
|
-
__decorate([
|
|
6
|
-
Column({ primaryKey: 1, description: "코드" }),
|
|
7
|
-
__metadata("design:type", String)
|
|
8
|
-
], SystemMigration.prototype, "code", void 0);
|
|
9
|
-
SystemMigration = __decorate([
|
|
10
|
-
Table({ name: "_migration", description: "마이그레이션" })
|
|
11
|
-
], SystemMigration);
|
|
12
|
-
export { SystemMigration };
|
|
13
|
-
//# sourceMappingURL=SystemMigration.js.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Type } from "@simplysm/sd-core-common";
|
|
2
|
-
import { IColumnDef, IForeignKeyDef, IForeignKeyTargetDef, IIndexDef, IReferenceKeyDef, IReferenceKeyTargetDef, ITableDef } from "../commons";
|
|
3
|
-
export declare class DbDefinitionUtil {
|
|
4
|
-
private static readonly _tableDefMetadataKey;
|
|
5
|
-
static getTableDef(tableType: Type<any>, throws?: boolean): ITableDef;
|
|
6
|
-
static setTableDef(tableType: Type<any>, tableDef: ITableDef): void;
|
|
7
|
-
static mergeTableDef(tableType: Type<any>, target: Partial<ITableDef>): void;
|
|
8
|
-
static addColumnDef(tableType: Type<any>, def: IColumnDef): void;
|
|
9
|
-
static addForeignKeyDef(tableType: Type<any>, def: IForeignKeyDef): void;
|
|
10
|
-
static addForeignKeyTargetDef(tableType: Type<any>, def: IForeignKeyTargetDef): void;
|
|
11
|
-
static addIndexDef(tableType: Type<any>, def: IIndexDef): void;
|
|
12
|
-
static addReferenceKeyDef(tableType: Type<any>, def: IReferenceKeyDef): void;
|
|
13
|
-
static addReferenceKeyTargetDef(tableType: Type<any>, def: IReferenceKeyTargetDef): void;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DbDefinitionUtil.js","sourceRoot":"","sources":["../../../../../sd-orm-common/src/utils/DbDefinitionUtil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAW5D,MAAM,OAAO,gBAAgB;IAGpB,MAAM,CAAC,WAAW,CAAC,SAAoB,EAAE,SAAkB,IAAI;QACpE,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;QACvF,IAAI,MAAM,IAAI,QAAQ,KAAK,SAAS,EAAE;YACpC,MAAM,IAAI,KAAK,CAAC,IAAI,SAAS,CAAC,IAAI,4BAA4B,CAAC,CAAC;SACjE;QAED,OAAO,QAAQ,IAAI;YACjB,IAAI,EAAE,EAAE;YACR,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE;YACf,iBAAiB,EAAE,EAAE;YACrB,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,EAAE;YACjB,mBAAmB,EAAE,EAAE;SACX,CAAC;IACjB,CAAC;IAEM,MAAM,CAAC,WAAW,CAAC,SAAoB,EAAE,QAAmB;QACjE,OAAO,CAAC,cAAc,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IACrF,CAAC;IA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