@anncic-api/typeorm 3.7.19 → 3.7.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.
Files changed (35) hide show
  1. package/dist/configuration.d.ts +8 -8
  2. package/dist/configuration.js +1 -64
  3. package/dist/decorator/InjectEntity.d.ts +1 -1
  4. package/dist/decorator/InjectEntity.js +1 -9
  5. package/dist/decorator/InjectRepository.d.ts +8 -8
  6. package/dist/decorator/InjectRepository.js +1 -9
  7. package/dist/decorator/ProvideEntity.d.ts +5 -5
  8. package/dist/decorator/ProvideEntity.js +1 -27
  9. package/dist/decorator/ProvideObserve.d.ts +2 -2
  10. package/dist/decorator/ProvideObserve.js +1 -17
  11. package/dist/decorator/ProvideRepository.d.ts +2 -2
  12. package/dist/decorator/ProvideRepository.js +1 -12
  13. package/dist/decorator/ProvideSearch.d.ts +3 -3
  14. package/dist/decorator/ProvideSearch.js +1 -25
  15. package/dist/decorator/ProvideSharding.d.ts +1 -1
  16. package/dist/decorator/ProvideSharding.js +1 -14
  17. package/dist/decorator/VirtualColumn.d.ts +4 -4
  18. package/dist/decorator/VirtualColumn.js +1 -13
  19. package/dist/definition/Repository.d.ts +25 -25
  20. package/dist/definition/Repository.js +1 -217
  21. package/dist/helper/getDataSourceEntity.d.ts +1 -1
  22. package/dist/helper/getDataSourceEntity.js +1 -17
  23. package/dist/helper/getProvideObserve.d.ts +1 -1
  24. package/dist/helper/getProvideObserve.js +1 -9
  25. package/dist/helper/sleep.d.ts +1 -1
  26. package/dist/helper/sleep.js +1 -7
  27. package/dist/index.d.ts +15 -15
  28. package/dist/index.js +1 -51
  29. package/dist/interface.d.ts +80 -79
  30. package/dist/interface.js +1 -326
  31. package/dist/interfaceSharding.d.ts +22 -22
  32. package/dist/interfaceSharding.js +1 -239
  33. package/package.json +3 -3
  34. package/dist/helper/preCreateShardingTables.d.ts +0 -1
  35. package/dist/helper/preCreateShardingTables.js +0 -1
@@ -1,8 +1,8 @@
1
- import { MidwayConfigService, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
2
- import { Repository as IRepository } from "./definition/Repository";
3
- export declare class CustomConfiguration {
4
- config: MidwayConfigService;
5
- decorator: MidwayDecoratorService;
6
- protected handlercache: Map<any, IRepository<any>>;
7
- onReady(container: IMidwayContainer, app: IMidwayApplication): Promise<void>;
8
- }
1
+ import { MidwayConfigService, MidwayDecoratorService, IMidwayContainer, IMidwayApplication } from '@midwayjs/core';
2
+ import { Repository as IRepository } from "./definition/Repository";
3
+ export declare class CustomConfiguration {
4
+ config: MidwayConfigService;
5
+ decorator: MidwayDecoratorService;
6
+ protected handlercache: Map<any, IRepository<any>>;
7
+ onReady(container: IMidwayContainer, app: IMidwayApplication): Promise<void>;
8
+ }
@@ -1,64 +1 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CustomConfiguration = void 0;
13
- const typeorm_1 = require("@midwayjs/typeorm");
14
- const core_1 = require("@midwayjs/core");
15
- const core_2 = require("@midwayjs/core");
16
- const Repository_1 = require("./definition/Repository");
17
- const interface_1 = require("./interface");
18
- const typeorm = require("@midwayjs/typeorm");
19
- let CustomConfiguration = class CustomConfiguration {
20
- constructor() {
21
- this.handlercache = new Map();
22
- }
23
- async onReady(container, app) {
24
- const dataSourceManager = await container.getAsync(typeorm_1.TypeORMDataSourceManager);
25
- this.decorator.registerPropertyHandler(interface_1.ENTIFY_KEY, (propertyName, { entity, connection }) => {
26
- if (!this.handlercache.has(entity)) {
27
- const newHandler = container.get(Repository_1.Repository, [app, container, dataSourceManager.getDataSource(connection || dataSourceManager.getDataSourceNameByModel(entity)).getRepository(entity)]);
28
- this.handlercache.set(entity, newHandler);
29
- }
30
- return this.handlercache.get(entity);
31
- });
32
- this.decorator.registerPropertyHandler(interface_1.REPOSITORY_KEY, (propertyName, { repository, connection }) => {
33
- if (!repository) {
34
- throw new Error(`typeorm Error propertyName is not InjectRepository repository`);
35
- }
36
- const { entity } = (0, core_1.getClassMetadata)(interface_1.REPOSITORY_KEY, repository) || {};
37
- if (!entity) {
38
- throw new Error(`typeorm Error ${(repository === null || repository === void 0 ? void 0 : repository.name) || repository} is not ProvideRepository Entify`);
39
- }
40
- if (!this.handlercache.has(repository)) {
41
- const newHandler = container.get(repository, [app, container, dataSourceManager.getDataSource(connection || dataSourceManager.getDataSourceNameByModel(entity)).getRepository(entity)]);
42
- this.handlercache.set(repository, newHandler);
43
- }
44
- return this.handlercache.get(repository);
45
- });
46
- }
47
- };
48
- exports.CustomConfiguration = CustomConfiguration;
49
- __decorate([
50
- (0, core_1.Inject)(),
51
- __metadata("design:type", core_2.MidwayConfigService)
52
- ], CustomConfiguration.prototype, "config", void 0);
53
- __decorate([
54
- (0, core_1.Inject)(),
55
- __metadata("design:type", core_2.MidwayDecoratorService)
56
- ], CustomConfiguration.prototype, "decorator", void 0);
57
- exports.CustomConfiguration = CustomConfiguration = __decorate([
58
- (0, core_1.Configuration)({
59
- imports: [typeorm],
60
- conflictCheck: false,
61
- namespace: 'anncic-api:typeorm',
62
- })
63
- ], CustomConfiguration);
64
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi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QyxDQUFBO1lBQ2pELENBQUM7WUFFRCxPQUFPLElBQUksQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLFVBQVUsQ0FBQyxDQUFBO1FBQzVDLENBQUMsQ0FBQyxDQUFDO0lBQ1AsQ0FBQztDQUNKLENBQUE7QUFyQ1ksa0RBQW1CO0FBQ2xCO0lBQVQsSUFBQSxhQUFNLEdBQUU7OEJBQVMsMEJBQW1CO21EQUFDO0FBQzVCO0lBQVQsSUFBQSxhQUFNLEdBQUU7OEJBQVksNkJBQXNCO3NEQUFDOzhCQUZuQyxtQkFBbUI7SUFOL0IsSUFBQSxvQkFBYSxFQUFDO1FBQ1gsT0FBTyxFQUFFLENBQUMsT0FBTyxDQUFDO1FBQ2xCLGFBQWEsRUFBRSxLQUFLO1FBQ3BCLFNBQVMsRUFBRSxvQkFBb0I7S0FDbEMsQ0FBQztHQUVXLG1CQUFtQixDQXFDL0IifQ==
1
+ const a0_0x2d86aa=a0_0x1241;(function(_0x433f81,_0x29fda3){const _0x130f12=a0_0x1241,_0x7b8da4=_0x433f81();while(!![]){try{const _0x25cdba=parseInt(_0x130f12(0x1f1))/0x1*(-parseInt(_0x130f12(0x1ec))/0x2)+parseInt(_0x130f12(0x201))/0x3*(parseInt(_0x130f12(0x211))/0x4)+-parseInt(_0x130f12(0x1f5))/0x5*(parseInt(_0x130f12(0x206))/0x6)+parseInt(_0x130f12(0x1e3))/0x7+parseInt(_0x130f12(0x1ea))/0x8*(-parseInt(_0x130f12(0x1ee))/0x9)+-parseInt(_0x130f12(0x20e))/0xa+parseInt(_0x130f12(0x1e8))/0xb*(parseInt(_0x130f12(0x202))/0xc);if(_0x25cdba===_0x29fda3)break;else _0x7b8da4['push'](_0x7b8da4['shift']());}catch(_0x3eceb1){_0x7b8da4['push'](_0x7b8da4['shift']());}}}(a0_0x68e9,0x809db));const a0_0x3c7036=(function(){let _0x4884b6=!![];return function(_0x2452e7,_0x4be6f9){const _0x25d8b0=_0x4884b6?function(){const _0x37f717=a0_0x1241;if(_0x4be6f9){const _0x4fda36=_0x4be6f9[_0x37f717(0x1e4)](_0x2452e7,arguments);return _0x4be6f9=null,_0x4fda36;}}:function(){};return _0x4884b6=![],_0x25d8b0;};}()),a0_0x35ca90=a0_0x3c7036(this,function(){const _0xd824d9=a0_0x1241;return a0_0x35ca90[_0xd824d9(0x20f)]()['search'](_0xd824d9(0x1e2))[_0xd824d9(0x20f)]()[_0xd824d9(0x1e5)](a0_0x35ca90)[_0xd824d9(0x1f0)](_0xd824d9(0x1e2));});function a0_0x1241(_0x396bf5,_0xf3f860){const _0x55c0a1=a0_0x68e9();return a0_0x1241=function(_0x35ca90,_0x3c7036){_0x35ca90=_0x35ca90-0x1de;let _0x68e93c=_0x55c0a1[_0x35ca90];return _0x68e93c;},a0_0x1241(_0x396bf5,_0xf3f860);}a0_0x35ca90();'use strict';var __decorate=this&&this[a0_0x2d86aa(0x1e9)]||function(_0x27ee47,_0x39d54d,_0x5f0d24,_0x5aea81){const _0xf8fa3a=a0_0x2d86aa;var _0x591d4b=arguments[_0xf8fa3a(0x205)],_0x573191=_0x591d4b<0x3?_0x39d54d:_0x5aea81===null?_0x5aea81=Object[_0xf8fa3a(0x1de)](_0x39d54d,_0x5f0d24):_0x5aea81,_0x3f1d04;if(typeof Reflect===_0xf8fa3a(0x1f6)&&typeof Reflect[_0xf8fa3a(0x1ef)]===_0xf8fa3a(0x1f9))_0x573191=Reflect[_0xf8fa3a(0x1ef)](_0x27ee47,_0x39d54d,_0x5f0d24,_0x5aea81);else{for(var _0x392a3e=_0x27ee47['length']-0x1;_0x392a3e>=0x0;_0x392a3e--)if(_0x3f1d04=_0x27ee47[_0x392a3e])_0x573191=(_0x591d4b<0x3?_0x3f1d04(_0x573191):_0x591d4b>0x3?_0x3f1d04(_0x39d54d,_0x5f0d24,_0x573191):_0x3f1d04(_0x39d54d,_0x5f0d24))||_0x573191;}return _0x591d4b>0x3&&_0x573191&&Object[_0xf8fa3a(0x1ff)](_0x39d54d,_0x5f0d24,_0x573191),_0x573191;},__metadata=this&&this[a0_0x2d86aa(0x1df)]||function(_0x49a5c7,_0x421285){const _0x27caf9=a0_0x2d86aa;if(typeof Reflect===_0x27caf9(0x1f6)&&typeof Reflect[_0x27caf9(0x1fd)]===_0x27caf9(0x1f9))return Reflect[_0x27caf9(0x1fd)](_0x49a5c7,_0x421285);};function a0_0x68e9(){const _0x4c592f=['get','design:type','(((.+)+)+)+$','5500838bPoRRk','apply','constructor','typeorm\x20Error\x20propertyName\x20is\x20not\x20InjectRepository\x20repository','prototype','3331130usrPik','__decorate','683752OvdEFL','getRepository','6hmUhZY','decorator','99SCqtPT','decorate','search','251254hOOtzr','CustomConfiguration','handlercache','@midwayjs/core','5GQUjVR','object','onReady','./definition/Repository','function','set','@midwayjs/typeorm','REPOSITORY_KEY','metadata','config','defineProperty','getClassMetadata','2648553SeBBjQ','60zJoXSe','name','getDataSource','length','3296502VJqhCb','Configuration','Inject','MidwayConfigService','registerPropertyHandler','has','getDataSourceNameByModel','ENTIFY_KEY','4126860AniTCD','toString','./interface','4PoLabw','getOwnPropertyDescriptor','__metadata'];a0_0x68e9=function(){return _0x4c592f;};return a0_0x68e9();}Object[a0_0x2d86aa(0x1ff)](exports,'__esModule',{'value':!![]}),exports[a0_0x2d86aa(0x1f2)]=void 0x0;const typeorm_1=require('@midwayjs/typeorm'),core_1=require(a0_0x2d86aa(0x1f4)),core_2=require(a0_0x2d86aa(0x1f4)),Repository_1=require(a0_0x2d86aa(0x1f8)),interface_1=require(a0_0x2d86aa(0x210)),typeorm=require(a0_0x2d86aa(0x1fb));let CustomConfiguration=class CustomConfiguration{constructor(){this['handlercache']=new Map();}async[a0_0x2d86aa(0x1f7)](_0x5f1801,_0x1ef2dd){const _0x149f2b=a0_0x2d86aa,_0xbb30fd=await _0x5f1801['getAsync'](typeorm_1['TypeORMDataSourceManager']);this[_0x149f2b(0x1ed)][_0x149f2b(0x20a)](interface_1[_0x149f2b(0x20d)],(_0x4b8722,{entity:_0x57ae22,connection:_0x2da534})=>{const _0x5084df=_0x149f2b;if(!this[_0x5084df(0x1f3)][_0x5084df(0x20b)](_0x57ae22)){const _0x550d99=_0x5f1801[_0x5084df(0x1e0)](Repository_1['Repository'],[_0x1ef2dd,_0x5f1801,_0xbb30fd[_0x5084df(0x204)](_0x2da534||_0xbb30fd[_0x5084df(0x20c)](_0x57ae22))[_0x5084df(0x1eb)](_0x57ae22)]);this['handlercache'][_0x5084df(0x1fa)](_0x57ae22,_0x550d99);}return this[_0x5084df(0x1f3)][_0x5084df(0x1e0)](_0x57ae22);}),this[_0x149f2b(0x1ed)][_0x149f2b(0x20a)](interface_1[_0x149f2b(0x1fc)],(_0x3a5e26,{repository:_0x1ce62c,connection:_0xe20ce4})=>{const _0x57b5aa=_0x149f2b;if(!_0x1ce62c)throw new Error(_0x57b5aa(0x1e6));const {entity:_0x4ccb33}=(0x0,core_1[_0x57b5aa(0x200)])(interface_1[_0x57b5aa(0x1fc)],_0x1ce62c)||{};if(!_0x4ccb33)throw new Error('typeorm\x20Error\x20'+((_0x1ce62c===null||_0x1ce62c===void 0x0?void 0x0:_0x1ce62c[_0x57b5aa(0x203)])||_0x1ce62c)+'\x20is\x20not\x20ProvideRepository\x20Entify');if(!this['handlercache'][_0x57b5aa(0x20b)](_0x1ce62c)){const _0x2a36d6=_0x5f1801[_0x57b5aa(0x1e0)](_0x1ce62c,[_0x1ef2dd,_0x5f1801,_0xbb30fd['getDataSource'](_0xe20ce4||_0xbb30fd[_0x57b5aa(0x20c)](_0x4ccb33))[_0x57b5aa(0x1eb)](_0x4ccb33)]);this[_0x57b5aa(0x1f3)][_0x57b5aa(0x1fa)](_0x1ce62c,_0x2a36d6);}return this[_0x57b5aa(0x1f3)][_0x57b5aa(0x1e0)](_0x1ce62c);});}};__decorate([(0x0,core_1[a0_0x2d86aa(0x208)])(),__metadata(a0_0x2d86aa(0x1e1),core_2[a0_0x2d86aa(0x209)])],CustomConfiguration[a0_0x2d86aa(0x1e7)],a0_0x2d86aa(0x1fe),void 0x0),__decorate([(0x0,core_1[a0_0x2d86aa(0x208)])(),__metadata(a0_0x2d86aa(0x1e1),core_2['MidwayDecoratorService'])],CustomConfiguration[a0_0x2d86aa(0x1e7)],'decorator',void 0x0),CustomConfiguration=__decorate([(0x0,core_1[a0_0x2d86aa(0x207)])({'imports':[typeorm],'conflictCheck':![],'namespace':'anncic-api:typeorm'})],CustomConfiguration),exports['CustomConfiguration']=CustomConfiguration;
@@ -1 +1 @@
1
- export declare function InjectEntity(entity: any, connection?: string): any;
1
+ export declare function InjectEntity(entity: any, connection?: string): any;
@@ -1,9 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InjectEntity = InjectEntity;
4
- const core_1 = require("@midwayjs/core");
5
- const interface_1 = require("../interface");
6
- function InjectEntity(entity, connection = 'default') {
7
- return (0, core_1.createCustomPropertyDecorator)(interface_1.ENTIFY_KEY, { entity, connection });
8
- }
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0RW50aXR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlY29yYXRvci9JbmplY3RFbnRpdHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFHQSxvQ0FFQztBQUxELHlDQUErRDtBQUMvRCw0Q0FBMEM7QUFFMUMsU0FBZ0IsWUFBWSxDQUFDLE1BQVcsRUFBRSxVQUFVLEdBQUcsU0FBUztJQUM1RCxPQUFPLElBQUEsb0NBQTZCLEVBQUMsc0JBQVUsRUFBRSxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsQ0FBQyxDQUFDO0FBQzdFLENBQUMifQ==
1
+ const a1_0x455541=a1_0x495f;(function(_0x170b0a,_0x25c8fd){const _0x265f3e=a1_0x495f,_0x60b47c=_0x170b0a();while(!![]){try{const _0x1fd4b5=-parseInt(_0x265f3e(0xa1))/0x1*(-parseInt(_0x265f3e(0x9e))/0x2)+-parseInt(_0x265f3e(0xae))/0x3+-parseInt(_0x265f3e(0xa5))/0x4+-parseInt(_0x265f3e(0x9c))/0x5*(parseInt(_0x265f3e(0xa2))/0x6)+parseInt(_0x265f3e(0xa6))/0x7+-parseInt(_0x265f3e(0xaf))/0x8+-parseInt(_0x265f3e(0xa0))/0x9*(-parseInt(_0x265f3e(0x9b))/0xa);if(_0x1fd4b5===_0x25c8fd)break;else _0x60b47c['push'](_0x60b47c['shift']());}catch(_0x520af8){_0x60b47c['push'](_0x60b47c['shift']());}}}(a1_0x1965,0x6453a));const a1_0x54e266=(function(){let _0x3cfb08=!![];return function(_0x32c2a9,_0x2ad2b2){const _0x57e64e=_0x3cfb08?function(){if(_0x2ad2b2){const _0x5dde3c=_0x2ad2b2['apply'](_0x32c2a9,arguments);return _0x2ad2b2=null,_0x5dde3c;}}:function(){};return _0x3cfb08=![],_0x57e64e;};}()),a1_0x48f9cb=a1_0x54e266(this,function(){const _0xf62b00=a1_0x495f;return a1_0x48f9cb['toString']()['search'](_0xf62b00(0xad))['toString']()[_0xf62b00(0xa9)](a1_0x48f9cb)[_0xf62b00(0xac)](_0xf62b00(0xad));});a1_0x48f9cb();'use strict';Object[a1_0x455541(0xab)](exports,a1_0x455541(0xa7),{'value':!![]}),exports[a1_0x455541(0x9d)]=void 0x0;const core_1=require(a1_0x455541(0xa4)),interface_1=require(a1_0x455541(0xa8));function a1_0x495f(_0x27dd28,_0x2f000b){const _0x52ee79=a1_0x1965();return a1_0x495f=function(_0x48f9cb,_0x54e266){_0x48f9cb=_0x48f9cb-0x9b;let _0x1965e4=_0x52ee79[_0x48f9cb];return _0x1965e4;},a1_0x495f(_0x27dd28,_0x2f000b);}function a1_0x1965(){const _0x394b66=['10SgscDG','InjectEntity','1386206FPMwpR','createCustomPropertyDecorator','10002006itkbIo','1DcrMEq','1203522CBzAVZ','default','@midwayjs/core','1973464ZLzieV','4046203hkkJxn','__esModule','../interface','constructor','ENTIFY_KEY','defineProperty','search','(((.+)+)+)+$','1312557kmbUeZ','5115752jtISly','10xiOOQG'];a1_0x1965=function(){return _0x394b66;};return a1_0x1965();}function InjectEntity(_0x5d4a0c,_0x23271a=a1_0x455541(0xa3)){const _0xc18e08=a1_0x455541;return(0x0,core_1[_0xc18e08(0x9f)])(interface_1[_0xc18e08(0xaa)],{'entity':_0x5d4a0c,'connection':_0x23271a});}exports[a1_0x455541(0x9d)]=InjectEntity;
@@ -1,8 +1,8 @@
1
- import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
2
- import { Repository as BaseRepository, ObjectLiteral } from "typeorm";
3
- import { Repository } from '../definition/Repository';
4
- interface RepositoryOption<Entity extends ObjectLiteral> {
5
- new (app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>): Repository<Entity>;
6
- }
7
- export declare function InjectRepository<T extends ObjectLiteral>(repository: RepositoryOption<T>, connection?: string): any;
8
- export {};
1
+ import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
2
+ import { Repository as BaseRepository, ObjectLiteral } from "typeorm";
3
+ import { Repository } from '../definition/Repository';
4
+ interface RepositoryOption<Entity extends ObjectLiteral> {
5
+ new (app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>): Repository<Entity>;
6
+ }
7
+ export declare function InjectRepository<T extends ObjectLiteral>(repository: RepositoryOption<T>, connection?: string): any;
8
+ export {};
@@ -1,9 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InjectRepository = InjectRepository;
4
- const core_1 = require("@midwayjs/core");
5
- const interface_1 = require("../interface");
6
- function InjectRepository(repository, connection = 'default') {
7
- return (0, core_1.createCustomPropertyDecorator)(interface_1.REPOSITORY_KEY, { repository, connection });
8
- }
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5qZWN0UmVwb3NpdG9yeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3IvSW5qZWN0UmVwb3NpdG9yeS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVlBLDRDQUVDO0FBZEQseUNBQStEO0FBSS9ELDRDQUE4QztBQVE5QyxTQUFnQixnQkFBZ0IsQ0FBMEIsVUFBK0IsRUFBRSxVQUFVLEdBQUcsU0FBUztJQUM3RyxPQUFPLElBQUEsb0NBQTZCLEVBQUMsMEJBQWMsRUFBRSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsQ0FBQyxDQUFDO0FBQ3JGLENBQUMifQ==
1
+ const a2_0x20792a=a2_0x555e;(function(_0x48a374,_0x3e785e){const _0x498d56=a2_0x555e,_0xfcc553=_0x48a374();while(!![]){try{const _0x2695b6=parseInt(_0x498d56(0x154))/0x1*(-parseInt(_0x498d56(0x144))/0x2)+parseInt(_0x498d56(0x14e))/0x3+-parseInt(_0x498d56(0x143))/0x4+-parseInt(_0x498d56(0x14a))/0x5*(parseInt(_0x498d56(0x150))/0x6)+parseInt(_0x498d56(0x153))/0x7+-parseInt(_0x498d56(0x156))/0x8+-parseInt(_0x498d56(0x146))/0x9*(-parseInt(_0x498d56(0x14f))/0xa);if(_0x2695b6===_0x3e785e)break;else _0xfcc553['push'](_0xfcc553['shift']());}catch(_0x2d2a5b){_0xfcc553['push'](_0xfcc553['shift']());}}}(a2_0x24ea,0x3cf5b));const a2_0x5f00fa=(function(){let _0x3a27d7=!![];return function(_0x4f2292,_0x51cd56){const _0x506616=_0x3a27d7?function(){const _0x433fc6=a2_0x555e;if(_0x51cd56){const _0x80980b=_0x51cd56[_0x433fc6(0x148)](_0x4f2292,arguments);return _0x51cd56=null,_0x80980b;}}:function(){};return _0x3a27d7=![],_0x506616;};}()),a2_0x2239a9=a2_0x5f00fa(this,function(){const _0x2a7198=a2_0x555e;return a2_0x2239a9[_0x2a7198(0x157)]()[_0x2a7198(0x141)](_0x2a7198(0x145))['toString']()[_0x2a7198(0x142)](a2_0x2239a9)['search'](_0x2a7198(0x145));});a2_0x2239a9();'use strict';Object[a2_0x20792a(0x147)](exports,a2_0x20792a(0x155),{'value':!![]}),exports['InjectRepository']=void 0x0;const core_1=require(a2_0x20792a(0x14c)),interface_1=require(a2_0x20792a(0x14d));function a2_0x24ea(){const _0x3e0af2=['10465ZzlHuL','__esModule','2878992ITHDsx','toString','search','constructor','1945972kUEYtf','78WmXSHQ','(((.+)+)+)+$','13410kkxEaA','defineProperty','apply','REPOSITORY_KEY','174775BYLSsI','createCustomPropertyDecorator','@midwayjs/core','../interface','23370ySxlls','8180PjEIln','18xQgCIE','InjectRepository','default','2677136wopRPV'];a2_0x24ea=function(){return _0x3e0af2;};return a2_0x24ea();}function InjectRepository(_0x3a5fb2,_0x841943=a2_0x20792a(0x152)){const _0x2da01e=a2_0x20792a;return(0x0,core_1[_0x2da01e(0x14b)])(interface_1[_0x2da01e(0x149)],{'repository':_0x3a5fb2,'connection':_0x841943});}function a2_0x555e(_0x4f3c68,_0x2f14b1){const _0x250b70=a2_0x24ea();return a2_0x555e=function(_0x2239a9,_0x5f00fa){_0x2239a9=_0x2239a9-0x141;let _0x24ea11=_0x250b70[_0x2239a9];return _0x24ea11;},a2_0x555e(_0x4f3c68,_0x2f14b1);}exports[a2_0x20792a(0x151)]=InjectRepository;
@@ -1,5 +1,5 @@
1
- import { EntityOptions } from "typeorm";
2
- export declare function ProvideEntity(table: {
3
- tableName: string;
4
- dataSource?: string | string[];
5
- }, option?: EntityOptions): ClassDecorator;
1
+ import { EntityOptions } from "typeorm";
2
+ export declare function ProvideEntity(table: {
3
+ tableName: string;
4
+ dataSource?: string | string[];
5
+ }, option?: EntityOptions): ClassDecorator;
@@ -1,27 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProvideEntity = ProvideEntity;
4
- const typeorm_1 = require("typeorm");
5
- const core_1 = require("@midwayjs/core");
6
- const interface_1 = require("../interface");
7
- function ProvideEntity(table, option = {}) {
8
- return (target) => {
9
- option.name = table.tableName;
10
- const dataSource = [];
11
- if (!(table === null || table === void 0 ? void 0 : table.dataSource)) {
12
- dataSource.push('default');
13
- }
14
- else if (typeof (table === null || table === void 0 ? void 0 : table.dataSource) == 'string') {
15
- dataSource.push(table === null || table === void 0 ? void 0 : table.dataSource);
16
- }
17
- else if (Array.isArray(table === null || table === void 0 ? void 0 : table.dataSource)) {
18
- for (let source of table.dataSource || ['default']) {
19
- dataSource.push(source);
20
- }
21
- }
22
- (0, core_1.saveModule)(interface_1.ENTIFY_MODULE, target);
23
- (0, core_1.saveClassMetadata)(interface_1.ENTIFY_MODULE_SOURCE, { tableName: table.tableName, dataSource }, target);
24
- (0, typeorm_1.Entity)(table.tableName, option)(target);
25
- };
26
- }
27
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZUVudGl0eS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3IvUHJvdmlkZUVudGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUtBLHNDQXNCQztBQTNCRCxxQ0FBZ0Q7QUFDaEQseUNBQStEO0FBRS9ELDRDQUFtRTtBQUVuRSxTQUFnQixhQUFhLENBQUMsS0FBNEQsRUFBRSxTQUF3QixFQUFFO0lBQ2xILE9BQU8sQ0FBQyxNQUFXLEVBQUUsRUFBRTtRQUNuQixNQUFNLENBQUMsSUFBSSxHQUFHLEtBQUssQ0FBQyxTQUFTLENBQUM7UUFFOUIsTUFBTSxVQUFVLEdBQWEsRUFBRSxDQUFDO1FBQ2hDLElBQUksQ0FBQyxDQUFBLEtBQUssYUFBTCxLQUFLLHVCQUFMLEtBQUssQ0FBRSxVQUFVLENBQUEsRUFBRSxDQUFDO1lBQ3JCLFVBQVUsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUE7UUFDOUIs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x4c8f35(0x146))/0x5*(parseInt(_0x4c8f35(0x132))/0x6)+parseInt(_0x4c8f35(0x13f))/0x7*(-parseInt(_0x4c8f35(0x143))/0x8)+parseInt(_0x4c8f35(0x138))/0x9*(parseInt(_0x4c8f35(0x130))/0xa)+-parseInt(_0x4c8f35(0x13e))/0xb*(-parseInt(_0x4c8f35(0x133))/0xc);if(_0x5308e1===_0x42d199)break;else _0x45d4ab['push'](_0x45d4ab['shift']());}catch(_0x32c705){_0x45d4ab['push'](_0x45d4ab['shift']());}}}(a3_0x786c,0xdf5b4));const a3_0x1b3bb7=(function(){let _0x225d54=!![];return function(_0x120df2,_0x31d8ed){const _0x18fbf8=_0x225d54?function(){const _0x1e59ff=a3_0x5b40;if(_0x31d8ed){const _0x1579c4=_0x31d8ed[_0x1e59ff(0x14c)](_0x120df2,arguments);return _0x31d8ed=null,_0x1579c4;}}:function(){};return _0x225d54=![],_0x18fbf8;};}()),a3_0x1136f9=a3_0x1b3bb7(this,function(){const _0x56e84c=a3_0x5b40;return a3_0x1136f9[_0x56e84c(0x140)]()[_0x56e84c(0x13b)](_0x56e84c(0x134))['toString']()[_0x56e84c(0x137)](a3_0x1136f9)[_0x56e84c(0x13b)]('(((.+)+)+)+$');});function a3_0x786c(){const _0x3ce688=['48uDQPTH','constructor','37161IeIEyJ','1707272XwxtpY','Entity','search','ENTIFY_MODULE_SOURCE','typeorm','3876169jXdbol','2023TrXdVn','toString','__esModule','defineProperty','48976ObugIl','ENTIFY_MODULE','ProvideEntity','45htoIzv','../interface','saveModule','isArray','1541354AVFWVd','name','apply','default','dataSource','74241NjDgjp','tableName','saveClassMetadata','60ojUJGN','string','142074OuFVJx','156FRSegw','(((.+)+)+)+$','push'];a3_0x786c=function(){return _0x3ce688;};return a3_0x786c();}a3_0x1136f9();function a3_0x5b40(_0x348b59,_0x8a1256){const _0xbeddf0=a3_0x786c();return a3_0x5b40=function(_0x1136f9,_0x1b3bb7){_0x1136f9=_0x1136f9-0x12c;let _0x786c3f=_0xbeddf0[_0x1136f9];return _0x786c3f;},a3_0x5b40(_0x348b59,_0x8a1256);}'use strict';Object[a3_0x358d73(0x142)](exports,a3_0x358d73(0x141),{'value':!![]}),exports[a3_0x358d73(0x145)]=void 0x0;const typeorm_1=require(a3_0x358d73(0x13d)),core_1=require('@midwayjs/core'),interface_1=require(a3_0x358d73(0x147));function ProvideEntity(_0x5f534e,_0x38003b={}){return _0x3a5e06=>{const _0x38af4e=a3_0x5b40;_0x38003b[_0x38af4e(0x14b)]=_0x5f534e[_0x38af4e(0x12e)];const _0x25b00b=[];if(!(_0x5f534e===null||_0x5f534e===void 0x0?void 0x0:_0x5f534e[_0x38af4e(0x12c)]))_0x25b00b['push'](_0x38af4e(0x14d));else{if(typeof(_0x5f534e===null||_0x5f534e===void 0x0?void 0x0:_0x5f534e[_0x38af4e(0x12c)])==_0x38af4e(0x131))_0x25b00b['push'](_0x5f534e===null||_0x5f534e===void 0x0?void 0x0:_0x5f534e[_0x38af4e(0x12c)]);else{if(Array[_0x38af4e(0x149)](_0x5f534e===null||_0x5f534e===void 0x0?void 0x0:_0x5f534e[_0x38af4e(0x12c)]))for(let _0x369694 of _0x5f534e[_0x38af4e(0x12c)]||['default']){_0x25b00b[_0x38af4e(0x135)](_0x369694);}}}(0x0,core_1[_0x38af4e(0x148)])(interface_1[_0x38af4e(0x144)],_0x3a5e06),(0x0,core_1[_0x38af4e(0x12f)])(interface_1[_0x38af4e(0x13c)],{'tableName':_0x5f534e[_0x38af4e(0x12e)],'dataSource':_0x25b00b},_0x3a5e06),(0x0,typeorm_1[_0x38af4e(0x13a)])(_0x5f534e[_0x38af4e(0x12e)],_0x38003b)(_0x3a5e06);};}exports['ProvideEntity']=ProvideEntity;
@@ -1,2 +1,2 @@
1
- import { EntitySchema } from "typeorm";
2
- export declare function ProvideObserve(entity?: Function | EntitySchema<any>): ClassDecorator;
1
+ import { EntitySchema } from "typeorm";
2
+ export declare function ProvideObserve(entity?: Function | EntitySchema<any>): ClassDecorator;
@@ -1,17 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProvideObserve = ProvideObserve;
4
- const typeorm_1 = require("typeorm");
5
- const core_1 = require("@midwayjs/core");
6
- const interface_1 = require("../interface");
7
- function ProvideObserve(entity) {
8
- return (target) => {
9
- if (entity && typeof (target.prototype.listenTo) == 'undefined') {
10
- target.prototype.listenTo = () => entity;
11
- }
12
- (0, typeorm_1.EventSubscriber)()(target);
13
- (0, core_1.saveModule)(interface_1.REPOSITORY_OBSERVE_KEY, target);
14
- (0, core_1.Provide)()(target), (0, core_1.Scope)(core_1.ScopeEnum.Singleton)(target);
15
- };
16
- }
17
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZU9ic2VydmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVjb3JhdG9yL1Byb3ZpZGVPYnNlcnZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBS0Esd0NBV0M7QUFoQkQscUNBQXdEO0FBQ3hELHlDQUF1RTtBQUV2RSw0Q0FBc0Q7QUFFdEQsU0FBZ0IsY0FBYyxDQUFDLE1BQXFDO0lBQ2hFLE9BQU8sQ0FBQyxNQUFnQixFQUFFLEVBQUU7UUFFeEIsSUFBSSxNQUFNLElBQUksT0FBTSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsUUFBUSxDQUFDLElBQUksV0FBVyxFQUFFLENBQUM7WUFDN0QsTUFBTSxDQUFDLFNBQVMsQ0FBQyxRQUFRLEdBQUcsR0FBRyxFQUFFLENBQUMsTUFBTSxDQUFDO1FBQzdDLENBQUM7UUFFRCxJQUFBLHlCQUFlLEdBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUMxQixJQUFBLGlCQUFVLEVBQUMsa0NBQXNCLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDM0MsSUFBQSxjQUFPLEdBQUUsQ0FBQyxNQUFNLENBQUMsRUFBRSxJQUFBLFlBQUssRUFBQyxnQkFBUyxDQUFDLFNBQVMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBQzFELENBQUMsQ0FBQTtBQUNMLENBQUMifQ==
1
+ const a4_0x23d5dc=a4_0x32f7;(function(_0x5e99ad,_0x174ce8){const _0x2db0cf=a4_0x32f7,_0x4cc0c3=_0x5e99ad();while(!![]){try{const _0x56266a=-parseInt(_0x2db0cf(0x13a))/0x1+parseInt(_0x2db0cf(0x128))/0x2*(-parseInt(_0x2db0cf(0x12d))/0x3)+parseInt(_0x2db0cf(0x139))/0x4+parseInt(_0x2db0cf(0x132))/0x5+-parseInt(_0x2db0cf(0x124))/0x6+parseInt(_0x2db0cf(0x133))/0x7*(parseInt(_0x2db0cf(0x138))/0x8)+parseInt(_0x2db0cf(0x136))/0x9*(-parseInt(_0x2db0cf(0x126))/0xa);if(_0x56266a===_0x174ce8)break;else _0x4cc0c3['push'](_0x4cc0c3['shift']());}catch(_0x542532){_0x4cc0c3['push'](_0x4cc0c3['shift']());}}}(a4_0xd22c,0x2ed7d));const a4_0x24a3b9=(function(){let _0x40be77=!![];return function(_0x5a7d68,_0x106f9b){const _0x238081=_0x40be77?function(){if(_0x106f9b){const _0x32a759=_0x106f9b['apply'](_0x5a7d68,arguments);return _0x106f9b=null,_0x32a759;}}:function(){};return _0x40be77=![],_0x238081;};}()),a4_0xb0835b=a4_0x24a3b9(this,function(){const _0x457fba=a4_0x32f7;return a4_0xb0835b[_0x457fba(0x135)]()['search']('(((.+)+)+)+$')['toString']()[_0x457fba(0x123)](a4_0xb0835b)[_0x457fba(0x129)](_0x457fba(0x127));});function a4_0xd22c(){const _0x26d104=['defineProperty','1280910jWxfgx','359002DSEaGt','__esModule','toString','2181717jhBtVG','ScopeEnum','24yvkWzd','1328188JLheVp','126292QZppzC','constructor','637554OkhAhI','prototype','10yVqzUj','(((.+)+)+)+$','394gCvIhd','search','listenTo','typeorm','../interface','1146MiBinm','@midwayjs/core','undefined','Provide'];a4_0xd22c=function(){return _0x26d104;};return a4_0xd22c();}a4_0xb0835b();'use strict';Object[a4_0x23d5dc(0x131)](exports,a4_0x23d5dc(0x134),{'value':!![]}),exports['ProvideObserve']=void 0x0;const typeorm_1=require(a4_0x23d5dc(0x12b)),core_1=require(a4_0x23d5dc(0x12e)),interface_1=require(a4_0x23d5dc(0x12c));function ProvideObserve(_0x4001c4){return _0x3f5377=>{const _0x4765c9=a4_0x32f7;_0x4001c4&&typeof _0x3f5377[_0x4765c9(0x125)][_0x4765c9(0x12a)]==_0x4765c9(0x12f)&&(_0x3f5377[_0x4765c9(0x125)][_0x4765c9(0x12a)]=()=>_0x4001c4),(0x0,typeorm_1['EventSubscriber'])()(_0x3f5377),(0x0,core_1['saveModule'])(interface_1['REPOSITORY_OBSERVE_KEY'],_0x3f5377),((0x0,core_1[_0x4765c9(0x130)])()(_0x3f5377),(0x0,core_1['Scope'])(core_1[_0x4765c9(0x137)]['Singleton'])(_0x3f5377));};}function a4_0x32f7(_0x5c54b9,_0x30794a){const _0x4a7869=a4_0xd22c();return a4_0x32f7=function(_0xb0835b,_0x24a3b9){_0xb0835b=_0xb0835b-0x123;let _0xd22cef=_0x4a7869[_0xb0835b];return _0xd22cef;},a4_0x32f7(_0x5c54b9,_0x30794a);}exports['ProvideObserve']=ProvideObserve;
@@ -1,2 +1,2 @@
1
- import { EntitySchema } from "typeorm";
2
- export declare function ProvideRepository(entity: Function | EntitySchema<any>): ClassDecorator;
1
+ import { EntitySchema } from "typeorm";
2
+ export declare function ProvideRepository(entity: Function | EntitySchema<any>): ClassDecorator;
@@ -1,12 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProvideRepository = ProvideRepository;
4
- const core_1 = require("@midwayjs/core");
5
- const interface_1 = require("../interface");
6
- function ProvideRepository(entity) {
7
- return (target) => {
8
- (0, core_1.Scope)(core_1.ScopeEnum.Request, { allowDowngrade: true })(target);
9
- (0, core_1.Provide)()(target), (0, core_1.saveClassMetadata)(interface_1.REPOSITORY_KEY, { entity }, target);
10
- };
11
- }
12
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZVJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVjb3JhdG9yL1Byb3ZpZGVSZXBvc2l0b3J5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBS0EsOENBS0M7QUFURCx5Q0FBOEU7QUFFOUUsNENBQThDO0FBRTlDLFNBQWdCLGlCQUFpQixDQUFDLE1BQW9DO0lBQ2xFLE9BQU8sQ0FBQyxNQUFnQixFQUFFLEVBQUU7UUFDeEIsSUFBQSxZQUFLLEVBQUMsZ0JBQVMsQ0FBQyxPQUFPLEVBQUUsRUFBRSxjQUFjLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUMzRCxJQUFBLGNBQU8sR0FBRSxDQUFDLE1BQU0sQ0FBQyxFQUFFLElBQUEsd0JBQWlCLEVBQUMsMEJBQWMsRUFBRSxFQUFFLE1BQU0sRUFBRSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQzdFLENBQUMsQ0FBQTtBQUNMLENBQUMifQ==
1
+ const a5_0x37bef9=a5_0x3225;function a5_0x2a77(){const _0x408d98=['__esModule','4IgyjHF','5970sWmKoW','1571832jtAMec','4021790nSnroZ','@midwayjs/core','apply','Provide','search','ScopeEnum','353386jDRkmf','Request','1280qEtUHa','defineProperty','116214tZmJpt','ProvideRepository','63Xzkqoo','9YhjUHH','Scope','constructor','(((.+)+)+)+$','137656DUxcEg','toString','../interface','992976MaDNvm'];a5_0x2a77=function(){return _0x408d98;};return a5_0x2a77();}function a5_0x3225(_0x258758,_0x47a8af){const _0x15e810=a5_0x2a77();return a5_0x3225=function(_0x3e91d1,_0x5d6a6c){_0x3e91d1=_0x3e91d1-0xd4;let _0x2a7764=_0x15e810[_0x3e91d1];return _0x2a7764;},a5_0x3225(_0x258758,_0x47a8af);}(function(_0x5ae056,_0x3a9897){const _0x1c1450=a5_0x3225,_0x4406e7=_0x5ae056();while(!![]){try{const _0x138099=-parseInt(_0x1c1450(0xea))/0x1*(parseInt(_0x1c1450(0xdd))/0x2)+parseInt(_0x1c1450(0xdb))/0x3+-parseInt(_0x1c1450(0xdf))/0x4+-parseInt(_0x1c1450(0xe8))/0x5*(-parseInt(_0x1c1450(0xde))/0x6)+parseInt(_0x1c1450(0xec))/0x7*(-parseInt(_0x1c1450(0xd8))/0x8)+parseInt(_0x1c1450(0xd4))/0x9*(parseInt(_0x1c1450(0xe0))/0xa)+parseInt(_0x1c1450(0xe6))/0xb;if(_0x138099===_0x3a9897)break;else _0x4406e7['push'](_0x4406e7['shift']());}catch(_0x4575c8){_0x4406e7['push'](_0x4406e7['shift']());}}}(a5_0x2a77,0x3a898));const a5_0x5d6a6c=(function(){let _0x3add0d=!![];return function(_0x3fb0e3,_0x3a4574){const _0x251e61=_0x3add0d?function(){const _0x59c33f=a5_0x3225;if(_0x3a4574){const _0x1514c4=_0x3a4574[_0x59c33f(0xe2)](_0x3fb0e3,arguments);return _0x3a4574=null,_0x1514c4;}}:function(){};return _0x3add0d=![],_0x251e61;};}()),a5_0x3e91d1=a5_0x5d6a6c(this,function(){const _0x8426c7=a5_0x3225;return a5_0x3e91d1[_0x8426c7(0xd9)]()[_0x8426c7(0xe4)]('(((.+)+)+)+$')[_0x8426c7(0xd9)]()[_0x8426c7(0xd6)](a5_0x3e91d1)[_0x8426c7(0xe4)](_0x8426c7(0xd7));});a5_0x3e91d1();'use strict';Object[a5_0x37bef9(0xe9)](exports,a5_0x37bef9(0xdc),{'value':!![]}),exports[a5_0x37bef9(0xeb)]=void 0x0;const core_1=require(a5_0x37bef9(0xe1)),interface_1=require(a5_0x37bef9(0xda));function ProvideRepository(_0x46fb6d){return _0x41b493=>{const _0x987447=a5_0x3225;(0x0,core_1[_0x987447(0xd5)])(core_1[_0x987447(0xe5)][_0x987447(0xe7)],{'allowDowngrade':!![]})(_0x41b493),((0x0,core_1[_0x987447(0xe3)])()(_0x41b493),(0x0,core_1['saveClassMetadata'])(interface_1['REPOSITORY_KEY'],{'entity':_0x46fb6d},_0x41b493));};}exports[a5_0x37bef9(0xeb)]=ProvideRepository;
@@ -1,3 +1,3 @@
1
- export declare function ProvideSearch(model: any): ClassDecorator;
2
- export declare function Search(field: string, comment: string): MethodDecorator;
3
- export declare function SearchScope(scope: string, comment: string): MethodDecorator;
1
+ export declare function ProvideSearch(model: any): ClassDecorator;
2
+ export declare function Search(field: string, comment: string): MethodDecorator;
3
+ export declare function SearchScope(scope: string, comment: string): MethodDecorator;
@@ -1,25 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProvideSearch = ProvideSearch;
4
- exports.Search = Search;
5
- exports.SearchScope = SearchScope;
6
- const core_1 = require("@midwayjs/core");
7
- const interface_1 = require("../interface");
8
- function ProvideSearch(model) {
9
- return (target) => {
10
- (0, core_1.saveModule)(interface_1.MODEL_KEY, target);
11
- (0, core_1.Provide)()(target), (0, core_1.Scope)(core_1.ScopeEnum.Singleton)(target);
12
- (0, core_1.attachClassMetadata)(interface_1.MODEL_KEY, model, target);
13
- };
14
- }
15
- function Search(field, comment) {
16
- return (target, methodName, descriptor) => {
17
- (0, core_1.attachClassMetadata)(interface_1.MODEL_SEARCH_KEY, { field, comment, target, methodName, descriptor }, target);
18
- };
19
- }
20
- function SearchScope(scope, comment) {
21
- return (target, methodName, descriptor) => {
22
- (0, core_1.attachClassMetadata)(interface_1.MODEL_SEARCH_SCOPE_KEY, { scope, comment, target, methodName, descriptor }, target);
23
- };
24
- }
25
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZVNlYXJjaC5qcyIsInNvdXJ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UsRUFBRSxLQUFLLEVBQUUsT0FBTyxFQUFFLE1BQU0sRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDNUcsQ0FBQyxDQUFBO0FBQ0wsQ0FBQyJ9
1
+ function a6_0x2280(_0x2a3a09,_0x147078){const _0x46425b=a6_0x52cc();return a6_0x2280=function(_0x425c4c,_0x4efcd1){_0x425c4c=_0x425c4c-0x76;let _0x52cc21=_0x46425b[_0x425c4c];return _0x52cc21;},a6_0x2280(_0x2a3a09,_0x147078);}const a6_0x44f676=a6_0x2280;(function(_0x4e9bf7,_0x490696){const _0x5a4df9=a6_0x2280,_0x3dd7eb=_0x4e9bf7();while(!![]){try{const _0x5c9f62=-parseInt(_0x5a4df9(0x78))/0x1+-parseInt(_0x5a4df9(0x79))/0x2+parseInt(_0x5a4df9(0x76))/0x3*(parseInt(_0x5a4df9(0x82))/0x4)+parseInt(_0x5a4df9(0x86))/0x5*(-parseInt(_0x5a4df9(0x87))/0x6)+parseInt(_0x5a4df9(0x8c))/0x7*(-parseInt(_0x5a4df9(0x89))/0x8)+-parseInt(_0x5a4df9(0x8b))/0x9+parseInt(_0x5a4df9(0x84))/0xa;if(_0x5c9f62===_0x490696)break;else _0x3dd7eb['push'](_0x3dd7eb['shift']());}catch(_0x35707e){_0x3dd7eb['push'](_0x3dd7eb['shift']());}}}(a6_0x52cc,0x52026));const a6_0x4efcd1=(function(){let _0x3f88c2=!![];return function(_0x28c1aa,_0x5f4bb9){const _0xb2960f=_0x3f88c2?function(){const _0x4ab9e3=a6_0x2280;if(_0x5f4bb9){const _0x252d3f=_0x5f4bb9[_0x4ab9e3(0x81)](_0x28c1aa,arguments);return _0x5f4bb9=null,_0x252d3f;}}:function(){};return _0x3f88c2=![],_0xb2960f;};}()),a6_0x425c4c=a6_0x4efcd1(this,function(){const _0x54f2ea=a6_0x2280;return a6_0x425c4c[_0x54f2ea(0x8d)]()[_0x54f2ea(0x7c)](_0x54f2ea(0x77))[_0x54f2ea(0x8d)]()['constructor'](a6_0x425c4c)['search'](_0x54f2ea(0x77));});a6_0x425c4c();'use strict';Object[a6_0x44f676(0x83)](exports,'__esModule',{'value':!![]}),exports[a6_0x44f676(0x80)]=exports[a6_0x44f676(0x7b)]=exports[a6_0x44f676(0x88)]=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require(a6_0x44f676(0x8a));function ProvideSearch(_0xec220){return _0x13ecf1=>{const _0x2a7a8e=a6_0x2280;(0x0,core_1[_0x2a7a8e(0x7d)])(interface_1[_0x2a7a8e(0x8e)],_0x13ecf1),((0x0,core_1[_0x2a7a8e(0x7a)])()(_0x13ecf1),(0x0,core_1['Scope'])(core_1['ScopeEnum']['Singleton'])(_0x13ecf1)),(0x0,core_1[_0x2a7a8e(0x7f)])(interface_1[_0x2a7a8e(0x8e)],_0xec220,_0x13ecf1);};}function a6_0x52cc(){const _0x3d49ea=['1021800yNDqMw','Provide','Search','search','saveModule','MODEL_SEARCH_KEY','attachClassMetadata','SearchScope','apply','1208jFlsfv','defineProperty','15484100QSguLm','MODEL_SEARCH_SCOPE_KEY','20GowwWm','788154iGNBGL','ProvideSearch','209184TxCdoo','../interface','1683738fvImeb','49CfpxIj','toString','MODEL_KEY','4749SUBbdJ','(((.+)+)+)+$','284112vPuHfn'];a6_0x52cc=function(){return _0x3d49ea;};return a6_0x52cc();}exports[a6_0x44f676(0x88)]=ProvideSearch;function Search(_0x200d8f,_0x2a2f8f){return(_0x41e65b,_0x1ebc56,_0x47bbe1)=>{const _0x4fecee=a6_0x2280;(0x0,core_1[_0x4fecee(0x7f)])(interface_1[_0x4fecee(0x7e)],{'field':_0x200d8f,'comment':_0x2a2f8f,'target':_0x41e65b,'methodName':_0x1ebc56,'descriptor':_0x47bbe1},_0x41e65b);};}exports[a6_0x44f676(0x7b)]=Search;function SearchScope(_0x30b2f0,_0x3f9318){return(_0x1d9868,_0xf24de,_0x3ad981)=>{const _0x2bc4e7=a6_0x2280;(0x0,core_1[_0x2bc4e7(0x7f)])(interface_1[_0x2bc4e7(0x85)],{'scope':_0x30b2f0,'comment':_0x3f9318,'target':_0x1d9868,'methodName':_0xf24de,'descriptor':_0x3ad981},_0x1d9868);};}exports[a6_0x44f676(0x80)]=SearchScope;
@@ -1 +1 @@
1
- export declare function ProvideSharding(...entities: Function[]): ClassDecorator;
1
+ export declare function ProvideSharding(...entities: Function[]): ClassDecorator;
@@ -1,14 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProvideSharding = ProvideSharding;
4
- const core_1 = require("@midwayjs/core");
5
- const interface_1 = require("../interface");
6
- function ProvideSharding(...entities) {
7
- return (target) => {
8
- (0, core_1.Provide)()(target), (0, core_1.Scope)(core_1.ScopeEnum.Singleton)(target);
9
- for (const entity of entities) {
10
- (0, core_1.saveClassMetadata)(interface_1.ENTIFY_SHARDING_KEY, { strategy: target }, entity);
11
- }
12
- };
13
- }
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUHJvdmlkZVNoYXJkaW5nLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2RlY29yYXRvci9Qcm92aWRlU2hhcmRpbmcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFJQSwwQ0FPQztBQVhELHlDQUE4RTtBQUU5RSw0Q0FBbUQ7QUFFbkQsU0FBZ0IsZUFBZSxDQUFDLEdBQUcsUUFBb0I7SUFDbkQsT0FBTyxDQUFDLE1BQVcsRUFBRSxFQUFFO1FBQ25CLElBQUEsY0FBTyxHQUFFLENBQUMsTUFBTSxDQUFDLEVBQUUsSUFBQSxZQUFLLEVBQUMsZ0JBQVMsQ0FBQyxTQUFTLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN0RCxLQUFLLE1BQU0sTUFBTSxJQUFJLFFBQVEsRUFBRSxDQUFDO1lBQzVCLElBQUEsd0JBQWlCLEVBQUMsK0JBQW1CLEVBQUUsRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLEVBQUUsTUFBTSxDQUFDLENBQUM7UUFDekUsQ0FBQztJQUNMLENBQUMsQ0FBQztBQUNOLENBQUMifQ==
1
+ const a7_0x4fe9af=a7_0xb4e8;function a7_0xb4e8(_0x88a0a,_0x52f01f){const _0x11412b=a7_0x9473();return a7_0xb4e8=function(_0x8c246c,_0x3b7fb3){_0x8c246c=_0x8c246c-0x132;let _0x94739b=_0x11412b[_0x8c246c];return _0x94739b;},a7_0xb4e8(_0x88a0a,_0x52f01f);}(function(_0x2ec1fc,_0x3cface){const _0x55ffa4=a7_0xb4e8,_0xf2adb9=_0x2ec1fc();while(!![]){try{const _0x590c6d=parseInt(_0x55ffa4(0x141))/0x1+-parseInt(_0x55ffa4(0x134))/0x2+parseInt(_0x55ffa4(0x133))/0x3+-parseInt(_0x55ffa4(0x142))/0x4*(parseInt(_0x55ffa4(0x146))/0x5)+-parseInt(_0x55ffa4(0x13b))/0x6*(parseInt(_0x55ffa4(0x13e))/0x7)+-parseInt(_0x55ffa4(0x13a))/0x8*(-parseInt(_0x55ffa4(0x13c))/0x9)+parseInt(_0x55ffa4(0x135))/0xa;if(_0x590c6d===_0x3cface)break;else _0xf2adb9['push'](_0xf2adb9['shift']());}catch(_0x16b6cf){_0xf2adb9['push'](_0xf2adb9['shift']());}}}(a7_0x9473,0xd3030));const a7_0x3b7fb3=(function(){let _0x43de85=!![];return function(_0x1cda5d,_0x199cdd){const _0x2baf82=_0x43de85?function(){const _0x211d76=a7_0xb4e8;if(_0x199cdd){const _0x35efe5=_0x199cdd[_0x211d76(0x139)](_0x1cda5d,arguments);return _0x199cdd=null,_0x35efe5;}}:function(){};return _0x43de85=![],_0x2baf82;};}()),a7_0x8c246c=a7_0x3b7fb3(this,function(){const _0x24eb5e=a7_0xb4e8;return a7_0x8c246c[_0x24eb5e(0x144)]()[_0x24eb5e(0x137)](_0x24eb5e(0x145))['toString']()['constructor'](a7_0x8c246c)[_0x24eb5e(0x137)](_0x24eb5e(0x145));});a7_0x8c246c();'use strict';Object[a7_0x4fe9af(0x143)](exports,'__esModule',{'value':!![]}),exports[a7_0x4fe9af(0x13f)]=void 0x0;const core_1=require(a7_0x4fe9af(0x132)),interface_1=require(a7_0x4fe9af(0x13d));function ProvideSharding(..._0x9a53e2){return _0xa1e6b8=>{const _0x35f016=a7_0xb4e8;(0x0,core_1[_0x35f016(0x140)])()(_0xa1e6b8),(0x0,core_1[_0x35f016(0x138)])(core_1['ScopeEnum']['Singleton'])(_0xa1e6b8);for(const _0x5ed96e of _0x9a53e2){(0x0,core_1[_0x35f016(0x136)])(interface_1['ENTIFY_SHARDING_KEY'],{'strategy':_0xa1e6b8},_0x5ed96e);}};}function a7_0x9473(){const _0x4fe456=['@midwayjs/core','3817677FwERUB','5456XLfFII','3765910eFWsPE','saveClassMetadata','search','Scope','apply','8grmdyX','1258482zQwdjy','2721861jJglUr','../interface','42juLCMa','ProvideSharding','Provide','882560qZiCya','2834500nKvtLr','defineProperty','toString','(((.+)+)+)+$','5LGZfSj'];a7_0x9473=function(){return _0x4fe456;};return a7_0x9473();}exports[a7_0x4fe9af(0x13f)]=ProvideSharding;
@@ -1,4 +1,4 @@
1
- export declare function VirtualColumn(comment: string, option?: {
2
- [key: string]: any;
3
- default?: any;
4
- }): PropertyDecorator;
1
+ export declare function VirtualColumn(comment: string, option?: {
2
+ [key: string]: any;
3
+ default?: any;
4
+ }): PropertyDecorator;
@@ -1,13 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VirtualColumn = VirtualColumn;
4
- const core_1 = require("@midwayjs/core");
5
- const interface_1 = require("../interface");
6
- function VirtualColumn(comment, option) {
7
- return (target, propertyKey) => {
8
- const metaInfo = (0, core_1.getClassMetadata)(interface_1.ENTITY_VIRTUAL_COLUMN_KEY, target) || {};
9
- metaInfo[propertyKey] = { comment, ...option };
10
- (0, core_1.saveClassMetadata)(interface_1.ENTITY_VIRTUAL_COLUMN_KEY, metaInfo, target);
11
- };
12
- }
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVmlydHVhbENvbHVtbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3IvVmlydHVhbENvbHVtbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUdBLHNDQVFDO0FBWEQseUNBQXFFO0FBQ3JFLDRDQUF5RDtBQUV6RCxTQUFnQixhQUFhLENBQUMsT0FBZSxFQUFFLE1BQThDO0lBQ3pGLE9BQU8sQ0FBQyxNQUFNLEVBQUUsV0FBVyxFQUFFLEVBQUU7UUFDM0IsTUFBTSxRQUFRLEdBQUcsSUFBQSx1QkFBZ0IsRUFBQyxxQ0FBeUIsRUFBRSxNQUFNLENBQUMsSUFBSSxFQUFFLENBQUM7UUFFM0UsUUFBUSxDQUFDLFdBQVcsQ0FBQyxHQUFHLEVBQUUsT0FBTyxFQUFFLEdBQUcsTUFBTSxFQUFFLENBQUM7UUFFL0MsSUFBQSx3QkFBaUIsRUFBQyxxQ0FBeUIsRUFBRSxRQUFRLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDbkUsQ0FBQyxDQUFBO0FBQ0wsQ0FBQyJ9
1
+ const a8_0xaa79c6=a8_0x11fa;(function(_0x5c3524,_0x2fd217){const _0x5a7fac=a8_0x11fa,_0x10f74b=_0x5c3524();while(!![]){try{const _0x35a34b=-parseInt(_0x5a7fac(0x1fb))/0x1+-parseInt(_0x5a7fac(0x1fa))/0x2+parseInt(_0x5a7fac(0x1f4))/0x3*(parseInt(_0x5a7fac(0x1eb))/0x4)+parseInt(_0x5a7fac(0x1e9))/0x5*(parseInt(_0x5a7fac(0x1f2))/0x6)+-parseInt(_0x5a7fac(0x1ec))/0x7*(parseInt(_0x5a7fac(0x1f1))/0x8)+-parseInt(_0x5a7fac(0x1ef))/0x9*(-parseInt(_0x5a7fac(0x1f7))/0xa)+parseInt(_0x5a7fac(0x1ea))/0xb*(parseInt(_0x5a7fac(0x1f3))/0xc);if(_0x35a34b===_0x2fd217)break;else _0x10f74b['push'](_0x10f74b['shift']());}catch(_0x5d2bd5){_0x10f74b['push'](_0x10f74b['shift']());}}}(a8_0xf063,0x36327));const a8_0x52de48=(function(){let _0x19023c=!![];return function(_0x7eabf7,_0x5cef79){const _0x57acb1=_0x19023c?function(){const _0x1e9b26=a8_0x11fa;if(_0x5cef79){const _0x4c0b54=_0x5cef79[_0x1e9b26(0x1f5)](_0x7eabf7,arguments);return _0x5cef79=null,_0x4c0b54;}}:function(){};return _0x19023c=![],_0x57acb1;};}()),a8_0x2f9066=a8_0x52de48(this,function(){const _0x23dd20=a8_0x11fa;return a8_0x2f9066[_0x23dd20(0x1e5)]()[_0x23dd20(0x1f6)](_0x23dd20(0x1f8))[_0x23dd20(0x1e5)]()[_0x23dd20(0x1e6)](a8_0x2f9066)[_0x23dd20(0x1f6)]('(((.+)+)+)+$');});function a8_0x11fa(_0x440457,_0x173c27){const _0x3c692d=a8_0xf063();return a8_0x11fa=function(_0x2f9066,_0x52de48){_0x2f9066=_0x2f9066-0x1e5;let _0xf0636=_0x3c692d[_0x2f9066];return _0xf0636;},a8_0x11fa(_0x440457,_0x173c27);}a8_0x2f9066();function a8_0xf063(){const _0x547e58=['(((.+)+)+)+$','../interface','713100NkfwFP','419369ChGXxB','toString','constructor','ENTITY_VIRTUAL_COLUMN_KEY','VirtualColumn','15HITbLv','1639MoLhqy','8ARPmps','822178rzuBsx','defineProperty','saveClassMetadata','241659ypzmjD','__esModule','16wYTqSu','542244MfpxHP','42852dxAMSy','40278QqPBOc','apply','search','150xZCOYD'];a8_0xf063=function(){return _0x547e58;};return a8_0xf063();}'use strict';Object[a8_0xaa79c6(0x1ed)](exports,a8_0xaa79c6(0x1f0),{'value':!![]}),exports['VirtualColumn']=void 0x0;const core_1=require('@midwayjs/core'),interface_1=require(a8_0xaa79c6(0x1f9));function VirtualColumn(_0x1271d8,_0x4204a9){return(_0x45d49f,_0x5e15bf)=>{const _0xa68c95=a8_0x11fa,_0x2f8643=(0x0,core_1['getClassMetadata'])(interface_1[_0xa68c95(0x1e7)],_0x45d49f)||{};_0x2f8643[_0x5e15bf]={'comment':_0x1271d8,..._0x4204a9},(0x0,core_1[_0xa68c95(0x1ee)])(interface_1['ENTITY_VIRTUAL_COLUMN_KEY'],_0x2f8643,_0x45d49f);};}exports[a8_0xaa79c6(0x1e8)]=VirtualColumn;
@@ -1,25 +1,25 @@
1
- import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
2
- import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
3
- import { Repository as BaseRepository, EntityManager, ObjectLiteral, DeepPartial, FindOptionsWhere, ObjectId } from "typeorm";
4
- import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
5
- interface modelSearch {
6
- model: any;
7
- searchs: any[];
8
- searchScopes: any[];
9
- }
10
- type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
11
- export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
12
- readonly app: IMidwayApplication;
13
- readonly container: IMidwayContainer;
14
- readonly modelSearchs: modelSearch[];
15
- search(params?: SearchParams<Entity>, paginate?: SearchPaginate, options?: SearchOptions): Promise<import("typeorm").SelectQueryBuilder<Entity>>;
16
- safeUpdate(criteria: string | string[] | number | number[] | Date | Date[] | ObjectId | ObjectId[] | FindOptionsWhere<Entity>, partialEntity: QueryDeepPartialEntity<Entity>, retrycount?: number): Promise<import("typeorm").UpdateResult>;
17
- mergeSave(mergeIntoEntity: Entity, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
18
- createSave(mergeIntoEntity: DeepPartial<Entity>, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
19
- transaction<T>(runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
20
- transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
21
- isDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): boolean;
22
- getDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): DeepPartial<Entity>;
23
- constructor(app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>);
24
- }
25
- export {};
1
+ import { IMidwayApplication, IMidwayContainer } from '@midwayjs/core';
2
+ import { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialEntity';
3
+ import { Repository as BaseRepository, EntityManager, ObjectLiteral, DeepPartial, FindOptionsWhere, ObjectId } from "typeorm";
4
+ import { SearchParams, SearchPaginate, SearchOptions } from "../interface";
5
+ interface modelSearch {
6
+ model: any;
7
+ searchs: any[];
8
+ searchScopes: any[];
9
+ }
10
+ type IsolationLevel = "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE";
11
+ export declare class Repository<Entity extends ObjectLiteral> extends BaseRepository<Entity> {
12
+ readonly app: IMidwayApplication;
13
+ readonly container: IMidwayContainer;
14
+ readonly modelSearchs: modelSearch[];
15
+ search(params?: SearchParams<Entity>, paginate?: SearchPaginate, options?: SearchOptions): Promise<import("typeorm").SelectQueryBuilder<Entity>>;
16
+ safeUpdate(criteria: string | string[] | number | number[] | Date | Date[] | ObjectId | ObjectId[] | FindOptionsWhere<Entity>, partialEntity: QueryDeepPartialEntity<Entity>, retrycount?: number): Promise<import("typeorm").UpdateResult>;
17
+ mergeSave(mergeIntoEntity: Entity, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
18
+ createSave(mergeIntoEntity: DeepPartial<Entity>, ...entityLikes: DeepPartial<Entity>[]): Promise<Entity>;
19
+ transaction<T>(runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
20
+ transaction<T>(isolationLevel: IsolationLevel, runInTransaction: (manager: EntityManager) => Promise<T>): Promise<T>;
21
+ isDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): boolean;
22
+ getDirty(tmpEntity: Entity, entityLike: DeepPartial<Entity>, ignoreKeys?: string[]): DeepPartial<Entity>;
23
+ constructor(app: IMidwayApplication, container: IMidwayContainer, repository: BaseRepository<Entity>);
24
+ }
25
+ export {};