@lambdaorm/lib 3.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE/home/runner/work/core/core/LICENSE +9 -0
- package/README.md +164 -0
- package/connection/application/facade.d.ts +19 -0
- package/connection/application/facade.d.ts.map +1 -0
- package/connection/application/facade.js +33 -0
- package/connection/application/facade.js.map +1 -0
- package/connection/application/index.d.ts +6 -0
- package/connection/application/index.d.ts.map +1 -0
- package/connection/application/index.js +22 -0
- package/connection/application/index.js.map +1 -0
- package/connection/application/services/connectionPoolService.d.ts +12 -0
- package/connection/application/services/connectionPoolService.d.ts.map +1 -0
- package/connection/application/services/connectionPoolService.js +35 -0
- package/connection/application/services/connectionPoolService.js.map +1 -0
- package/connection/application/services/connectionService.d.ts +1 -0
- package/connection/application/services/connectionService.d.ts.map +1 -0
- package/connection/application/services/connectionService.js +49 -0
- package/connection/application/services/connectionService.js.map +1 -0
- package/connection/application/services/dialectPoolService.d.ts +10 -0
- package/connection/application/services/dialectPoolService.d.ts.map +1 -0
- package/connection/application/services/dialectPoolService.js +22 -0
- package/connection/application/services/dialectPoolService.js.map +1 -0
- package/connection/application/useCases/acquire.d.ts +8 -0
- package/connection/application/useCases/acquire.d.ts.map +1 -0
- package/connection/application/useCases/acquire.js +14 -0
- package/connection/application/useCases/acquire.js.map +1 -0
- package/connection/application/useCases/release.d.ts +8 -0
- package/connection/application/useCases/release.d.ts.map +1 -0
- package/connection/application/useCases/release.js +14 -0
- package/connection/application/useCases/release.js.map +1 -0
- package/connection/domain/connection.d.ts +6 -0
- package/connection/domain/connection.d.ts.map +1 -0
- package/connection/domain/connection.js +3 -0
- package/connection/domain/connection.js.map +1 -0
- package/connection/domain/errors.d.ts +7 -0
- package/connection/domain/errors.d.ts.map +1 -0
- package/connection/domain/errors.js +18 -0
- package/connection/domain/errors.js.map +1 -0
- package/connection/domain/index.d.ts +5 -0
- package/connection/domain/index.d.ts.map +1 -0
- package/connection/domain/index.js +21 -0
- package/connection/domain/index.js.map +1 -0
- package/connection/domain/ports/connection.d.ts +61 -0
- package/connection/domain/ports/connection.d.ts.map +1 -0
- package/connection/domain/ports/connection.js +3 -0
- package/connection/domain/ports/connection.js.map +1 -0
- package/connection/domain/ports/connectionPool.d.ts +10 -0
- package/connection/domain/ports/connectionPool.d.ts.map +1 -0
- package/connection/domain/ports/connectionPool.js +3 -0
- package/connection/domain/ports/connectionPool.js.map +1 -0
- package/connection/infrastructure/adapters/MariaDB.d.ts +4 -0
- package/connection/infrastructure/adapters/MariaDB.d.ts.map +1 -0
- package/connection/infrastructure/adapters/MariaDB.js +8 -0
- package/connection/infrastructure/adapters/MariaDB.js.map +1 -0
- package/connection/infrastructure/adapters/MongoDB.d.ts +65 -0
- package/connection/infrastructure/adapters/MongoDB.d.ts.map +1 -0
- package/connection/infrastructure/adapters/MongoDB.js +580 -0
- package/connection/infrastructure/adapters/MongoDB.js.map +1 -0
- package/connection/infrastructure/adapters/MySQL.d.ts +36 -0
- package/connection/infrastructure/adapters/MySQL.d.ts.map +1 -0
- package/connection/infrastructure/adapters/MySQL.js +219 -0
- package/connection/infrastructure/adapters/MySQL.js.map +1 -0
- package/connection/infrastructure/adapters/Oracle.d.ts +40 -0
- package/connection/infrastructure/adapters/Oracle.d.ts.map +1 -0
- package/connection/infrastructure/adapters/Oracle.js +305 -0
- package/connection/infrastructure/adapters/Oracle.js.map +1 -0
- package/connection/infrastructure/adapters/PostgreSQL.d.ts +34 -0
- package/connection/infrastructure/adapters/PostgreSQL.d.ts.map +1 -0
- package/connection/infrastructure/adapters/PostgreSQL.js +235 -0
- package/connection/infrastructure/adapters/PostgreSQL.js.map +1 -0
- package/connection/infrastructure/adapters/SQLjs.d.ts +36 -0
- package/connection/infrastructure/adapters/SQLjs.d.ts.map +1 -0
- package/connection/infrastructure/adapters/SQLjs.js +144 -0
- package/connection/infrastructure/adapters/SQLjs.js.map +1 -0
- package/connection/infrastructure/adapters/SqlServer.d.ts +41 -0
- package/connection/infrastructure/adapters/SqlServer.d.ts.map +1 -0
- package/connection/infrastructure/adapters/SqlServer.js +346 -0
- package/connection/infrastructure/adapters/SqlServer.js.map +1 -0
- package/connection/infrastructure/adapters/base/connection.d.ts +68 -0
- package/connection/infrastructure/adapters/base/connection.d.ts.map +1 -0
- package/connection/infrastructure/adapters/base/connection.js +196 -0
- package/connection/infrastructure/adapters/base/connection.js.map +1 -0
- package/connection/infrastructure/adapters/base/connectionPool.d.ts +14 -0
- package/connection/infrastructure/adapters/base/connectionPool.d.ts.map +1 -0
- package/connection/infrastructure/adapters/base/connectionPool.js +30 -0
- package/connection/infrastructure/adapters/base/connectionPool.js.map +1 -0
- package/connection/infrastructure/facadeBuilder.d.ts +8 -0
- package/connection/infrastructure/facadeBuilder.d.ts.map +1 -0
- package/connection/infrastructure/facadeBuilder.js +39 -0
- package/connection/infrastructure/facadeBuilder.js.map +1 -0
- package/connection/infrastructure/index.d.ts +2 -0
- package/connection/infrastructure/index.d.ts.map +1 -0
- package/connection/infrastructure/index.js +18 -0
- package/connection/infrastructure/index.js.map +1 -0
- package/execution/application/index.d.ts +5 -0
- package/execution/application/index.d.ts.map +1 -0
- package/execution/application/index.js +21 -0
- package/execution/application/index.js.map +1 -0
- package/execution/application/services/executor.d.ts +30 -0
- package/execution/application/services/executor.d.ts.map +1 -0
- package/execution/application/services/executor.js +108 -0
- package/execution/application/services/executor.js.map +1 -0
- package/execution/application/services/observer.d.ts +12 -0
- package/execution/application/services/observer.d.ts.map +1 -0
- package/execution/application/services/observer.js +28 -0
- package/execution/application/services/observer.js.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkDeleteExecutor.d.ts +14 -0
- package/execution/application/services/queryExecutor/queryBulkDeleteExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkDeleteExecutor.js +46 -0
- package/execution/application/services/queryExecutor/queryBulkDeleteExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkInsertExecutor.d.ts +26 -0
- package/execution/application/services/queryExecutor/queryBulkInsertExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkInsertExecutor.js +163 -0
- package/execution/application/services/queryExecutor/queryBulkInsertExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkMergeExecutor.d.ts +10 -0
- package/execution/application/services/queryExecutor/queryBulkMergeExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryBulkMergeExecutor.js +43 -0
- package/execution/application/services/queryExecutor/queryBulkMergeExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryDeleteExecutor.d.ts +13 -0
- package/execution/application/services/queryExecutor/queryDeleteExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryDeleteExecutor.js +37 -0
- package/execution/application/services/queryExecutor/queryDeleteExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryEvalConstraints.d.ts +10 -0
- package/execution/application/services/queryExecutor/queryEvalConstraints.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryEvalConstraints.js +31 -0
- package/execution/application/services/queryExecutor/queryEvalConstraints.js.map +1 -0
- package/execution/application/services/queryExecutor/queryExecutor.d.ts +37 -0
- package/execution/application/services/queryExecutor/queryExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryExecutor.js +223 -0
- package/execution/application/services/queryExecutor/queryExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryExecutorObservableDecorator.d.ts +20 -0
- package/execution/application/services/queryExecutor/queryExecutorObservableDecorator.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryExecutorObservableDecorator.js +104 -0
- package/execution/application/services/queryExecutor/queryExecutorObservableDecorator.js.map +1 -0
- package/execution/application/services/queryExecutor/queryInsertConditionalExecutor.d.ts +9 -0
- package/execution/application/services/queryExecutor/queryInsertConditionalExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryInsertConditionalExecutor.js +32 -0
- package/execution/application/services/queryExecutor/queryInsertConditionalExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryInsertExecutor.d.ts +21 -0
- package/execution/application/services/queryExecutor/queryInsertExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryInsertExecutor.js +71 -0
- package/execution/application/services/queryExecutor/queryInsertExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryInternalExecutor.d.ts +6 -0
- package/execution/application/services/queryExecutor/queryInternalExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryInternalExecutor.js +3 -0
- package/execution/application/services/queryExecutor/queryInternalExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/querySelectExecutor.d.ts +25 -0
- package/execution/application/services/queryExecutor/querySelectExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/querySelectExecutor.js +187 -0
- package/execution/application/services/queryExecutor/querySelectExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/querySolveDefaults.d.ts +15 -0
- package/execution/application/services/queryExecutor/querySolveDefaults.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/querySolveDefaults.js +31 -0
- package/execution/application/services/queryExecutor/querySolveDefaults.js.map +1 -0
- package/execution/application/services/queryExecutor/querySolveReadValues.d.ts +10 -0
- package/execution/application/services/queryExecutor/querySolveReadValues.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/querySolveReadValues.js +32 -0
- package/execution/application/services/queryExecutor/querySolveReadValues.js.map +1 -0
- package/execution/application/services/queryExecutor/querySolveWriteValues.d.ts +9 -0
- package/execution/application/services/queryExecutor/querySolveWriteValues.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/querySolveWriteValues.js +25 -0
- package/execution/application/services/queryExecutor/querySolveWriteValues.js.map +1 -0
- package/execution/application/services/queryExecutor/queryUpdateExecutor.d.ts +16 -0
- package/execution/application/services/queryExecutor/queryUpdateExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryUpdateExecutor.js +49 -0
- package/execution/application/services/queryExecutor/queryUpdateExecutor.js.map +1 -0
- package/execution/application/services/queryExecutor/queryUpsertExecutor.d.ts +9 -0
- package/execution/application/services/queryExecutor/queryUpsertExecutor.d.ts.map +1 -0
- package/execution/application/services/queryExecutor/queryUpsertExecutor.js +32 -0
- package/execution/application/services/queryExecutor/queryUpsertExecutor.js.map +1 -0
- package/execution/domain/errors.d.ts +4 -0
- package/execution/domain/errors.d.ts.map +1 -0
- package/execution/domain/errors.js +11 -0
- package/execution/domain/errors.js.map +1 -0
- package/execution/domain/executor.d.ts +47 -0
- package/execution/domain/executor.d.ts.map +1 -0
- package/execution/domain/executor.js +15 -0
- package/execution/domain/executor.js.map +1 -0
- package/execution/domain/index.d.ts +4 -0
- package/execution/domain/index.d.ts.map +1 -0
- package/execution/domain/index.js +20 -0
- package/execution/domain/index.js.map +1 -0
- package/execution/domain/transaction.d.ts +10 -0
- package/execution/domain/transaction.d.ts.map +1 -0
- package/execution/domain/transaction.js +17 -0
- package/execution/domain/transaction.js.map +1 -0
- package/execution/infrastructure.ts/executorBuilder.d.ts +15 -0
- package/execution/infrastructure.ts/executorBuilder.d.ts.map +1 -0
- package/execution/infrastructure.ts/executorBuilder.js +18 -0
- package/execution/infrastructure.ts/executorBuilder.js.map +1 -0
- package/execution/infrastructure.ts/index.d.ts +2 -0
- package/execution/infrastructure.ts/index.d.ts.map +1 -0
- package/execution/infrastructure.ts/index.js +18 -0
- package/execution/infrastructure.ts/index.js.map +1 -0
- package/expressions/application/facade.d.ts +28 -0
- package/expressions/application/facade.d.ts.map +1 -0
- package/expressions/application/facade.js +40 -0
- package/expressions/application/facade.js.map +1 -0
- package/expressions/application/index.d.ts +7 -0
- package/expressions/application/index.d.ts.map +1 -0
- package/expressions/application/index.js +23 -0
- package/expressions/application/index.js.map +1 -0
- package/expressions/application/services/queryBuilder.d.ts +14 -0
- package/expressions/application/services/queryBuilder.d.ts.map +1 -0
- package/expressions/application/services/queryBuilder.js +42 -0
- package/expressions/application/services/queryBuilder.js.map +1 -0
- package/expressions/application/services/queryBuilderCacheDecorator.d.ts +13 -0
- package/expressions/application/services/queryBuilderCacheDecorator.d.ts.map +1 -0
- package/expressions/application/services/queryBuilderCacheDecorator.js +26 -0
- package/expressions/application/services/queryBuilderCacheDecorator.js.map +1 -0
- package/expressions/application/services/queryHelper.d.ts +8 -0
- package/expressions/application/services/queryHelper.d.ts.map +1 -0
- package/expressions/application/services/queryHelper.js +32 -0
- package/expressions/application/services/queryHelper.js.map +1 -0
- package/expressions/application/useCases/execute.d.ts +19 -0
- package/expressions/application/useCases/execute.d.ts.map +1 -0
- package/expressions/application/useCases/execute.js +33 -0
- package/expressions/application/useCases/execute.js.map +1 -0
- package/expressions/application/useCases/plan.d.ts +9 -0
- package/expressions/application/useCases/plan.d.ts.map +1 -0
- package/expressions/application/useCases/plan.js +27 -0
- package/expressions/application/useCases/plan.js.map +1 -0
- package/expressions/application/useCases/transaction.d.ts +14 -0
- package/expressions/application/useCases/transaction.d.ts.map +1 -0
- package/expressions/application/useCases/transaction.js +23 -0
- package/expressions/application/useCases/transaction.js.map +1 -0
- package/expressions/domain/index.d.ts +2 -0
- package/expressions/domain/index.d.ts.map +1 -0
- package/expressions/domain/index.js +18 -0
- package/expressions/domain/index.js.map +1 -0
- package/expressions/domain/services.d.ts +6 -0
- package/expressions/domain/services.d.ts.map +1 -0
- package/expressions/domain/services.js +3 -0
- package/expressions/domain/services.js.map +1 -0
- package/expressions/infrastructure/index.d.ts +2 -0
- package/expressions/infrastructure/index.d.ts.map +1 -0
- package/expressions/infrastructure/index.js +18 -0
- package/expressions/infrastructure/index.js.map +1 -0
- package/expressions/infrastructure/queryFacadeBuilder.d.ts +16 -0
- package/expressions/infrastructure/queryFacadeBuilder.d.ts.map +1 -0
- package/expressions/infrastructure/queryFacadeBuilder.js +20 -0
- package/expressions/infrastructure/queryFacadeBuilder.js.map +1 -0
- package/index.d.ts +21 -0
- package/index.d.ts.map +1 -0
- package/index.js +37 -0
- package/index.js.map +1 -0
- package/jest-config.json +20 -0
- package/language/application/index.d.ts +4 -0
- package/language/application/index.d.ts.map +1 -0
- package/language/application/index.js +20 -0
- package/language/application/index.js.map +1 -0
- package/language/application/services/ddlBuilder.d.ts +47 -0
- package/language/application/services/ddlBuilder.d.ts.map +1 -0
- package/language/application/services/ddlBuilder.js +493 -0
- package/language/application/services/ddlBuilder.js.map +1 -0
- package/language/application/services/dialectService.d.ts +32 -0
- package/language/application/services/dialectService.d.ts.map +1 -0
- package/language/application/services/dialectService.js +151 -0
- package/language/application/services/dialectService.js.map +1 -0
- package/language/application/services/languagesService.d.ts +11 -0
- package/language/application/services/languagesService.d.ts.map +1 -0
- package/language/application/services/languagesService.js +49 -0
- package/language/application/services/languagesService.js.map +1 -0
- package/language/domain/dialectService.d.ts +20 -0
- package/language/domain/dialectService.d.ts.map +1 -0
- package/language/domain/dialectService.js +3 -0
- package/language/domain/dialectService.js.map +1 -0
- package/language/domain/errors.d.ts +4 -0
- package/language/domain/errors.d.ts.map +1 -0
- package/language/domain/errors.js +11 -0
- package/language/domain/errors.js.map +1 -0
- package/language/domain/index.d.ts +7 -0
- package/language/domain/index.d.ts.map +1 -0
- package/language/domain/index.js +23 -0
- package/language/domain/index.js.map +1 -0
- package/language/domain/model.d.ts +6 -0
- package/language/domain/model.d.ts.map +1 -0
- package/language/domain/model.js +3 -0
- package/language/domain/model.js.map +1 -0
- package/language/domain/ports/DdlBuilder.d.ts +36 -0
- package/language/domain/ports/DdlBuilder.d.ts.map +1 -0
- package/language/domain/ports/DdlBuilder.js +3 -0
- package/language/domain/ports/DdlBuilder.js.map +1 -0
- package/language/domain/ports/DmlBuilder.d.ts +6 -0
- package/language/domain/ports/DmlBuilder.d.ts.map +1 -0
- package/language/domain/ports/DmlBuilder.js +3 -0
- package/language/domain/ports/DmlBuilder.js.map +1 -0
- package/language/domain/ports/language.d.ts +13 -0
- package/language/domain/ports/language.d.ts.map +1 -0
- package/language/domain/ports/language.js +3 -0
- package/language/domain/ports/language.js.map +1 -0
- package/language/infrastructure/adapters/DdlBuilderBase.d.ts +44 -0
- package/language/infrastructure/adapters/DdlBuilderBase.d.ts.map +1 -0
- package/language/infrastructure/adapters/DdlBuilderBase.js +59 -0
- package/language/infrastructure/adapters/DdlBuilderBase.js.map +1 -0
- package/language/infrastructure/adapters/NoSqlDdlBuilder.d.ts +26 -0
- package/language/infrastructure/adapters/NoSqlDdlBuilder.d.ts.map +1 -0
- package/language/infrastructure/adapters/NoSqlDdlBuilder.js +130 -0
- package/language/infrastructure/adapters/NoSqlDdlBuilder.js.map +1 -0
- package/language/infrastructure/adapters/SqlDdlBuilder.d.ts +34 -0
- package/language/infrastructure/adapters/SqlDdlBuilder.d.ts.map +1 -0
- package/language/infrastructure/adapters/SqlDdlBuilder.js +266 -0
- package/language/infrastructure/adapters/SqlDdlBuilder.js.map +1 -0
- package/language/infrastructure/adapters/languageBase.d.ts +12 -0
- package/language/infrastructure/adapters/languageBase.d.ts.map +1 -0
- package/language/infrastructure/adapters/languageBase.js +25 -0
- package/language/infrastructure/adapters/languageBase.js.map +1 -0
- package/language/infrastructure/index.d.ts +4 -0
- package/language/infrastructure/index.d.ts.map +1 -0
- package/language/infrastructure/index.js +20 -0
- package/language/infrastructure/index.js.map +1 -0
- package/operand/application/facade.d.ts +18 -0
- package/operand/application/facade.d.ts.map +1 -0
- package/operand/application/facade.js +27 -0
- package/operand/application/facade.js.map +1 -0
- package/operand/application/index.d.ts +3 -0
- package/operand/application/index.d.ts.map +1 -0
- package/operand/application/index.js +19 -0
- package/operand/application/index.js.map +1 -0
- package/operand/application/services/operandBuilder.d.ts +18 -0
- package/operand/application/services/operandBuilder.d.ts.map +1 -0
- package/operand/application/services/operandBuilder.js +37 -0
- package/operand/application/services/operandBuilder.js.map +1 -0
- package/operand/application/services/operandBuilderCacheDecorator.d.ts +13 -0
- package/operand/application/services/operandBuilderCacheDecorator.d.ts.map +1 -0
- package/operand/application/services/operandBuilderCacheDecorator.js +38 -0
- package/operand/application/services/operandBuilderCacheDecorator.js.map +1 -0
- package/operand/application/services/operandHelper.d.ts +8 -0
- package/operand/application/services/operandHelper.d.ts.map +1 -0
- package/operand/application/services/operandHelper.js +89 -0
- package/operand/application/services/operandHelper.js.map +1 -0
- package/operand/application/services/operandNormalizer.d.ts +44 -0
- package/operand/application/services/operandNormalizer.d.ts.map +1 -0
- package/operand/application/services/operandNormalizer.js +605 -0
- package/operand/application/services/operandNormalizer.js.map +1 -0
- package/operand/application/usesCases/clone.d.ts +5 -0
- package/operand/application/usesCases/clone.d.ts.map +1 -0
- package/operand/application/usesCases/clone.js +17 -0
- package/operand/application/usesCases/clone.js.map +1 -0
- package/operand/application/usesCases/complete.d.ts +6 -0
- package/operand/application/usesCases/complete.d.ts.map +1 -0
- package/operand/application/usesCases/complete.js +21 -0
- package/operand/application/usesCases/complete.js.map +1 -0
- package/operand/application/usesCases/normalize.d.ts +9 -0
- package/operand/application/usesCases/normalize.d.ts.map +1 -0
- package/operand/application/usesCases/normalize.js +22 -0
- package/operand/application/usesCases/normalize.js.map +1 -0
- package/operand/infrastructure/facadeBuilder.d.ts +11 -0
- package/operand/infrastructure/facadeBuilder.d.ts.map +1 -0
- package/operand/infrastructure/facadeBuilder.js +21 -0
- package/operand/infrastructure/facadeBuilder.js.map +1 -0
- package/operand/infrastructure/index.d.ts +2 -0
- package/operand/infrastructure/index.d.ts.map +1 -0
- package/operand/infrastructure/index.js +18 -0
- package/operand/infrastructure/index.js.map +1 -0
- package/orm/application/index.d.ts +2 -0
- package/orm/application/index.d.ts.map +1 -0
- package/orm/application/index.js +18 -0
- package/orm/application/index.js.map +1 -0
- package/orm/application/orm.d.ts +68 -0
- package/orm/application/orm.d.ts.map +1 -0
- package/orm/application/orm.js +3 -0
- package/orm/application/orm.js.map +1 -0
- package/orm/infrastructure/expressionsBuilder.d.ts +8 -0
- package/orm/infrastructure/expressionsBuilder.d.ts.map +1 -0
- package/orm/infrastructure/expressionsBuilder.js +17 -0
- package/orm/infrastructure/expressionsBuilder.js.map +1 -0
- package/orm/infrastructure/index.d.ts +2 -0
- package/orm/infrastructure/index.d.ts.map +1 -0
- package/orm/infrastructure/index.js +18 -0
- package/orm/infrastructure/index.js.map +1 -0
- package/orm/infrastructure/orm.d.ts +110 -0
- package/orm/infrastructure/orm.d.ts.map +1 -0
- package/orm/infrastructure/orm.js +171 -0
- package/orm/infrastructure/orm.js.map +1 -0
- package/orm/infrastructure/ormLibrary.d.ts +7 -0
- package/orm/infrastructure/ormLibrary.d.ts.map +1 -0
- package/orm/infrastructure/ormLibrary.js +49 -0
- package/orm/infrastructure/ormLibrary.js.map +1 -0
- package/package.json +33 -0
- package/query/domain/index.d.ts +2 -0
- package/query/domain/index.d.ts.map +1 -0
- package/query/domain/index.js +18 -0
- package/query/domain/index.js.map +1 -0
- package/query/domain/query.d.ts +49 -0
- package/query/domain/query.d.ts.map +1 -0
- package/query/domain/query.js +32 -0
- package/query/domain/query.js.map +1 -0
- package/repository/domain/actions.d.ts +16 -0
- package/repository/domain/actions.d.ts.map +1 -0
- package/repository/domain/actions.js +33 -0
- package/repository/domain/actions.js.map +1 -0
- package/repository/domain/index.d.ts +2 -0
- package/repository/domain/index.d.ts.map +1 -0
- package/repository/domain/index.js +18 -0
- package/repository/domain/index.js.map +1 -0
- package/repository/infrastructure/index.d.ts +2 -0
- package/repository/infrastructure/index.d.ts.map +1 -0
- package/repository/infrastructure/index.js +18 -0
- package/repository/infrastructure/index.js.map +1 -0
- package/repository/infrastructure/repository.d.ts +44 -0
- package/repository/infrastructure/repository.d.ts.map +1 -0
- package/repository/infrastructure/repository.js +89 -0
- package/repository/infrastructure/repository.js.map +1 -0
- package/sentence/application/facade.d.ts +25 -0
- package/sentence/application/facade.d.ts.map +1 -0
- package/sentence/application/facade.js +45 -0
- package/sentence/application/facade.js.map +1 -0
- package/sentence/application/index.d.ts +3 -0
- package/sentence/application/index.d.ts.map +1 -0
- package/sentence/application/index.js +19 -0
- package/sentence/application/index.js.map +1 -0
- package/sentence/application/services/sentenceBuilder.d.ts +36 -0
- package/sentence/application/services/sentenceBuilder.d.ts.map +1 -0
- package/sentence/application/services/sentenceBuilder.js +594 -0
- package/sentence/application/services/sentenceBuilder.js.map +1 -0
- package/sentence/application/services/sentenceCompleteBuilder.d.ts +14 -0
- package/sentence/application/services/sentenceCompleteBuilder.d.ts.map +1 -0
- package/sentence/application/services/sentenceCompleteBuilder.js +30 -0
- package/sentence/application/services/sentenceCompleteBuilder.js.map +1 -0
- package/sentence/application/services/sentenceCompleteBuilderCacheDecorator.d.ts +12 -0
- package/sentence/application/services/sentenceCompleteBuilderCacheDecorator.d.ts.map +1 -0
- package/sentence/application/services/sentenceCompleteBuilderCacheDecorator.js +25 -0
- package/sentence/application/services/sentenceCompleteBuilderCacheDecorator.js.map +1 -0
- package/sentence/application/services/sentenceCompleter.d.ts +16 -0
- package/sentence/application/services/sentenceCompleter.d.ts.map +1 -0
- package/sentence/application/services/sentenceCompleter.js +204 -0
- package/sentence/application/services/sentenceCompleter.js.map +1 -0
- package/sentence/application/services/sentenceHelper.d.ts +18 -0
- package/sentence/application/services/sentenceHelper.d.ts.map +1 -0
- package/sentence/application/services/sentenceHelper.js +168 -0
- package/sentence/application/services/sentenceHelper.js.map +1 -0
- package/sentence/application/services/sentenceSerializer.d.ts +9 -0
- package/sentence/application/services/sentenceSerializer.d.ts.map +1 -0
- package/sentence/application/services/sentenceSerializer.js +97 -0
- package/sentence/application/services/sentenceSerializer.js.map +1 -0
- package/sentence/application/services/typeService.d.ts +16 -0
- package/sentence/application/services/typeService.d.ts.map +1 -0
- package/sentence/application/services/typeService.js +141 -0
- package/sentence/application/services/typeService.js.map +1 -0
- package/sentence/application/useCases/getConstraints.d.ts +13 -0
- package/sentence/application/useCases/getConstraints.d.ts.map +1 -0
- package/sentence/application/useCases/getConstraints.js +33 -0
- package/sentence/application/useCases/getConstraints.js.map +1 -0
- package/sentence/application/useCases/getMetadata.d.ts +13 -0
- package/sentence/application/useCases/getMetadata.d.ts.map +1 -0
- package/sentence/application/useCases/getMetadata.js +47 -0
- package/sentence/application/useCases/getMetadata.js.map +1 -0
- package/sentence/application/useCases/getModel.d.ts +13 -0
- package/sentence/application/useCases/getModel.d.ts.map +1 -0
- package/sentence/application/useCases/getModel.js +37 -0
- package/sentence/application/useCases/getModel.js.map +1 -0
- package/sentence/application/useCases/getParameters.d.ts +13 -0
- package/sentence/application/useCases/getParameters.d.ts.map +1 -0
- package/sentence/application/useCases/getParameters.js +45 -0
- package/sentence/application/useCases/getParameters.js.map +1 -0
- package/sentence/infrastructure/adapters/NoSql/NoSqlDmlBuilder.d.ts +26 -0
- package/sentence/infrastructure/adapters/NoSql/NoSqlDmlBuilder.d.ts.map +1 -0
- package/sentence/infrastructure/adapters/NoSql/NoSqlDmlBuilder.js +569 -0
- package/sentence/infrastructure/adapters/NoSql/NoSqlDmlBuilder.js.map +1 -0
- package/sentence/infrastructure/adapters/NoSql/config.json +468 -0
- package/sentence/infrastructure/adapters/NoSql/language.d.ts +11 -0
- package/sentence/infrastructure/adapters/NoSql/language.d.ts.map +1 -0
- package/sentence/infrastructure/adapters/NoSql/language.js +24 -0
- package/sentence/infrastructure/adapters/NoSql/language.js.map +1 -0
- package/sentence/infrastructure/adapters/Sql/SqlDmlBuilder.d.ts +16 -0
- package/sentence/infrastructure/adapters/Sql/SqlDmlBuilder.d.ts.map +1 -0
- package/sentence/infrastructure/adapters/Sql/SqlDmlBuilder.js +224 -0
- package/sentence/infrastructure/adapters/Sql/SqlDmlBuilder.js.map +1 -0
- package/sentence/infrastructure/adapters/Sql/config.json +2594 -0
- package/sentence/infrastructure/adapters/Sql/language.d.ts +11 -0
- package/sentence/infrastructure/adapters/Sql/language.d.ts.map +1 -0
- package/sentence/infrastructure/adapters/Sql/language.js +25 -0
- package/sentence/infrastructure/adapters/Sql/language.js.map +1 -0
- package/sentence/infrastructure/adapters/base/dmlBuilder.d.ts +31 -0
- package/sentence/infrastructure/adapters/base/dmlBuilder.d.ts.map +1 -0
- package/sentence/infrastructure/adapters/base/dmlBuilder.js +175 -0
- package/sentence/infrastructure/adapters/base/dmlBuilder.js.map +1 -0
- package/sentence/infrastructure/facadeBuilder.d.ts +12 -0
- package/sentence/infrastructure/facadeBuilder.d.ts.map +1 -0
- package/sentence/infrastructure/facadeBuilder.js +19 -0
- package/sentence/infrastructure/facadeBuilder.js.map +1 -0
- package/sentence/infrastructure/index.d.ts +3 -0
- package/sentence/infrastructure/index.d.ts.map +1 -0
- package/sentence/infrastructure/index.js +19 -0
- package/sentence/infrastructure/index.js.map +1 -0
- package/sentence/infrastructure/languageServiceBuilder.d.ts +8 -0
- package/sentence/infrastructure/languageServiceBuilder.d.ts.map +1 -0
- package/sentence/infrastructure/languageServiceBuilder.js +19 -0
- package/sentence/infrastructure/languageServiceBuilder.js.map +1 -0
- package/sentence/infrastructure/library.d.ts +9 -0
- package/sentence/infrastructure/library.d.ts.map +1 -0
- package/sentence/infrastructure/library.js +29 -0
- package/sentence/infrastructure/library.js.map +1 -0
- package/shared/infrastructure/helper.d.ts +13 -0
- package/shared/infrastructure/helper.d.ts.map +1 -0
- package/shared/infrastructure/helper.js +28 -0
- package/shared/infrastructure/helper.js.map +1 -0
- package/shared/infrastructure/index.d.ts +2 -0
- package/shared/infrastructure/index.d.ts.map +1 -0
- package/shared/infrastructure/index.js +18 -0
- package/shared/infrastructure/index.js.map +1 -0
- package/stage/application/facade.d.ts +92 -0
- package/stage/application/facade.d.ts.map +1 -0
- package/stage/application/facade.js +132 -0
- package/stage/application/facade.js.map +1 -0
- package/stage/application/index.d.ts +13 -0
- package/stage/application/index.d.ts.map +1 -0
- package/stage/application/index.js +29 -0
- package/stage/application/index.js.map +1 -0
- package/stage/application/services/stateService.d.ts +27 -0
- package/stage/application/services/stateService.d.ts.map +1 -0
- package/stage/application/services/stateService.js +87 -0
- package/stage/application/services/stateService.js.map +1 -0
- package/stage/application/useCases/base/actionDDL.d.ts +19 -0
- package/stage/application/useCases/base/actionDDL.d.ts.map +1 -0
- package/stage/application/useCases/base/actionDDL.js +24 -0
- package/stage/application/useCases/base/actionDDL.js.map +1 -0
- package/stage/application/useCases/base/actionDML.d.ts +20 -0
- package/stage/application/useCases/base/actionDML.d.ts.map +1 -0
- package/stage/application/useCases/base/actionDML.js +68 -0
- package/stage/application/useCases/base/actionDML.js.map +1 -0
- package/stage/application/useCases/delete.d.ts +11 -0
- package/stage/application/useCases/delete.d.ts.map +1 -0
- package/stage/application/useCases/delete.js +61 -0
- package/stage/application/useCases/delete.js.map +1 -0
- package/stage/application/useCases/drop.d.ts +14 -0
- package/stage/application/useCases/drop.d.ts.map +1 -0
- package/stage/application/useCases/drop.js +28 -0
- package/stage/application/useCases/drop.js.map +1 -0
- package/stage/application/useCases/export.d.ts +8 -0
- package/stage/application/useCases/export.d.ts.map +1 -0
- package/stage/application/useCases/export.js +31 -0
- package/stage/application/useCases/export.js.map +1 -0
- package/stage/application/useCases/fetch.d.ts +24 -0
- package/stage/application/useCases/fetch.d.ts.map +1 -0
- package/stage/application/useCases/fetch.js +204 -0
- package/stage/application/useCases/fetch.js.map +1 -0
- package/stage/application/useCases/import.d.ts +16 -0
- package/stage/application/useCases/import.d.ts.map +1 -0
- package/stage/application/useCases/import.js +207 -0
- package/stage/application/useCases/import.js.map +1 -0
- package/stage/application/useCases/pull.d.ts +7 -0
- package/stage/application/useCases/pull.d.ts.map +1 -0
- package/stage/application/useCases/pull.js +19 -0
- package/stage/application/useCases/pull.js.map +1 -0
- package/stage/application/useCases/push.d.ts +7 -0
- package/stage/application/useCases/push.d.ts.map +1 -0
- package/stage/application/useCases/push.js +20 -0
- package/stage/application/useCases/push.js.map +1 -0
- package/stage/application/useCases/truncate.d.ts +7 -0
- package/stage/application/useCases/truncate.d.ts.map +1 -0
- package/stage/application/useCases/truncate.js +22 -0
- package/stage/application/useCases/truncate.js.map +1 -0
- package/stage/domain/index.d.ts +4 -0
- package/stage/domain/index.d.ts.map +1 -0
- package/stage/domain/index.js +3 -0
- package/stage/domain/index.js.map +1 -0
- package/stage/infrastructure/facadeBuilder.d.ts +14 -0
- package/stage/infrastructure/facadeBuilder.d.ts.map +1 -0
- package/stage/infrastructure/facadeBuilder.js +17 -0
- package/stage/infrastructure/facadeBuilder.js.map +1 -0
- package/stage/infrastructure/index.d.ts +2 -0
- package/stage/infrastructure/index.d.ts.map +1 -0
- package/stage/infrastructure/index.js +18 -0
- package/stage/infrastructure/index.js.map +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Flavio Lionel Rita <flaviolrita@proton.me>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# λORM
|
|
2
|
+
|
|
3
|
+
[](https://github.com/lambda-orm/wiki/discussions)
|
|
4
|
+
[](https://join.slack.com/t/nuevoespaciod-xo58767/shared_invite/zt-29ix7pc2r-Wd_ZBWnWRDv_5DM4NPtVhQ)
|
|
5
|
+
[](https://app.gitter.im/#/room/#lambdaorm-how-to-contribute:gitter.im)
|
|
6
|
+
[](https://discord.com/invite/yXT6XBX2)
|
|
7
|
+
[](https://github.com/lambda-orm/wiki)
|
|
8
|
+
[](https://www.npmjs.com/package/lambdaorm)
|
|
9
|
+
[](https://www.npmjs.com/package/lambdaorm)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
12
|
+
[](https://github.com/lambda-orm/wiki/actions?query=workflow%3A%22publish%22)
|
|
13
|
+
[](https://www.npmjs.com/package/lambdaorm-cli)
|
|
14
|
+
[](https://lambda-orm.github.io/wiki/api/index.md)
|
|
15
|
+
|
|
16
|
+
λORM is an ORM that allows us to perform distributed queries on different database engines.
|
|
17
|
+
|
|
18
|
+
In λORM, queries are defined using lambda expressions based on a domain model which abstracts us from the infrastructure. For example, in a query you can obtain or modify records from different entities, where some persist in MySQL, others in Postgres, and others in Mongo.
|
|
19
|
+
|
|
20
|
+
λORM allows you to define different scenarios for the same domain. For example, in one scenario, the infrastructure may consist of distributed instances across SQL Server, MongoDB, and Oracle, while in another scenario it may be a single Postgres instance. This allows the [CQRS](https://microservices.io/patterns/data/cqrs.html) pattern to be implemented through configuration, without needing to write a single line of code. [view example](https://github.com/lambda-orm/lambdaorm-labs/tree/main/labs/svc/04-northwind-cqrs-with-kafka)
|
|
21
|
+
|
|
22
|
+
In addition to being used as a Node.js library, it can be consumed from a command line interface (CLI), a REST service, or a REST service client in other programming languages.
|
|
23
|
+
|
|
24
|
+
## Query Language
|
|
25
|
+
|
|
26
|
+
Example of a query where orders and their details associated with a customer are obtained:
|
|
27
|
+
|
|
28
|
+
```Typescript
|
|
29
|
+
const query = (country: string) => Products
|
|
30
|
+
.map(p => ({ category: p.category.name, largestPrice: max(p.price) }))
|
|
31
|
+
.filter(p => (p.price > 5 && p.supplier.country == country) || (p.inStock < 3))
|
|
32
|
+
.having(p => max(p.price) > 50)
|
|
33
|
+
.sort(p => desc(p.largestPrice));
|
|
34
|
+
// Run the query passing the value of the country parameter
|
|
35
|
+
const result = await orm.execute(query, { country: 'ARG' });
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
In this example:
|
|
39
|
+
|
|
40
|
+
- Define a query that returns a list of product categories along with the maximum price of each category.
|
|
41
|
+
- Filter products based on price and supplier's country or stock availability
|
|
42
|
+
- Group products by category and calculate the maximum price
|
|
43
|
+
- Map each product to an object with category name and maximum price
|
|
44
|
+
- Sort the products by largest price in descending order
|
|
45
|
+
|
|
46
|
+
**view:** [queries](https://lambda-orm.github.io/wiki/queries/Query-Language) |
|
|
47
|
+
[select](https://lambda-orm.github.io/wiki/queries/dql/Select) |
|
|
48
|
+
[join](https://lambda-orm.github.io/wiki/queries/dql/Join) |
|
|
49
|
+
[grouping](https://lambda-orm.github.io/wiki/queries/dql/Grouping) |
|
|
50
|
+
[include](https://lambda-orm.github.io/wiki/queries/dql/Include) |
|
|
51
|
+
[insert](https://lambda-orm.github.io/wiki/queries/dml/Insert) |
|
|
52
|
+
[bulkInsert](https://lambda-orm.github.io/wiki/queries/dmlBulkInsert) |
|
|
53
|
+
[update](https://lambda-orm.github.io/wiki/queries/dml/Update) |
|
|
54
|
+
[delete](https://lambda-orm.github.io/wiki/queries/dml/Delete) |
|
|
55
|
+
[repository](https://lambda-orm.github.io/wiki/Repository) |
|
|
56
|
+
[usage](https://lambda-orm.github.io/wiki/Usage) |
|
|
57
|
+
[metadata](https://lambda-orm.github.io/wiki/queries/Metadata)
|
|
58
|
+
|
|
59
|
+
### Include
|
|
60
|
+
|
|
61
|
+
The include allows us to obtain the entity data and its relationships in the same query. These data may be in different databases. \
|
|
62
|
+
In this example the query is expressed as a text string. (Which is another alternative to the lambda expression)
|
|
63
|
+
|
|
64
|
+
```Typescript
|
|
65
|
+
import { orm } from '../../lib'
|
|
66
|
+
(async () => {
|
|
67
|
+
try {
|
|
68
|
+
await orm.init('./config/northwind.yaml')
|
|
69
|
+
const query = `Orders
|
|
70
|
+
.filter(p => p.id === id)
|
|
71
|
+
.include(p =>
|
|
72
|
+
[ p.customer.map(p => p.name),
|
|
73
|
+
p.details
|
|
74
|
+
.include(p =>
|
|
75
|
+
p.product
|
|
76
|
+
.include(p => p.category.map(p => p.name))
|
|
77
|
+
.map(p => p.name))
|
|
78
|
+
.map(p => [p.quantity, p.unitPrice])
|
|
79
|
+
]
|
|
80
|
+
)`
|
|
81
|
+
const params = { id: 102 }
|
|
82
|
+
const result = await orm.execute(query, params, { stage: 'PostgreSQL' })
|
|
83
|
+
console.log(JSON.stringify(result, null, 2))
|
|
84
|
+
} catch (error:any) {
|
|
85
|
+
console.error(error.message)
|
|
86
|
+
} finally {
|
|
87
|
+
await orm.end()
|
|
88
|
+
}
|
|
89
|
+
})()
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Result:**
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
[
|
|
96
|
+
{
|
|
97
|
+
"id": 102,
|
|
98
|
+
"customerId": "SPLIR",
|
|
99
|
+
"employeeId": 7,
|
|
100
|
+
"orderDate": "1996-11-07T23:00:00.000Z",
|
|
101
|
+
"requiredDate": "1996-12-05T23:00:00.000Z",
|
|
102
|
+
"shippedDate": "1996-11-14T23:00:00.000Z",
|
|
103
|
+
"shipViaId": 1,
|
|
104
|
+
"freight": 8.63,
|
|
105
|
+
"name": "Split Rail Beer & Ale",
|
|
106
|
+
"address": "P.O. Box 555",
|
|
107
|
+
"city": "Lander",
|
|
108
|
+
"region": "WY",
|
|
109
|
+
"postalCode": "82520",
|
|
110
|
+
"country": "USA",
|
|
111
|
+
"customer": {
|
|
112
|
+
"name": "Split Rail Beer & Ale"
|
|
113
|
+
},
|
|
114
|
+
"details": [
|
|
115
|
+
{
|
|
116
|
+
"quantity": 24,
|
|
117
|
+
"unitPrice": 5.9,
|
|
118
|
+
"product": {
|
|
119
|
+
"name": "Tourtire",
|
|
120
|
+
"category": {
|
|
121
|
+
"name": "Meat/Poultry"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**more info:** [include](https://lambda-orm.github.io/wiki/Include)
|
|
131
|
+
|
|
132
|
+
## Schema Configuration
|
|
133
|
+
|
|
134
|
+
Through the schema, you can define entities, enumerations, indexes, unique keys, default values, constraints, mapping, sources, stages, listeners, etc. The schema can be defined in a JSON or YAML format. Conditions or actions are performed using the same [expression language](https://www.npmjs.com/package/3xpr) that is used to define queries.
|
|
135
|
+
|
|
136
|
+
**view:** [schema](https://lambda-orm.github.io/wiki/schema/Schema) |
|
|
137
|
+
[definition](https://lambda-orm.github.io/wiki/schema/Definition/SchemaDefinition) |
|
|
138
|
+
[use](https://lambda-orm.github.io/wiki/schema/Schema-Use) |
|
|
139
|
+
[expressions](https://lambda-orm.github.io/wiki/schema/Definition/SchemaDefinition-Expressions) |
|
|
140
|
+
[environment Variables](https://lambda-orm.github.io/wiki/schema/Definition/SchemaDefinition-EnvironmentVariables) |
|
|
141
|
+
[composite](https://lambda-orm.github.io/wiki/schema/Definition/SchemaDefinition-Composite) |
|
|
142
|
+
[listener](https://lambda-orm.github.io/wiki/schema/Examples/SchemaExample-Listener) |
|
|
143
|
+
[multiple stages](https://lambda-orm.github.io/wiki/schema/Examples/SchemaExample-MultiplesStages) |
|
|
144
|
+
[multiple sources](https://lambda-orm.github.io/wiki/schema/Examples/SchemaExample-StageMultiplesSources) |
|
|
145
|
+
[push](https://lambda-orm.github.io/wiki/schema/Examples/SchemaSynchronization-Push) |
|
|
146
|
+
[pull](https://lambda-orm.github.io/wiki/schema/Examples/SchemaSynchronization-Pull) |
|
|
147
|
+
[fetch](https://lambda-orm.github.io/wiki/schema/Examples/SchemaSynchronization-Fetch) |
|
|
148
|
+
[introspect](https://lambda-orm.github.io/wiki/schema/Examples/SchemaSynchronization-Introspect) |
|
|
149
|
+
[incorporate](https://lambda-orm.github.io/wiki/schema/Examples/SchemaSynchronization-Incorporate)
|
|
150
|
+
|
|
151
|
+
## Contributing
|
|
152
|
+
|
|
153
|
+
Would you like to contribute? Read [our contribution guidelines](https://github.com/lambda-orm/wiki/blob/main/CONTRIBUTING.md) to learn more. There are many ways to help!
|
|
154
|
+
|
|
155
|
+
## All Labs
|
|
156
|
+
|
|
157
|
+
You can access various labs at [lambdaorm labs](https://github.com/lambda-orm/lambdaorm-labs)
|
|
158
|
+
|
|
159
|
+
## Related projects
|
|
160
|
+
|
|
161
|
+
- [Lambda ORM CLI](https://www.npmjs.com/package/lambdaorm-cli): Command line interface for λORM
|
|
162
|
+
- [Lambda ORM Service](https://lambda-orm.github.io/wiki/api/index): REST service for λORM
|
|
163
|
+
- [Client Node](https://www.npmjs.com/package/lambdaorm-client-node): HTTP client for λORM
|
|
164
|
+
- [3xpr](https://www.npmjs.com/package/3xpr): Extensible expression engine, which allows evaluating mathematical and logical expressions.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConnectionConfig, Connection } from '../domain';
|
|
2
|
+
import { ConnectionPoolService } from './services/connectionPoolService';
|
|
3
|
+
import { DialectPoolService } from './services/dialectPoolService';
|
|
4
|
+
import { AcquireConnection } from './useCases/acquire';
|
|
5
|
+
import { ReleaseConnection } from './useCases/release';
|
|
6
|
+
export declare class ConnectionFacade {
|
|
7
|
+
private readonly dialectService;
|
|
8
|
+
private readonly poolService;
|
|
9
|
+
private readonly acquireConnection;
|
|
10
|
+
private readonly releaseConnection;
|
|
11
|
+
constructor(dialectService: DialectPoolService, poolService: ConnectionPoolService, acquireConnection: AcquireConnection, releaseConnection: ReleaseConnection);
|
|
12
|
+
addDialect(dialect: string, classConnectionPool: any): ConnectionFacade;
|
|
13
|
+
load(config: ConnectionConfig): void;
|
|
14
|
+
getConfig(name: string): ConnectionConfig;
|
|
15
|
+
end(): Promise<void>;
|
|
16
|
+
acquire(name: string): Promise<Connection>;
|
|
17
|
+
release(connection: Connection): Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=facade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.d.ts","sourceRoot":"","sources":["../../../../src/lib/connection/application/facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,qBAAa,gBAAgB;IAEf,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAHJ,cAAc,EAAC,kBAAkB,EAC9C,WAAW,EAAC,qBAAqB,EACjC,iBAAiB,EAAC,iBAAiB,EACnC,iBAAiB,EAAC,iBAAiB;IAG7C,UAAU,CAAE,OAAO,EAAC,MAAM,EAAE,mBAAmB,EAAC,GAAG,GAAE,gBAAgB;IAKrE,IAAI,CAAE,MAAM,EAAC,gBAAgB,GAAE,IAAI;IAInC,SAAS,CAAE,IAAI,EAAC,MAAM,GAAE,gBAAgB;IAIlC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpB,OAAO,CAAE,IAAI,EAAC,MAAM,GAAE,OAAO,CAAC,UAAU,CAAC;IAIzC,OAAO,CAAE,UAAU,EAAC,UAAU,GAAE,OAAO,CAAC,IAAI,CAAC;CAG1D"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectionFacade = void 0;
|
|
4
|
+
class ConnectionFacade {
|
|
5
|
+
// eslint-disable-next-line no-useless-constructor
|
|
6
|
+
constructor(dialectService, poolService, acquireConnection, releaseConnection) {
|
|
7
|
+
this.dialectService = dialectService;
|
|
8
|
+
this.poolService = poolService;
|
|
9
|
+
this.acquireConnection = acquireConnection;
|
|
10
|
+
this.releaseConnection = releaseConnection;
|
|
11
|
+
}
|
|
12
|
+
addDialect(dialect, classConnectionPool) {
|
|
13
|
+
this.dialectService.add(dialect, classConnectionPool);
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
load(config) {
|
|
17
|
+
this.poolService.load(config);
|
|
18
|
+
}
|
|
19
|
+
getConfig(name) {
|
|
20
|
+
return this.poolService.get(name).config;
|
|
21
|
+
}
|
|
22
|
+
async end() {
|
|
23
|
+
return this.poolService.endAll();
|
|
24
|
+
}
|
|
25
|
+
async acquire(name) {
|
|
26
|
+
return this.acquireConnection.acquire(name);
|
|
27
|
+
}
|
|
28
|
+
async release(connection) {
|
|
29
|
+
await this.releaseConnection.release(connection);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.ConnectionFacade = ConnectionFacade;
|
|
33
|
+
//# sourceMappingURL=facade.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facade.js","sourceRoot":"","sources":["../../../../src/lib/connection/application/facade.ts"],"names":[],"mappings":";;;AAMA,MAAa,gBAAgB;IAC5B,kDAAkD;IAClD,YAA8B,cAAiC,EAC9C,WAAiC,EACjC,iBAAmC,EACnC,iBAAmC;QAHtB,mBAAc,GAAd,cAAc,CAAmB;QAC9C,gBAAW,GAAX,WAAW,CAAsB;QACjC,sBAAiB,GAAjB,iBAAiB,CAAkB;QACnC,sBAAiB,GAAjB,iBAAiB,CAAkB;IACjD,CAAC;IAEG,UAAU,CAAE,OAAc,EAAE,mBAAuB;QACzD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;QACrD,OAAO,IAAI,CAAA;IACZ,CAAC;IAEM,IAAI,CAAE,MAAuB;QACnC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;IAEM,SAAS,CAAE,IAAW;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,MAAM,CAAA;IACzC,CAAC;IAEM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAA;IACjC,CAAC;IAEM,KAAK,CAAC,OAAO,CAAE,IAAW;QAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,CAAC;IAEM,KAAK,CAAC,OAAO,CAAE,UAAqB;QAC1C,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IACjD,CAAC;CACD;AAhCD,4CAgCC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/connection/application/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./services/connectionPoolService"), exports);
|
|
18
|
+
__exportStar(require("./services/dialectPoolService"), exports);
|
|
19
|
+
__exportStar(require("./useCases/acquire"), exports);
|
|
20
|
+
__exportStar(require("./useCases/release"), exports);
|
|
21
|
+
__exportStar(require("./facade"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/connection/application/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAgD;AAChD,gEAA6C;AAC7C,qDAAkC;AAClC,qDAAkC;AAClC,2CAAwB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ConnectionConfig, ConnectionPool } from '../../domain';
|
|
2
|
+
import { DialectPoolService } from './dialectPoolService';
|
|
3
|
+
export declare class ConnectionPoolService {
|
|
4
|
+
private readonly dialectPoolService;
|
|
5
|
+
private pools;
|
|
6
|
+
constructor(dialectPoolService: DialectPoolService);
|
|
7
|
+
load(config: ConnectionConfig): void;
|
|
8
|
+
get(name: string): ConnectionPool;
|
|
9
|
+
end(name: string): Promise<void>;
|
|
10
|
+
endAll(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=connectionPoolService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectionPoolService.d.ts","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/connectionPoolService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAmB,cAAc,EAAE,MAAM,cAAc,CAAA;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAEzD,qBAAa,qBAAqB;IAGpB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IAFhD,OAAO,CAAC,KAAK,CAAS;gBAEQ,kBAAkB,EAAC,kBAAkB;IAE5D,IAAI,CAAE,MAAM,EAAC,gBAAgB,GAAE,IAAI;IAInC,GAAG,CAAE,IAAI,EAAC,MAAM,GAAE,cAAc;IAQ1B,GAAG,CAAE,IAAI,EAAC,MAAM,GAAE,OAAO,CAAC,IAAI,CAAC;IAO/B,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAMpC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectionPoolService = void 0;
|
|
4
|
+
const domain_1 = require("../../domain");
|
|
5
|
+
class ConnectionPoolService {
|
|
6
|
+
// eslint-disable-next-line no-useless-constructor
|
|
7
|
+
constructor(dialectPoolService) {
|
|
8
|
+
this.dialectPoolService = dialectPoolService;
|
|
9
|
+
this.pools = {};
|
|
10
|
+
}
|
|
11
|
+
load(config) {
|
|
12
|
+
this.pools[config.name] = this.dialectPoolService.create(config);
|
|
13
|
+
}
|
|
14
|
+
get(name) {
|
|
15
|
+
const pool = this.pools[name];
|
|
16
|
+
if (!pool) {
|
|
17
|
+
throw new domain_1.ConnectionError(`connection ${name} not found`);
|
|
18
|
+
}
|
|
19
|
+
return pool;
|
|
20
|
+
}
|
|
21
|
+
async end(name) {
|
|
22
|
+
const pool = this.pools[name];
|
|
23
|
+
if (pool) {
|
|
24
|
+
await pool.end();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async endAll() {
|
|
28
|
+
for (const k in this.pools) {
|
|
29
|
+
const pool = this.pools[k];
|
|
30
|
+
await pool.end();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.ConnectionPoolService = ConnectionPoolService;
|
|
35
|
+
//# sourceMappingURL=connectionPoolService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectionPoolService.js","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/connectionPoolService.ts"],"names":[],"mappings":";;;AAAA,yCAAgF;AAGhF,MAAa,qBAAqB;IAEjC,kDAAkD;IAClD,YAA8B,kBAAqC;QAArC,uBAAkB,GAAlB,kBAAkB,CAAmB;QAF3D,UAAK,GAAO,EAAE,CAAA;IAEgD,CAAC;IAEhE,IAAI,CAAE,MAAuB;QACnC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACjE,CAAC;IAEM,GAAG,CAAE,IAAW;QACtB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAmB,CAAA;QAC/C,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,IAAI,wBAAe,CAAC,cAAc,IAAI,YAAY,CAAC,CAAA;QAC1D,CAAC;QACD,OAAO,IAAI,CAAA;IACZ,CAAC;IAEM,KAAK,CAAC,GAAG,CAAE,IAAW;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAmB,CAAA;QAC/C,IAAI,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,CAAC,GAAG,EAAE,CAAA;QACjB,CAAC;IACF,CAAC;IAEM,KAAK,CAAC,MAAM;QAClB,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAmB,CAAA;YAC5C,MAAM,IAAI,CAAC,GAAG,EAAE,CAAA;QACjB,CAAC;IACF,CAAC;CACD;AA9BD,sDA8BC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=connectionService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectionService.d.ts","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/connectionService.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { ConnectionConfig, ConnectionError } from '../../domain'
|
|
3
|
+
// import { Connection } from '../ports/connection'
|
|
4
|
+
// import { ConnectionPool } from '../ports/connectionPool'
|
|
5
|
+
// export class ConnectionService {
|
|
6
|
+
// private dialectsPool:any
|
|
7
|
+
// private pools:any
|
|
8
|
+
// constructor () {
|
|
9
|
+
// this.dialectsPool = {}
|
|
10
|
+
// this.pools = {}
|
|
11
|
+
// }
|
|
12
|
+
// // public addDialect (dialect:string, classConnectionPool:new () => ConnectionPool) {
|
|
13
|
+
// public addDialect (dialect:string, classConnectionPool:any) {
|
|
14
|
+
// this.dialectsPool[dialect] = classConnectionPool
|
|
15
|
+
// }
|
|
16
|
+
// public load (config:ConnectionConfig):void {
|
|
17
|
+
// const DialectPool = this.dialectsPool[config.dialect]
|
|
18
|
+
// if (DialectPool === undefined) {
|
|
19
|
+
// throw new ConnectionError(`Connection to ${config.name} whit dialect ${config.dialect} not supported`)
|
|
20
|
+
// }
|
|
21
|
+
// const pool = new DialectPool(config) as ConnectionPool
|
|
22
|
+
// this.pools[config.name] = pool
|
|
23
|
+
// }
|
|
24
|
+
// protected pool (name:string):ConnectionPool {
|
|
25
|
+
// const pool = this.pools[name] as ConnectionPool
|
|
26
|
+
// if (!pool) {
|
|
27
|
+
// throw new ConnectionError(`connection ${name} not found`)
|
|
28
|
+
// }
|
|
29
|
+
// return pool
|
|
30
|
+
// }
|
|
31
|
+
// public async end ():Promise<void> {
|
|
32
|
+
// for (const k in this.pools) {
|
|
33
|
+
// const pool = this.pools[k] as ConnectionPool
|
|
34
|
+
// await pool.end()
|
|
35
|
+
// }
|
|
36
|
+
// }
|
|
37
|
+
// public get (name:string):ConnectionConfig {
|
|
38
|
+
// return this.pool(name).config
|
|
39
|
+
// }
|
|
40
|
+
// public async acquire (name:string):Promise<Connection> {
|
|
41
|
+
// const pool = this.pools[name] as ConnectionPool
|
|
42
|
+
// if (!pool) { throw new ConnectionError(`connection ${name} not found`) }
|
|
43
|
+
// return this.pool(name).acquire()
|
|
44
|
+
// }
|
|
45
|
+
// public async release (connection:Connection):Promise<void> {
|
|
46
|
+
// await this.pool(connection.config.name).release(connection)
|
|
47
|
+
// }
|
|
48
|
+
// }
|
|
49
|
+
//# sourceMappingURL=connectionService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connectionService.js","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/connectionService.ts"],"names":[],"mappings":";AAAA,mEAAmE;AACnE,mDAAmD;AACnD,2DAA2D;AAE3D,mCAAmC;AACnC,2BAA2B;AAC3B,oBAAoB;AACpB,mBAAmB;AACnB,yBAAyB;AACzB,kBAAkB;AAClB,IAAI;AAEJ,wFAAwF;AACxF,gEAAgE;AAChE,mDAAmD;AACnD,IAAI;AAEJ,+CAA+C;AAC/C,wDAAwD;AACxD,mCAAmC;AACnC,yGAAyG;AACzG,IAAI;AACJ,yDAAyD;AACzD,iCAAiC;AACjC,IAAI;AAEJ,gDAAgD;AAChD,kDAAkD;AAClD,eAAe;AACf,4DAA4D;AAC5D,IAAI;AACJ,cAAc;AACd,IAAI;AAEJ,sCAAsC;AACtC,gCAAgC;AAChC,+CAA+C;AAC/C,mBAAmB;AACnB,IAAI;AACJ,IAAI;AAEJ,8CAA8C;AAC9C,gCAAgC;AAChC,IAAI;AAEJ,2DAA2D;AAC3D,kDAAkD;AAClD,2EAA2E;AAE3E,mCAAmC;AACnC,IAAI;AAEJ,+DAA+D;AAC/D,8DAA8D;AAC9D,IAAI;AACJ,IAAI"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OrmH3lp } from '../../../shared/infrastructure';
|
|
2
|
+
import { ConnectionConfig, ConnectionPool } from '../../domain';
|
|
3
|
+
export declare class DialectPoolService {
|
|
4
|
+
private readonly helper;
|
|
5
|
+
private dialectsPool;
|
|
6
|
+
constructor(helper: OrmH3lp);
|
|
7
|
+
add(dialect: string, classConnectionPool: any): void;
|
|
8
|
+
create(config: ConnectionConfig): ConnectionPool;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=dialectPoolService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectPoolService.d.ts","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/dialectPoolService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAmB,cAAc,EAAE,MAAM,cAAc,CAAA;AAEhF,qBAAa,kBAAkB;IAEjB,OAAO,CAAC,QAAQ,CAAC,MAAM;IADpC,OAAO,CAAC,YAAY,CAAI;gBACM,MAAM,EAAC,OAAO;IAIrC,GAAG,CAAE,OAAO,EAAC,MAAM,EAAE,mBAAmB,EAAC,GAAG,GAAE,IAAI;IAIlD,MAAM,CAAE,MAAM,EAAC,gBAAgB,GAAE,cAAc;CAOtD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialectPoolService = void 0;
|
|
4
|
+
const domain_1 = require("../../domain");
|
|
5
|
+
class DialectPoolService {
|
|
6
|
+
constructor(helper) {
|
|
7
|
+
this.helper = helper;
|
|
8
|
+
this.dialectsPool = {};
|
|
9
|
+
}
|
|
10
|
+
add(dialect, classConnectionPool) {
|
|
11
|
+
this.dialectsPool[dialect] = classConnectionPool;
|
|
12
|
+
}
|
|
13
|
+
create(config) {
|
|
14
|
+
const DialectPool = this.dialectsPool[config.dialect];
|
|
15
|
+
if (DialectPool === undefined) {
|
|
16
|
+
throw new domain_1.ConnectionError(`Connection to ${config.name} whit dialect ${config.dialect} not supported`);
|
|
17
|
+
}
|
|
18
|
+
return new DialectPool(config, this.helper);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.DialectPoolService = DialectPoolService;
|
|
22
|
+
//# sourceMappingURL=dialectPoolService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialectPoolService.js","sourceRoot":"","sources":["../../../../../src/lib/connection/application/services/dialectPoolService.ts"],"names":[],"mappings":";;;AACA,yCAAgF;AAEhF,MAAa,kBAAkB;IAE9B,YAA8B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QAC3C,IAAI,CAAC,YAAY,GAAG,EAAE,CAAA;IACvB,CAAC;IAEM,GAAG,CAAE,OAAc,EAAE,mBAAuB;QAClD,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,mBAAmB,CAAA;IACjD,CAAC;IAEM,MAAM,CAAE,MAAuB;QACrC,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACrD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC/B,MAAM,IAAI,wBAAe,CAAC,iBAAiB,MAAM,CAAC,IAAI,iBAAiB,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAA;QACvG,CAAC;QACD,OAAO,IAAI,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAmB,CAAA;IAC9D,CAAC;CACD;AAjBD,gDAiBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Connection } from '../../domain';
|
|
2
|
+
import { ConnectionPoolService } from '../services/connectionPoolService';
|
|
3
|
+
export declare class AcquireConnection {
|
|
4
|
+
private readonly poolService;
|
|
5
|
+
constructor(poolService: ConnectionPoolService);
|
|
6
|
+
acquire(name: string): Promise<Connection>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=acquire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire.d.ts","sourceRoot":"","sources":["../../../../../src/lib/connection/application/useCases/acquire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAEzE,qBAAa,iBAAiB;IAEhB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAC,qBAAqB;IAElD,OAAO,CAAE,IAAI,EAAC,MAAM,GAAE,OAAO,CAAC,UAAU,CAAC;CAGtD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AcquireConnection = void 0;
|
|
4
|
+
class AcquireConnection {
|
|
5
|
+
// eslint-disable-next-line no-useless-constructor
|
|
6
|
+
constructor(poolService) {
|
|
7
|
+
this.poolService = poolService;
|
|
8
|
+
}
|
|
9
|
+
async acquire(name) {
|
|
10
|
+
return this.poolService.get(name).acquire();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.AcquireConnection = AcquireConnection;
|
|
14
|
+
//# sourceMappingURL=acquire.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquire.js","sourceRoot":"","sources":["../../../../../src/lib/connection/application/useCases/acquire.ts"],"names":[],"mappings":";;;AAGA,MAAa,iBAAiB;IAC7B,kDAAkD;IAClD,YAA8B,WAAiC;QAAjC,gBAAW,GAAX,WAAW,CAAsB;IAAG,CAAC;IAE5D,KAAK,CAAC,OAAO,CAAE,IAAW;QAChC,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAA;IAC5C,CAAC;CACD;AAPD,8CAOC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Connection } from '../../domain';
|
|
2
|
+
import { ConnectionPoolService } from '../services/connectionPoolService';
|
|
3
|
+
export declare class ReleaseConnection {
|
|
4
|
+
private readonly poolService;
|
|
5
|
+
constructor(poolService: ConnectionPoolService);
|
|
6
|
+
release(connection: Connection): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=release.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../../../src/lib/connection/application/useCases/release.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAEzE,qBAAa,iBAAiB;IAEhB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAC,qBAAqB;IAElD,OAAO,CAAE,UAAU,EAAC,UAAU,GAAE,OAAO,CAAC,IAAI,CAAC;CAG1D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ReleaseConnection = void 0;
|
|
4
|
+
class ReleaseConnection {
|
|
5
|
+
// eslint-disable-next-line no-useless-constructor
|
|
6
|
+
constructor(poolService) {
|
|
7
|
+
this.poolService = poolService;
|
|
8
|
+
}
|
|
9
|
+
async release(connection) {
|
|
10
|
+
await this.poolService.get(connection.config.name).release(connection);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.ReleaseConnection = ReleaseConnection;
|
|
14
|
+
//# sourceMappingURL=release.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release.js","sourceRoot":"","sources":["../../../../../src/lib/connection/application/useCases/release.ts"],"names":[],"mappings":";;;AAGA,MAAa,iBAAiB;IAC7B,kDAAkD;IAClD,YAA8B,WAAiC;QAAjC,gBAAW,GAAX,WAAW,CAAsB;IAAG,CAAC;IAE5D,KAAK,CAAC,OAAO,CAAE,UAAqB;QAC1C,MAAM,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;IACvE,CAAC;CACD;AAPD,8CAOC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../../src/lib/connection/domain/connection.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAC,MAAM,CAAA;IACX,OAAO,EAAC,MAAM,CAAA;IACd,UAAU,EAAC,GAAG,CAAA;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.js","sourceRoot":"","sources":["../../../../src/lib/connection/domain/connection.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare class ConnectionError extends Error {
|
|
2
|
+
constructor(message: string);
|
|
3
|
+
}
|
|
4
|
+
export declare class ExecutionError extends Error {
|
|
5
|
+
constructor(source: string, entity: string, sentence: string, message: string, data?: any);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/lib/connection/domain/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAC,MAAM;CAI3B;AAED,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,GAAQ;CAI9F"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExecutionError = exports.ConnectionError = void 0;
|
|
4
|
+
class ConnectionError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
7
|
+
this.name = 'ConnectionError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ConnectionError = ConnectionError;
|
|
11
|
+
class ExecutionError extends Error {
|
|
12
|
+
constructor(source, entity, sentence, message, data = {}) {
|
|
13
|
+
super(`ERROR: ${message} SOURCE: ${source} ENTITY: ${entity} QUERY: ${sentence} DATA:${JSON.stringify(data)}`);
|
|
14
|
+
this.name = 'ExecutionError';
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ExecutionError = ExecutionError;
|
|
18
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/lib/connection/domain/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,eAAgB,SAAQ,KAAK;IACzC,YAAa,OAAc;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC9B,CAAC;CACD;AALD,0CAKC;AAED,MAAa,cAAe,SAAQ,KAAK;IACxC,YAAa,MAAc,EAAE,MAAc,EAAE,QAAgB,EAAE,OAAe,EAAE,OAAY,EAAE;QAC7F,KAAK,CAAC,UAAU,OAAO,YAAY,MAAM,YAAY,MAAM,WAAW,QAAQ,UAAU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC/G,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;IAC7B,CAAC;CACD;AALD,wCAKC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/connection/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./connection"), exports);
|
|
18
|
+
__exportStar(require("./errors"), exports);
|
|
19
|
+
__exportStar(require("./ports/connectionPool"), exports);
|
|
20
|
+
__exportStar(require("./ports/connection"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/connection/domain/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,2CAAwB;AACxB,yDAAsC;AACtC,qDAAkC"}
|