@simplysm/sd-cli 7.3.4 → 10.0.21
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/.eslintrc.cjs +18 -0
- package/dist/SdLinter.d.ts +5 -0
- package/dist/SdLinter.js.map +1 -0
- package/dist/SdLinter.mjs +37 -0
- package/dist/SdTsIncrementalBuilder.d.ts +16 -0
- package/dist/SdTsIncrementalBuilder.js.map +1 -0
- package/dist/SdTsIncrementalBuilder.mjs +54 -0
- package/dist/build-cluster.js.map +1 -0
- package/dist/build-cluster.mjs +124 -0
- package/dist/builders/SdCliClientBuilder.d.ts +13 -0
- package/dist/builders/SdCliClientBuilder.js.map +1 -0
- package/dist/builders/SdCliClientBuilder.mjs +167 -0
- package/dist/builders/SdCliJsLibLinter.d.ts +14 -0
- package/dist/builders/SdCliJsLibLinter.js.map +1 -0
- package/dist/builders/SdCliJsLibLinter.mjs +60 -0
- package/dist/builders/SdCliServerBuilder.d.ts +14 -0
- package/dist/builders/SdCliServerBuilder.js.map +1 -0
- package/dist/builders/SdCliServerBuilder.mjs +171 -0
- package/dist/builders/SdCliTsLibBuilder.d.ts +13 -0
- package/dist/builders/SdCliTsLibBuilder.js.map +1 -0
- package/dist/builders/SdCliTsLibBuilder.mjs +75 -0
- package/dist/commons.d.ts +20 -110
- package/dist/commons.js.map +1 -0
- package/dist/commons.mjs +1 -1
- package/dist/entry/SdCliProject.d.ts +29 -0
- package/dist/entry/SdCliProject.js.map +1 -0
- package/dist/entry/SdCliProject.mjs +353 -0
- package/dist/sd-cli.js.map +1 -0
- package/dist/sd-cli.mjs +119 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.d.ts +20 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.js.map +1 -0
- package/dist/sd-core-common/src/decorators/NotifyPropertyChange.mjs +12 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.d.ts +43 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.js.map +1 -0
- package/dist/sd-core-common/src/decorators/PropertyGetSetDecoratorBase.mjs +54 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.d.ts +16 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.js.map +1 -0
- package/dist/sd-core-common/src/decorators/PropertyValidate.mjs +26 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.d.ts +14 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.js.map +1 -0
- package/dist/sd-core-common/src/decorators/decorator-return-types.mjs +2 -0
- package/dist/sd-core-common/src/errors/ArgumentError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/ArgumentError.js.map +1 -0
- package/dist/sd-core-common/src/errors/ArgumentError.mjs +13 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.js.map +1 -0
- package/dist/sd-core-common/src/errors/NeverEntryError.mjs +13 -0
- package/dist/sd-core-common/src/errors/NotImplementError.d.ts +10 -0
- package/dist/sd-core-common/src/errors/NotImplementError.js.map +1 -0
- package/dist/sd-core-common/src/errors/NotImplementError.mjs +13 -0
- package/dist/sd-core-common/src/errors/SdError.d.ts +23 -0
- package/dist/sd-core-common/src/errors/SdError.js.map +1 -0
- package/dist/sd-core-common/src/errors/SdError.mjs +40 -0
- package/dist/sd-core-common/src/errors/TimeoutError.d.ts +11 -0
- package/dist/sd-core-common/src/errors/TimeoutError.js.map +1 -0
- package/dist/sd-core-common/src/errors/TimeoutError.mjs +16 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.d.ts +147 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/ArrayExtension.mjs +448 -0
- package/dist/sd-core-common/src/extensions/MapExtension.d.ts +4 -0
- package/dist/sd-core-common/src/extensions/MapExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/MapExtension.mjs +15 -0
- package/dist/sd-core-common/src/extensions/SetExtension.d.ts +3 -0
- package/dist/sd-core-common/src/extensions/SetExtension.js.map +1 -0
- package/dist/sd-core-common/src/extensions/SetExtension.mjs +10 -0
- package/dist/sd-core-common/src/index.d.ts +32 -0
- package/dist/sd-core-common/src/index.js.map +1 -0
- package/dist/sd-core-common/src/index.mjs +33 -0
- package/dist/sd-core-common/src/types/DateOnly.d.ts +135 -0
- package/dist/sd-core-common/src/types/DateOnly.js.map +1 -0
- package/dist/sd-core-common/src/types/DateOnly.mjs +220 -0
- package/dist/sd-core-common/src/types/DateTime.d.ts +42 -0
- package/dist/sd-core-common/src/types/DateTime.js.map +1 -0
- package/dist/sd-core-common/src/types/DateTime.mjs +156 -0
- package/dist/sd-core-common/src/types/DeepPartial.d.ts +3 -0
- package/dist/sd-core-common/src/types/DeepPartial.js.map +1 -0
- package/dist/sd-core-common/src/types/DeepPartial.mjs +2 -0
- package/dist/sd-core-common/src/types/ObjectSet.d.ts +4 -0
- package/dist/sd-core-common/src/types/ObjectSet.js.map +1 -0
- package/dist/sd-core-common/src/types/ObjectSet.mjs +18 -0
- package/dist/sd-core-common/src/types/Time.d.ts +27 -0
- package/dist/sd-core-common/src/types/Time.js.map +1 -0
- package/dist/sd-core-common/src/types/Time.mjs +108 -0
- package/dist/sd-core-common/src/types/Type.d.ts +7 -0
- package/dist/sd-core-common/src/types/Type.js.map +1 -0
- package/dist/sd-core-common/src/types/Type.mjs +2 -0
- package/dist/sd-core-common/src/types/UnwrappedType.d.ts +1 -0
- package/dist/sd-core-common/src/types/UnwrappedType.js.map +1 -0
- package/dist/sd-core-common/src/types/UnwrappedType.mjs +2 -0
- package/dist/sd-core-common/src/types/Uuid.d.ts +8 -0
- package/dist/sd-core-common/src/types/Uuid.js.map +1 -0
- package/dist/sd-core-common/src/types/Uuid.mjs +26 -0
- package/dist/sd-core-common/src/types/WrappedType.d.ts +1 -0
- package/dist/sd-core-common/src/types/WrappedType.js.map +1 -0
- package/dist/sd-core-common/src/types/WrappedType.mjs +2 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.d.ts +12 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/DateTimeFormatUtil.mjs +67 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.d.ts +8 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.js.map +1 -0
- package/dist/sd-core-common/src/utils/FunctionQueue.mjs +46 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.d.ts +6 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/FunctionUtil.mjs +31 -0
- package/dist/sd-core-common/src/utils/JsonConvert.d.ts +8 -0
- package/dist/sd-core-common/src/utils/JsonConvert.js.map +1 -0
- package/dist/sd-core-common/src/utils/JsonConvert.mjs +78 -0
- package/dist/sd-core-common/src/utils/MathUtil.d.ts +3 -0
- package/dist/sd-core-common/src/utils/MathUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/MathUtil.mjs +6 -0
- package/dist/sd-core-common/src/utils/NumberUtil.d.ts +6 -0
- package/dist/sd-core-common/src/utils/NumberUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/NumberUtil.mjs +32 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.d.ts +80 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/ObjectUtil.mjs +452 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.d.ts +6 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.js.map +1 -0
- package/dist/sd-core-common/src/utils/SdSyncEventEmitter.mjs +27 -0
- package/dist/sd-core-common/src/utils/StringUtil.d.ts +8 -0
- package/dist/sd-core-common/src/utils/StringUtil.js.map +1 -0
- package/dist/sd-core-common/src/utils/StringUtil.mjs +77 -0
- package/dist/sd-core-common/src/utils/Wait.d.ts +4 -0
- package/dist/sd-core-common/src/utils/Wait.js.map +1 -0
- package/dist/sd-core-common/src/utils/Wait.mjs +23 -0
- package/dist/sd-core-node/src/index.d.ts +6 -0
- package/dist/sd-core-node/src/index.js.map +1 -0
- package/dist/sd-core-node/src/index.mjs +7 -0
- package/dist/sd-core-node/src/utils/FsUtil.d.ts +44 -0
- package/dist/sd-core-node/src/utils/FsUtil.js.map +1 -0
- package/dist/sd-core-node/src/utils/FsUtil.mjs +493 -0
- package/dist/sd-core-node/src/utils/Logger.d.ts +91 -0
- package/dist/sd-core-node/src/utils/Logger.js.map +1 -0
- package/dist/sd-core-node/src/utils/Logger.mjs +185 -0
- package/dist/sd-core-node/src/utils/PathUtil.d.ts +6 -0
- package/dist/sd-core-node/src/utils/PathUtil.js.map +1 -0
- package/dist/sd-core-node/src/utils/PathUtil.mjs +24 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.d.ts +15 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.js.map +1 -0
- package/dist/sd-core-node/src/utils/SdFsWatcher.mjs +43 -0
- package/dist/sd-core-node/src/utils/SdProcess.d.ts +5 -0
- package/dist/sd-core-node/src/utils/SdProcess.js.map +1 -0
- package/dist/sd-core-node/src/utils/SdProcess.mjs +36 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.d.ts +12 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/CaseQueryHelper.mjs +19 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.d.ts +12 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/CaseWhenQueryHelper.mjs +20 -0
- package/dist/sd-orm-common/src/DbContext.d.ts +81 -0
- package/dist/sd-orm-common/src/DbContext.js.map +1 -0
- package/dist/sd-orm-common/src/DbContext.mjs +635 -0
- package/dist/sd-orm-common/src/IDbConnection.d.ts +15 -0
- package/dist/sd-orm-common/src/IDbConnection.js.map +1 -0
- package/dist/sd-orm-common/src/IDbConnection.mjs +2 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.d.ts +17 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.js.map +1 -0
- package/dist/sd-orm-common/src/IDbContextExecutor.mjs +2 -0
- package/dist/sd-orm-common/src/IDbMigration.d.ts +4 -0
- package/dist/sd-orm-common/src/IDbMigration.js.map +1 -0
- package/dist/sd-orm-common/src/IDbMigration.mjs +2 -0
- package/dist/sd-orm-common/src/QueryBuilder.d.ts +48 -0
- package/dist/sd-orm-common/src/QueryBuilder.js.map +1 -0
- package/dist/sd-orm-common/src/QueryBuilder.mjs +1022 -0
- package/dist/sd-orm-common/src/QueryHelper.d.ts +75 -0
- package/dist/sd-orm-common/src/QueryHelper.js.map +1 -0
- package/dist/sd-orm-common/src/QueryHelper.mjs +627 -0
- package/dist/sd-orm-common/src/QueryUnit.d.ts +10 -0
- package/dist/sd-orm-common/src/QueryUnit.js.map +1 -0
- package/dist/sd-orm-common/src/QueryUnit.mjs +16 -0
- package/dist/sd-orm-common/src/Queryable.d.ts +105 -0
- package/dist/sd-orm-common/src/Queryable.js.map +1 -0
- package/dist/sd-orm-common/src/Queryable.mjs +1375 -0
- package/dist/sd-orm-common/src/SdOrmDataType.d.ts +21 -0
- package/dist/sd-orm-common/src/SdOrmDataType.js.map +1 -0
- package/dist/sd-orm-common/src/SdOrmDataType.mjs +2 -0
- package/dist/sd-orm-common/src/commons.d.ts +400 -0
- package/dist/sd-orm-common/src/commons.js.map +1 -0
- package/dist/sd-orm-common/src/commons.mjs +8 -0
- package/dist/sd-orm-common/src/decorators.d.ts +29 -0
- package/dist/sd-orm-common/src/decorators.js.map +1 -0
- package/dist/sd-orm-common/src/decorators.mjs +89 -0
- package/dist/sd-orm-common/src/index.d.ts +17 -0
- package/dist/sd-orm-common/src/index.js.map +1 -0
- package/dist/sd-orm-common/src/index.mjs +18 -0
- package/dist/sd-orm-common/src/models/SystemMigration.d.ts +3 -0
- package/dist/sd-orm-common/src/models/SystemMigration.js.map +1 -0
- package/dist/sd-orm-common/src/models/SystemMigration.mjs +13 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.d.ts +14 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.js.map +1 -0
- package/dist/sd-orm-common/src/utils/DbDefinitionUtil.mjs +66 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.d.ts +8 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.js.map +1 -0
- package/dist/sd-orm-common/src/utils/SdOrmUtil.mjs +248 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.d.ts +4 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.js.map +1 -0
- package/dist/sd-orm-node/src/DbConnectionFactory.mjs +17 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.d.ts +19 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.js.map +1 -0
- package/dist/sd-orm-node/src/NodeDbContextExecutor.mjs +71 -0
- package/dist/sd-orm-node/src/SdOrm.d.ts +10 -0
- package/dist/sd-orm-node/src/SdOrm.js.map +1 -0
- package/dist/sd-orm-node/src/SdOrm.mjs +25 -0
- package/dist/sd-orm-node/src/index.d.ts +4 -0
- package/dist/sd-orm-node/src/index.js.map +1 -0
- package/dist/sd-orm-node/src/index.mjs +5 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.d.ts +25 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.js.map +1 -0
- package/dist/sd-orm-node-mssql/src/MssqlDbConnection.mjs +321 -0
- package/dist/sd-orm-node-mssql/src/index.d.ts +2 -0
- package/dist/sd-orm-node-mssql/src/index.js.map +1 -0
- package/dist/sd-orm-node-mssql/src/index.mjs +3 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.d.ts +22 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.js.map +1 -0
- package/dist/sd-orm-node-mysql/src/MysqlDbConnection.mjs +200 -0
- package/dist/sd-orm-node-mysql/src/index.d.ts +2 -0
- package/dist/sd-orm-node-mysql/src/index.js.map +1 -0
- package/dist/sd-orm-node-mysql/src/index.mjs +3 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.d.ts +22 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.js.map +1 -0
- package/dist/sd-orm-node-sqlite/src/SqliteDbConnection.mjs +172 -0
- package/dist/sd-orm-node-sqlite/src/index.d.ts +2 -0
- package/dist/sd-orm-node-sqlite/src/index.js.map +1 -0
- package/dist/sd-orm-node-sqlite/src/index.mjs +3 -0
- package/dist/sd-service-common/src/commons-orm.d.ts +4 -0
- package/dist/sd-service-common/src/commons-orm.js.map +1 -0
- package/dist/sd-service-common/src/commons-orm.mjs +2 -0
- package/dist/sd-service-common/src/commons-smtp.d.ts +29 -0
- package/dist/sd-service-common/src/commons-smtp.js.map +1 -0
- package/dist/sd-service-common/src/commons-smtp.mjs +2 -0
- package/dist/sd-service-common/src/commons.d.ts +57 -0
- package/dist/sd-service-common/src/commons.js.map +1 -0
- package/dist/sd-service-common/src/commons.mjs +3 -0
- package/dist/sd-service-common/src/index.d.ts +3 -0
- package/dist/sd-service-common/src/index.js.map +1 -0
- package/dist/sd-service-common/src/index.mjs +4 -0
- package/dist/sd-service-server/src/ApiServiceError.d.ts +12 -0
- package/dist/sd-service-server/src/ApiServiceError.js.map +1 -0
- package/dist/sd-service-server/src/ApiServiceError.mjs +15 -0
- package/dist/sd-service-server/src/SdServiceServer.d.ts +39 -0
- package/dist/sd-service-server/src/SdServiceServer.js.map +1 -0
- package/dist/sd-service-server/src/SdServiceServer.mjs +513 -0
- package/dist/sd-service-server/src/commons.d.ts +23 -0
- package/dist/sd-service-server/src/commons.js.map +1 -0
- package/dist/sd-service-server/src/commons.mjs +3 -0
- package/dist/sd-service-server/src/index.d.ts +8 -0
- package/dist/sd-service-server/src/index.js.map +1 -0
- package/dist/sd-service-server/src/index.mjs +9 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.d.ts +4 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdAutoUpdateService.mjs +20 -0
- package/dist/sd-service-server/src/services/SdCryptoService.d.ts +7 -0
- package/dist/sd-service-server/src/services/SdCryptoService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdCryptoService.mjs +39 -0
- package/dist/sd-service-server/src/services/SdOrmService.d.ts +22 -0
- package/dist/sd-service-server/src/services/SdOrmService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdOrmService.mjs +115 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.d.ts +6 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.js.map +1 -0
- package/dist/sd-service-server/src/services/SdSmtpClientService.mjs +44 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.d.ts +4 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.js.map +1 -0
- package/dist/sd-service-server/src/utils/SdServiceServerConfigUtil.mjs +36 -0
- package/dist/server-worker.d.ts +1 -0
- package/dist/server-worker.js.map +1 -0
- package/dist/server-worker.mjs +36 -0
- package/dist/utils/SdCliBuildResultUtil.d.ts +1 -4
- package/dist/utils/SdCliBuildResultUtil.js.map +1 -0
- package/dist/utils/SdCliBuildResultUtil.mjs +3 -29
- package/dist/utils/SdCliConfigUtil.js.map +1 -0
- package/dist/utils/SdCliConfigUtil.mjs +1 -1
- package/package.json +14 -56
- package/src/SdLinter.ts +41 -0
- package/src/SdTsIncrementalBuilder.ts +75 -0
- package/src/build-cluster.ts +133 -0
- package/src/builders/SdCliClientBuilder.ts +189 -0
- package/src/builders/SdCliJsLibLinter.ts +72 -0
- package/src/builders/SdCliServerBuilder.ts +191 -0
- package/src/builders/SdCliTsLibBuilder.ts +96 -0
- package/src/commons.ts +21 -112
- package/src/entry/SdCliProject.ts +467 -0
- package/src/sd-cli.ts +136 -0
- package/src/server-worker.ts +45 -0
- package/src/utils/SdCliBuildResultUtil.ts +5 -38
- package/tsconfig.json +9 -0
- package/README.md +0 -105
- package/assets/client-files/assets/icons/icon-128x128.png +0 -0
- package/assets/client-files/assets/icons/icon-144x144.png +0 -0
- package/assets/client-files/assets/icons/icon-152x152.png +0 -0
- package/assets/client-files/assets/icons/icon-192x192.png +0 -0
- package/assets/client-files/assets/icons/icon-384x384.png +0 -0
- package/assets/client-files/assets/icons/icon-512x512.png +0 -0
- package/assets/client-files/assets/icons/icon-72x72.png +0 -0
- package/assets/client-files/assets/icons/icon-96x96.png +0 -0
- package/assets/client-files/favicon.ico +0 -0
- package/dist/SdCliBuildResultError.d.ts +0 -5
- package/dist/SdCliBuildResultError.mjs +0 -8
- package/dist/bin/sd-cli.d.ts +0 -2
- package/dist/bin/sd-cli.mjs +0 -410
- package/dist/build-tool/SdCliCacheCompilerHost.d.ts +0 -10
- package/dist/build-tool/SdCliCacheCompilerHost.mjs +0 -51
- package/dist/build-tool/SdCliCordova.d.ts +0 -16
- package/dist/build-tool/SdCliCordova.mjs +0 -212
- package/dist/build-tool/SdCliElectron.d.ts +0 -9
- package/dist/build-tool/SdCliElectron.mjs +0 -72
- package/dist/build-tool/SdCliGithubApi.d.ts +0 -13
- package/dist/build-tool/SdCliGithubApi.mjs +0 -92
- package/dist/build-tool/SdCliIndexFileGenerator.d.ts +0 -13
- package/dist/build-tool/SdCliIndexFileGenerator.mjs +0 -62
- package/dist/build-tool/SdCliNgCacheCompilerHost.d.ts +0 -12
- package/dist/build-tool/SdCliNgCacheCompilerHost.mjs +0 -43
- package/dist/build-tool/SdCliPackageLinter.d.ts +0 -8
- package/dist/build-tool/SdCliPackageLinter.mjs +0 -62
- package/dist/builder/SdCliClientBuilder.d.ts +0 -26
- package/dist/builder/SdCliClientBuilder.mjs +0 -769
- package/dist/builder/SdCliJsLibBuilder.d.ts +0 -14
- package/dist/builder/SdCliJsLibBuilder.mjs +0 -54
- package/dist/builder/SdCliServerBuilder.d.ts +0 -28
- package/dist/builder/SdCliServerBuilder.mjs +0 -482
- package/dist/builder/SdCliTsLibBuilder.d.ts +0 -35
- package/dist/builder/SdCliTsLibBuilder.mjs +0 -317
- package/dist/entry-points/SdCliFileCrypto.d.ts +0 -7
- package/dist/entry-points/SdCliFileCrypto.mjs +0 -72
- package/dist/entry-points/SdCliLocalUpdate.d.ts +0 -13
- package/dist/entry-points/SdCliLocalUpdate.mjs +0 -100
- package/dist/entry-points/SdCliPrepare.d.ts +0 -5
- package/dist/entry-points/SdCliPrepare.mjs +0 -86
- package/dist/entry-points/SdCliProject.d.ts +0 -34
- package/dist/entry-points/SdCliProject.mjs +0 -416
- package/dist/entry-points/SdCliProjectGenerator.d.ts +0 -44
- package/dist/entry-points/SdCliProjectGenerator.mjs +0 -326
- package/dist/entry-points/file/base/fc_package_eslintrc.d.ts +0 -3
- package/dist/entry-points/file/base/fc_package_eslintrc.mjs +0 -31
- package/dist/entry-points/file/base/fc_package_npmconfig.d.ts +0 -9
- package/dist/entry-points/file/base/fc_package_npmconfig.mjs +0 -32
- package/dist/entry-points/file/base/fc_package_tsconfig.d.ts +0 -5
- package/dist/entry-points/file/base/fc_package_tsconfig.mjs +0 -13
- package/dist/entry-points/file/client/fc_package_AppModule.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppModule.mjs +0 -37
- package/dist/entry-points/file/client/fc_package_AppPage.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_AppPage.mjs +0 -14
- package/dist/entry-points/file/client/fc_package_Page.d.ts +0 -4
- package/dist/entry-points/file/client/fc_package_Page.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_client_main.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_client_main.mjs +0 -19
- package/dist/entry-points/file/client/fc_package_index.d.ts +0 -3
- package/dist/entry-points/file/client/fc_package_index.mjs +0 -88
- package/dist/entry-points/file/client/fc_package_manifest.d.ts +0 -5
- package/dist/entry-points/file/client/fc_package_manifest.mjs +0 -54
- package/dist/entry-points/file/client/fc_package_polyfills.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_polyfills.mjs +0 -11
- package/dist/entry-points/file/client/fc_package_styles.d.ts +0 -1
- package/dist/entry-points/file/client/fc_package_styles.mjs +0 -7
- package/dist/entry-points/file/db/fc_package_DbContext.d.ts +0 -3
- package/dist/entry-points/file/db/fc_package_DbContext.mjs +0 -14
- package/dist/entry-points/file/db/fc_package_DbModel.d.ts +0 -4
- package/dist/entry-points/file/db/fc_package_DbModel.mjs +0 -12
- package/dist/entry-points/file/project/fc_project_editor_config.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_editor_config.mjs +0 -22
- package/dist/entry-points/file/project/fc_project_eslintrc.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_eslintrc.mjs +0 -30
- package/dist/entry-points/file/project/fc_project_gitattributes.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitattributes.mjs +0 -6
- package/dist/entry-points/file/project/fc_project_gitignore.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_gitignore.mjs +0 -27
- package/dist/entry-points/file/project/fc_project_npmconfig.d.ts +0 -7
- package/dist/entry-points/file/project/fc_project_npmconfig.mjs +0 -37
- package/dist/entry-points/file/project/fc_project_readme.d.ts +0 -3
- package/dist/entry-points/file/project/fc_project_readme.mjs +0 -13
- package/dist/entry-points/file/project/fc_project_simplysm.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_simplysm.mjs +0 -2
- package/dist/entry-points/file/project/fc_project_tsconfig.d.ts +0 -1
- package/dist/entry-points/file/project/fc_project_tsconfig.mjs +0 -25
- package/dist/entry-points/file/server/fc_package_server_main.d.ts +0 -5
- package/dist/entry-points/file/server/fc_package_server_main.mjs +0 -60
- package/dist/index.d.ts +0 -54
- package/dist/index.mjs +0 -55
- package/dist/ng-tools/SdCliNgModuleGenerator.d.ts +0 -29
- package/dist/ng-tools/SdCliNgModuleGenerator.mjs +0 -502
- package/dist/ng-tools/babel/SdCliBbFileMetadata.d.ts +0 -25
- package/dist/ng-tools/babel/SdCliBbFileMetadata.mjs +0 -539
- package/dist/ng-tools/babel/SdCliBbRootMetadata.d.ts +0 -23
- package/dist/ng-tools/babel/SdCliBbRootMetadata.mjs +0 -247
- package/dist/ng-tools/babel/SdCliBbUtil.d.ts +0 -5
- package/dist/ng-tools/babel/SdCliBbUtil.mjs +0 -14
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.d.ts +0 -42
- package/dist/ng-tools/babel/TSdCliBbNgMetadata.mjs +0 -216
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.d.ts +0 -55
- package/dist/ng-tools/babel/TSdCliBbTypeMetadata.mjs +0 -151
- package/dist/ng-tools/commons.d.ts +0 -9
- package/dist/ng-tools/commons.mjs +0 -2
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.d.ts +0 -61
- package/dist/ng-tools/typescript/SdCliTsFileMetadata.mjs +0 -325
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.d.ts +0 -8
- package/dist/ng-tools/typescript/SdCliTsRootMetadata.mjs +0 -28
- package/dist/ng-tools/typescript/SdCliTsUtil.d.ts +0 -5
- package/dist/ng-tools/typescript/SdCliTsUtil.mjs +0 -28
- package/dist/packages/SdCliPackage.d.ts +0 -22
- package/dist/packages/SdCliPackage.mjs +0 -206
- package/dist/utils/SdCliNpmConfigUtil.d.ts +0 -7
- package/dist/utils/SdCliNpmConfigUtil.mjs +0 -15
- package/dist/worker/build-worker.mjs +0 -67
- package/dist/worker/server-worker.mjs +0 -67
- package/docs/client-add-page.md +0 -8
- package/docs/client-router.md +0 -85
- package/docs/client-sw.md +0 -101
- package/docs/conf-orm.md +0 -81
- package/docs/conf-usage.md +0 -5
- package/docs/lib-local-update.md +0 -50
- package/docs/lib-ts-paths.md +0 -25
- package/lib/cordova-entry.js +0 -22
- package/src/SdCliBuildResultError.ts +0 -9
- package/src/bin/sd-cli.ts +0 -493
- package/src/build-tool/SdCliCacheCompilerHost.ts +0 -79
- package/src/build-tool/SdCliCordova.ts +0 -263
- package/src/build-tool/SdCliElectron.ts +0 -85
- package/src/build-tool/SdCliGithubApi.ts +0 -111
- package/src/build-tool/SdCliIndexFileGenerator.ts +0 -79
- package/src/build-tool/SdCliNgCacheCompilerHost.ts +0 -58
- package/src/build-tool/SdCliPackageLinter.ts +0 -74
- package/src/builder/SdCliClientBuilder.ts +0 -879
- package/src/builder/SdCliJsLibBuilder.ts +0 -70
- package/src/builder/SdCliServerBuilder.ts +0 -552
- package/src/builder/SdCliTsLibBuilder.ts +0 -450
- package/src/entry-points/SdCliFileCrypto.ts +0 -87
- package/src/entry-points/SdCliLocalUpdate.ts +0 -121
- package/src/entry-points/SdCliPrepare.ts +0 -86
- package/src/entry-points/SdCliProject.ts +0 -491
- package/src/entry-points/SdCliProjectGenerator.ts +0 -402
- package/src/entry-points/file/base/fc_package_eslintrc.ts +0 -30
- package/src/entry-points/file/base/fc_package_npmconfig.ts +0 -43
- package/src/entry-points/file/base/fc_package_tsconfig.ts +0 -12
- package/src/entry-points/file/client/fc_package_AppModule.ts +0 -36
- package/src/entry-points/file/client/fc_package_AppPage.ts +0 -13
- package/src/entry-points/file/client/fc_package_Page.ts +0 -19
- package/src/entry-points/file/client/fc_package_client_main.ts +0 -18
- package/src/entry-points/file/client/fc_package_index.ts +0 -87
- package/src/entry-points/file/client/fc_package_manifest.ts +0 -53
- package/src/entry-points/file/client/fc_package_polyfills.ts +0 -10
- package/src/entry-points/file/client/fc_package_styles.ts +0 -6
- package/src/entry-points/file/db/fc_package_DbContext.ts +0 -14
- package/src/entry-points/file/db/fc_package_DbModel.ts +0 -11
- package/src/entry-points/file/project/fc_project_editor_config.ts +0 -21
- package/src/entry-points/file/project/fc_project_eslintrc.ts +0 -29
- package/src/entry-points/file/project/fc_project_gitattributes.ts +0 -5
- package/src/entry-points/file/project/fc_project_gitignore.ts +0 -26
- package/src/entry-points/file/project/fc_project_npmconfig.ts +0 -36
- package/src/entry-points/file/project/fc_project_readme.ts +0 -12
- package/src/entry-points/file/project/fc_project_simplysm.ts +0 -1
- package/src/entry-points/file/project/fc_project_tsconfig.ts +0 -24
- package/src/entry-points/file/server/fc_package_server_main.ts +0 -62
- package/src/index.ts +0 -54
- package/src/ng-tools/SdCliNgModuleGenerator.ts +0 -672
- package/src/ng-tools/babel/SdCliBbFileMetadata.ts +0 -629
- package/src/ng-tools/babel/SdCliBbRootMetadata.ts +0 -292
- package/src/ng-tools/babel/SdCliBbUtil.ts +0 -15
- package/src/ng-tools/babel/TSdCliBbNgMetadata.ts +0 -251
- package/src/ng-tools/babel/TSdCliBbTypeMetadata.ts +0 -212
- package/src/ng-tools/commons.ts +0 -3
- package/src/ng-tools/typescript/SdCliTsFileMetadata.ts +0 -384
- package/src/ng-tools/typescript/SdCliTsRootMetadata.ts +0 -32
- package/src/ng-tools/typescript/SdCliTsUtil.ts +0 -29
- package/src/packages/SdCliPackage.ts +0 -259
- package/src/utils/SdCliNpmConfigUtil.ts +0 -16
- package/src/worker/build-worker.ts +0 -73
- package/src/worker/server-worker.ts +0 -72
- /package/dist/{worker/build-worker.d.ts → build-cluster.d.ts} +0 -0
- /package/dist/{worker/server-worker.d.ts → sd-cli.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SdOrmDataType.js","sourceRoot":"","sources":["../../../../sd-orm-common/src/SdOrmDataType.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,400 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1,29 @@
|
|
|
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>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../sd-orm-common/src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ChC,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"}
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
|
@@ -0,0 +1,17 @@
|
|
|
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";
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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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