{"name":"@eggjs/tegg-transaction-decorator","version":"3.88.1","description":"tegg transaction decorator","keywords":["egg","typescript","decorator","transaction","tegg"],"author":{"name":"qile222","email":"chhxxc@gmail.com"},"homepage":"https://github.com/eggjs/tegg","repository":{"type":"git","url":"git+ssh://git@github.com/eggjs/tegg.git","directory":"core/transaction-decorator"},"dependencies":{"@eggjs/core-decorator":"^3.88.1","@eggjs/tegg-common-util":"^3.88.1","@eggjs/tegg-metadata":"^3.88.1","@eggjs/tegg-types":"^3.88.1"},"scripts":{"test":"cross-env NODE_ENV=test NODE_OPTIONS='--no-deprecation' mocha","clean":"tsc -b --clean","tsc":"ut run clean && tsc -p ./tsconfig.json","tsc:pub":"ut run clean && tsc -p ./tsconfig.pub.json","prepublishOnly":"ut tsc:pub"},"publishConfig":{"access":"public"},"engines":{"node":">=14.0.0"},"license":"MIT","main":"dist/index.js","bugs":{"url":"https://github.com/eggjs/tegg/issues"},"devDependencies":{"@types/mocha":"^10.0.1","@types/node":"^20.2.4","cross-env":"^7.0.3","mocha":"^10.2.0","ts-node":"^10.9.1","typescript":"^5.0.4"},"gitHead":"c21401cd56b74b8a6692d5709dfe15d8fca57b48","types":"./dist/index.d.ts","_id":"@eggjs/tegg-transaction-decorator@3.88.1","_nodeVersion":"20.20.2","_npmVersion":"lerna/6.6.2/node@v20.20.2+x64 (linux)","dist":{"integrity":"sha512-Rdutpg+tvhggHcS5zsuMecDwynOPNrJrMnjzrhbVqTlk4g7XD92XZ5y2m+S4nBRQauUGEasxGg8S/QHKh6Es9Q==","shasum":"b685e1bb593b67d12e71a96634f5ce901e75c6bd","tarball":"http://registry-npm.ywwl.com/@eggjs/tegg-transaction-decorator/download/@eggjs/tegg-transaction-decorator-3.88.1.tgz","fileCount":11,"unpackedSize":10740,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBdHkka9jPfqDmBapA+TrP9tUAJUQZ1WWu8JMV/SzVdRAiEAogpMGEXkR/v6BnROcfgK1D/mywxUeIT3P7AM3cfmuxQ="}],"size":4395,"noattachment":false,"key":"/@eggjs/tegg-transaction-decorator/-/@eggjs/tegg-transaction-decorator-3.88.1.tgz"},"_npmUser":{"name":"akitasummer","email":"644171127@qq.com"},"directories":{},"maintainers":[{"name":"gxkl","email":"gxkl203@gmail.com"},{"name":"eggjs-admin","email":"fengmk2+eggjs@gmail.com"},{"name":"fengmk2","email":"fengmk2@gmail.com"},{"name":"atian25","email":"atian25@qq.com"},{"name":"hyj1991","email":"yeekwanvong@gmail.com"},{"name":"killagu","email":"killa07071201@gmail.com"},{"name":"coolme200","email":"2001-wms@163.com"},{"name":"akitasummer","email":"644171127@qq.com"},{"name":"elrrrrrrr","email":"elrrrrrrr@gmail.com"},{"name":"niania","email":"ljracm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tegg-transaction-decorator_3.88.1_1788854387925_0.5135297275064481"},"_hasShrinkwrap":false,"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":1788854388067,"_cnpm_publish_time":1788854388067,"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"}}