{"name":"@eggjs/tegg-transaction-decorator","version":"3.36.0","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"license":"MIT","_id":"@eggjs/tegg-transaction-decorator@3.36.0","homepage":"https://github.com/eggjs/tegg","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"dist":{"shasum":"504e4f6bd1105788a2977b2328d9ac90db6e5a31","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-3.36.0.tgz","fileCount":15,"integrity":"sha512-tUDh/X6oDuvGusugT/VfoIymPWVuH7sVtw4x/uEiKJ9nhkfG9CpSv39JpvIZ19wEBBGJQqlHs7i0ySY/h0tHSg==","signatures":[{"sig":"MEYCIQDzenz5MJNSrpCx5SR2UVdVMm8iURBrE4dmI3geGqzOQQIhAIpexYMCPOj9wGHkc/Bwv+5ksM8L5/spWMAhymhi7bJY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13354,"size":5366,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-3.36.0.tgz"},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=14.0.0"},"gitHead":"b550d59a21f7c9991310ca6b6fd16ee581a5e17d","scripts":{"tsc":"npm run clean && tsc -p ./tsconfig.json","test":"cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha","clean":"tsc -b --clean","tsc:pub":"npm run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"npm run tsc:pub"},"_npmUser":{"name":"killagu","email":"killa07071201@gmail.com"},"repository":{"url":"git+ssh://git@github.com/eggjs/tegg.git","type":"git","directory":"core/transaction-decorator"},"_npmVersion":"lerna/6.6.2/node@v18.19.1+x64 (darwin)","description":"tegg transaction decorator","directories":{},"_nodeVersion":"18.19.1","dependencies":{"@eggjs/tegg-metadata":"^3.36.0","@eggjs/core-decorator":"^3.36.0","@eggjs/tegg-common-util":"^3.36.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","ts-node":"^10.9.1","cross-env":"^7.0.3","typescript":"^5.0.4","@types/node":"^20.2.4","@types/mocha":"^10.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tegg-transaction-decorator_3.36.0_1712065820904_0.31512297474641904","host":"s3://npm-registry-packages"},"readme":"# @eggjs/tegg-transaction-decorator\n\n事务注解\n\n## Usage\n### 传播机制\n```ts\nexport class Foo {\n\n  @Transactional({ propagation: PropagationType.ALWAYS_NEW })\n  async bar() {\n    await this.foo();\n  }\n\n  @Transactional({ propagation: PropagationType.REQUIRED })\n  async foo(msg) {\n    console.log('has msg: ', msg);\n  }\n\n}\n```\n\n### 数据源\n```ts\nexport class Bar {\n\n  @Transactional({ dataSourceName: 'xx' })\n  async bar() {\n    await this.foo();\n  }\n\n}\n\n```\n\nFoo.bar 始终会在一个独立的事务中执行，而 Foo.foo 会在 Foo.bar 的事务中执行\n","publish_time":1712065821088,"maintainers":[{"name":"akitasummer","email":"644171127@qq.com"},{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"dead_horse","email":"dead_horse@qq.com"},{"name":"wanghx","email":"whxaxes@gmail.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"mansonchor.zzw","email":"mansonchor1987@gmail.com"},{"name":"hubcarl","email":"hubcarl@126.com"}],"_cnpm_publish_time":1712065821088,"dist-tags":{"alpha":"3.57.15-alpha.0","beta":"3.73.0-beta.1","beta-v3":"3.74.0-beta.3","latest":"3.88.1"}}