{"_id":"@eggjs/rds","_rev":"1410466","name":"@eggjs/rds","description":"My RDS Client","dist-tags":{"latest":"1.5.0"},"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":"akitasummer@outlook.com"}],"time":{"modified":"2026-09-14T02:42:47.000Z","created":"2024-01-30T13:05:32.868Z","1.5.0":"2025-12-09T05:57:55.358Z","1.4.0":"2025-11-25T09:04:11.052Z","1.3.0":"2025-03-09T08:34:31.525Z","1.2.2":"2025-03-09T06:19:47.461Z","1.2.1":"2024-09-06T02:52:38.427Z","1.2.0":"2024-08-12T05:42:41.306Z","1.1.0":"2024-04-18T12:42:25.746Z","1.0.1":"2024-03-26T14:34:08.550Z","1.0.0":"2024-01-30T13:05:32.868Z"},"users":{},"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"versions":{"1.5.0":{"name":"@eggjs/rds","version":"1.5.0","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.5.0","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":"akitasummer@outlook.com"}],"homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"23fa847950f29b32b477ca821803eec73136ead2","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.5.0.tgz","fileCount":23,"integrity":"sha512-RFgiEzAJhHbNTFo1s47VnlAgZvoW7f88/+KWsgGS8N+ES9Z9i30X/cxjva1BLm3ROg07nxYx98tr2RLWu30Pnw==","signatures":[{"sig":"MEQCIA1e0FOs6iXmM6MF2TSNgnDOrdxe2XZUirPAP4CQtCIJAiA6MJJqi+u+8xwbq9bE/aGucKzHVkG7qVu2yj5rdAfRdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":103240,"size":24839,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.5.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"cc420c77fca0d8b677143bfe18dd4489fa7b0be6","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cf628b76-bc33-4c71-bce2-366f9cf7dbac"}},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"11.6.4","description":"My RDS Client","directories":{},"_nodeVersion":"24.11.1","dependencies":{"mysql2":"^3.9.1","onelogger":"^1.0.0","sqlstring":"^2.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.5.0_1765259875216_0.29489087140460524","host":"s3://npm-registry-packages-npm-production"},"publish_time":1765259875358,"_cnpm_publish_time":1765259875358},"1.4.0":{"name":"@eggjs/rds","version":"1.4.0","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.4.0","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":"akitasummer@outlook.com"}],"homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"7a2f62428cd3f4e0e61fb2599a58cc783bd53a09","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.4.0.tgz","fileCount":23,"integrity":"sha512-dCOH7/QACZ4+nK4iEUw7rinPOOlKwSU3KvJYXyPLM2xIRaP0e5Rrqc30O3uZajFGnFXE8OykMt/PHE8C3FjSWg==","signatures":[{"sig":"MEUCIEZ+OZcn66tfdtOzeqxli2Hd5A9FESHA4nW9twyyalaCAiEA47yVrDVOJBZRfj5ugSq6wXRTsajg1Y/bG7pNg88mLZs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":100082,"size":24264,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.4.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"a208cf2419f159333891473c777f3ee12ebf3178","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:cf628b76-bc33-4c71-bce2-366f9cf7dbac"}},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"11.6.3","description":"My RDS Client","directories":{},"_nodeVersion":"24.11.1","dependencies":{"mysql2":"^3.9.1","onelogger":"^1.0.0","sqlstring":"^2.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.4.0_1764061450865_0.29733892332060186","host":"s3://npm-registry-packages-npm-production"},"publish_time":1764061451052,"_cnpm_publish_time":1764061451052},"1.3.0":{"name":"@eggjs/rds","version":"1.3.0","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.3.0","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":"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"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"akitasummer","email":"644171127@qq.com"}],"homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"fc9785ec92010f7b96c613e488b9c0b491de0243","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.3.0.tgz","fileCount":23,"integrity":"sha512-MshrDFuP18G30Zt1U0NcxHFmFEfi6LDXOUDAJ5Qvf4rn6PDzZ8U0kvp/C8tHeWA2RK3rIDGRqWlqvAzwwdGpFA==","signatures":[{"sig":"MEUCIDLIiAUHiL+Kssu/5TbJdCc/CSajPPrmeX+yuq5pB56aAiEA517QopGMV45w5qYEbIfjKG7LXKQrhhmDmO4gpqpzhkw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":99254,"size":24007,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.3.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"eaf77dc222dc53f9f9949e4dabd7373020358310","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"10.8.2","description":"My RDS Client","directories":{},"_nodeVersion":"20.18.3","dependencies":{"mysql2":"^3.9.1","sqlstring":"^2.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.3.0_1741509271303_0.46999887048974864","host":"s3://npm-registry-packages-npm-production"},"publish_time":1741509271525,"_cnpm_publish_time":1741509271525},"1.2.2":{"name":"@eggjs/rds","version":"1.2.2","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.2.2","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":"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"},{"name":"gemwuu","email":"gemwuu@gmail.com"},{"name":"akitasummer","email":"644171127@qq.com"}],"homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"b5f0df84abfad05d29cd39397984124004015189","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.2.2.tgz","fileCount":23,"integrity":"sha512-Fy6hhKtO23wr0B4oTgZg1a3ncKoeccmNTahinL1SN9V99BuGJn+TClnJqOozvjQ5qtsk88U9M+7hTI38eMue0Q==","signatures":[{"sig":"MEUCIBuj0sCikGXjk0iYN7YYxSPCE33HcqGWp6TiWMZDUyE7AiEA18tP/uzXkoooz2KuNznh6vzNrU/UQBnxs4CcoNhVWuY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":98385,"size":23835,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.2.2.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"db72b8e26dca655fe511bb07cf504498bd01c8c0","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"10.8.2","description":"My RDS Client","directories":{},"_nodeVersion":"20.18.3","dependencies":{"mysql2":"^3.9.1","sqlstring":"^2.3.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.2.2_1741501187229_0.4839128102486663","host":"s3://npm-registry-packages-npm-production"},"publish_time":1741501187461,"_cnpm_publish_time":1741501187461},"1.2.1":{"name":"@eggjs/rds","version":"1.2.1","description":"My RDS Client","main":"lib/client.js","types":"lib/client.d.ts","scripts":{"contributor":"git-contributor","test":"egg-bin test","ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","prepublishOnly":"npm run clean && npm run build"},"dependencies":{"mysql2":"^3.9.1"},"devDependencies":{"@eggjs/tsconfig":"^1.3.2","@types/mocha":"^10.0.1","@types/node":"^20.2.5","egg-bin":"^6.1.2","eslint":"^8.29.0","eslint-config-egg":"^12.1.0","git-contributor":"^2.0.0","mm":"^3.3.0","typescript":"^5.1.3"},"homepage":"https://github.com/node-modules/rds","repository":{"type":"git","url":"git://github.com/node-modules/rds.git"},"bugs":{"url":"https://github.com/node-modules/rds/issues"},"keywords":["rds","mysql","mysql2"],"engines":{"node":">= 16.17.0"},"author":{"name":"fengmk2","email":"fengmk2@gmail.com","url":"https://github.com/fengmk2"},"license":"MIT","publishConfig":{"access":"public"},"_id":"@eggjs/rds@1.2.1","gitHead":"a40233b3fd757e1ca33c3722fa465c2988787eee","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-GuR3KP8OfI06unLDNyWizje4RRzEdO7BkQ1/fGlzGNA7RZeXjjlfq2ajDuGsmnvEg4tJ1fOUAvw1zzBbh02IKw==","shasum":"ba06b063eb98bfafecf0745e00f4bc307a536a3b","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.2.1.tgz","fileCount":23,"unpackedSize":100010,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDB8CkV+C9RMTs+xmFgwkGiNHNl0C37bZhrvabcNoGObgIgUPVxoh64bFYmSFtc21ACqzxH0tq3t5YAgPUoKGEenG8="}],"size":24065,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.2.1.tgz"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rds_1.2.1_1725591158254_0.5850364680414135"},"_hasShrinkwrap":false,"publish_time":1725591158427,"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":1725591158427},"1.2.0":{"name":"@eggjs/rds","version":"1.2.0","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.2.0","homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"a1f8f1dc985962c38f630ce0d488c1ddd2e9078b","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.2.0.tgz","fileCount":23,"integrity":"sha512-n1jCyBC7zrPOjZ5gLEimNN/V8NFMnr7/7kUO9gGgMRTmF5MSVVR1OAJyK3mN+BNSNfPoEIhyWUUDyERKAVug6g==","signatures":[{"sig":"MEQCIQDai7OKKNoip5SvytBjEurRfqz5JQjgzVPHjOjJv3NwewIfF1vXMbk5FzW3rs/M/9YLfJWHe3M5FwRo5ZHKhKtxmA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":100001,"size":24042,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.2.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"b359064c67476c6c9423da8d8d0a41bc315f82fc","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"10.7.0","description":"My RDS Client","directories":{},"_nodeVersion":"18.20.4","dependencies":{"mysql2":"^3.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","git-contributor":"^2.0.0","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.2.0_1723441361155_0.5981393584688441","host":"s3://npm-registry-packages"},"publish_time":1723441361306,"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":1723441361306},"1.1.0":{"name":"@eggjs/rds","version":"1.1.0","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.1.0","homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"ae0ec5f6b727f4c30f920273c9235d7ed6869454","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.1.0.tgz","fileCount":21,"integrity":"sha512-LMqbWKR1/uddTPH7I/SYmENe5YGPryTe8Tcx9vBE1PrQZNDfbWy6Jso9u5CMloohznbwglCT87numTTvaMoQjg==","signatures":[{"sig":"MEYCIQC702KTVFcXaKwNrCpdYvETNwtBFjeWPB368iL3WTn05gIhAO5hULfL7Hs8jaNmTUt6O/5ojLe+09MELWqdF2jN9S8g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":95539,"size":22902,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.1.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"194062e4bd3bfbd29ef96e9e35175b6f84c61468","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"10.5.0","description":"My RDS Client","directories":{},"_nodeVersion":"18.20.2","dependencies":{"mysql2":"^3.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","git-contributor":"^2.0.0","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.1.0_1713444145573_0.9583942252360345","host":"s3://npm-registry-packages"},"publish_time":1713444145746,"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":1713444145746},"1.0.1":{"name":"@eggjs/rds","version":"1.0.1","keywords":["rds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.0.1","homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"dist":{"shasum":"dff14cf495ef36785647a38af2c2055d2f64ed84","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.0.1.tgz","fileCount":21,"integrity":"sha512-r5UV8ecPnJ2edbzv/cQzapngqL4SSPOSIcr7qy/gU7LXF9kXTUBLVKKeL77aNMuFooIIhPqP2LEPVg0Jv72A5Q==","signatures":[{"sig":"MEUCIQD2BnIuI+VF2ZkvEzx4+cT1be/19CFhgRJaiqpF6UgzpwIgGpT5EnapXLNBF0/J3VUFQOX0kZfspZGrYseawL3cspc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@eggjs%2frds@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":94363,"size":22678,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.0.1.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"cd5a759f013ca37a16f757cccbad8dfb9bcb00e4","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/rds.git","type":"git"},"_npmVersion":"10.2.4","description":"My RDS Client","directories":{},"_nodeVersion":"18.19.1","dependencies":{"mysql2":"^3.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","git-contributor":"^2.0.0","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.0.1_1711463648407_0.538702092171486","host":"s3://npm-registry-packages"},"publish_time":1711463648550,"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":1711463648550},"1.0.0":{"name":"@eggjs/rds","version":"1.0.0","keywords":["myrds","mysql","mysql2"],"author":{"url":"https://github.com/fengmk2","name":"fengmk2","email":"fengmk2@gmail.com"},"license":"MIT","_id":"@eggjs/rds@1.0.0","homepage":"https://github.com/node-modules/myrds","bugs":{"url":"https://github.com/node-modules/myrds/issues"},"dist":{"shasum":"6bbc53422d40db43f4457a37cbcbf47a28b84adf","tarball":"http://registry-npm.ywwl.com/@eggjs/rds/download/@eggjs/rds-1.0.0.tgz","fileCount":21,"integrity":"sha512-hNVUjzIhNW/nOR9KN+cbiMdkQyoDNbQ9hdmGag7GxeIriSiENq+x2BIyeOwc9Dk1Vl0UDBtefVI18j4t8nz9vw==","signatures":[{"sig":"MEYCIQDstzOnQKDmyoWOvgkWq0bDnOGJ5LNZrksI/Ghk15FObgIhAKrU/s8dR3XFtCySlow+FiAC63hSOA3jJ0uaibe00jPv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":93638,"size":22578,"noattachment":false,"key":"/@eggjs/rds/-/@eggjs/rds-1.0.0.tgz"},"main":"lib/client.js","types":"lib/client.d.ts","engines":{"node":">= 16.17.0"},"gitHead":"0f8229f1d688d1e7d1ac432714759b6250706ae5","scripts":{"ci":"npm run lint && egg-bin cov && npm run prepublishOnly","lint":"eslint src test --cache","test":"egg-bin test","build":"tsc -p ./tsconfig.json","clean":"tsc --build --clean","contributor":"git-contributor","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"fengmk2","email":"fengmk2@gmail.com"},"repository":{"url":"git://github.com/node-modules/myrds.git","type":"git"},"_npmVersion":"9.3.1","description":"My RDS Client","directories":{},"_nodeVersion":"18.19.0","dependencies":{"mysql2":"^3.9.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mm":"^3.3.0","eslint":"^8.29.0","egg-bin":"^6.1.2","typescript":"^5.1.3","@types/node":"^20.2.5","@types/mocha":"^10.0.1","@eggjs/tsconfig":"^1.3.2","git-contributor":"^2.0.0","eslint-config-egg":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/rds_1.0.0_1706619932733_0.7784823385544153","host":"s3://npm-registry-packages"},"publish_time":1706619932868,"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":1706619932868}},"readme":"# @eggjs/rds\n\n[![NPM version][npm-image]][npm-url]\n[![Node.js CI](https://github.com/node-modules/rds/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/rds/actions/workflows/nodejs.yml)\n[![Test coverage][codecov-image]][codecov-url]\n[![npm download][download-image]][download-url]\n\n[npm-image]: https://img.shields.io/npm/v/@eggjs/rds.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@eggjs/rds\n[codecov-image]: https://codecov.io/github/node-modules/rds/coverage.svg?branch=master\n[codecov-url]: https://codecov.io/github/node-modules/rds?branch=master\n[download-image]: https://img.shields.io/npm/dm/@eggjs/rds.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@eggjs/rds\n\nA RDS client.\nRDS, Relational Database Service. Equal to well know Amazon [RDS](http://aws.amazon.com/rds/).\n\nSupport `MySQL` protocol only.\n\n## Usage\n\n### Create RDS instance\n\n```ts\nimport { RDSClient } from '@eggjs/rds';\n\nconst db = new RDSClient({\n  host: 'your-rds-address.mysql.rds.aliyuncs.com',\n  port: 3306,\n  user: 'your-username',\n  password: 'your-password',\n  database: 'your-database-name',\n  // optional params\n  // The charset for the connection.\n  // This is called \"collation\" in the SQL-level of MySQL (like utf8_general_ci).\n  // If a SQL-level charset is specified (like utf8mb4)\n  // then the default collation for that charset is used. (Default: 'UTF8_GENERAL_CI')\n  // charset: 'utf8_general_ci',\n  //\n  // The maximum number of connections to create at once. (Default: 10)\n  // connectionLimit: 10,\n  //\n  // The maximum number of connection requests the pool will queue\n  // before returning an error from getConnection.\n  // If set to 0, there is no limit to the number of queued connection requests. (Default: 0)\n  // queueLimit: 0,\n  // Set asyncLocalStorage manually for transaction\n  // connectionStorage: new AsyncLocalStorage(),\n  // If create multiple RDSClient instances with the same connectionStorage, use this key to distinguish between the instances\n  // connectionStorageKey: 'datasource',\n  \n  // The timeout for connecting to the MySQL server. (Default: 500 milliseconds)\n  // connectTimeout: 500,\n\n  // The timeout for waiting for a connection from the connection pool. (Default: 500 milliseconds)\n  // So max timeout for get a connection is (connectTimeout + poolWaitTimeout)\n  // poolWaitTimeout: 500,\n});\n```\n\n### Insert\n\n- Insert one row\n\n```js\nconst row = {\n  name: 'fengmk2',\n  otherField: 'other field value',\n  createdAt: db.literals.now, // `now()` on db server\n  // ...\n};\nconst result = await db.insert('table-name', row);\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 1,\n  insertId: 3710,\n  serverStatus: 2,\n  warningCount: 2,\n  message: '',\n  protocol41: true,\n  changedRows: 0 }\n```\n\n- Insert multi rows\n\nWill execute under a transaction and auto commit.\n\n```js\nconst rows = [\n  {\n    name: 'fengmk1',\n    otherField: 'other field value',\n    createdAt: db.literals.now, // `now()` on db server\n    // ...\n  },\n  {\n    name: 'fengmk2',\n    otherField: 'other field value',\n    createdAt: db.literals.now, // `now()` on db server\n    // ...\n  },\n  // ...\n];\n\nconst results = await db.insert('table-name', rows);\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 2,\n  insertId: 3840,\n  serverStatus: 2,\n  warningCount: 2,\n  message: '&Records: 2  Duplicates: 0  Warnings: 0',\n  protocol41: true,\n  changedRows: 0 }\n```\n\n### Update\n\n- Update a row with primary key: `id`\n\n```js\nconst row = {\n  id: 123,\n  name: 'fengmk2',\n  otherField: 'other field value',\n  modifiedAt: db.literals.now, // `now()` on db server\n};\nconst result = await db.update('table-name', row);\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 1,\n  insertId: 0,\n  serverStatus: 2,\n  warningCount: 0,\n  message: '(Rows matched: 1  Changed: 1  Warnings: 0',\n  protocol41: true,\n  changedRows: 1 }\n```\n\n- Update a row with `options.where` and `options.columns`\n\n```js\nconst row = {\n  name: 'fengmk2',\n  otherField: 'other field value',\n  modifiedAt: db.literals.now, // `now()` on db server\n};\nconst result = await db.update('table-name', row, {\n  where: { name: row.name },\n  columns: [ 'otherField', 'modifiedAt' ]\n});\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 1,\n  insertId: 0,\n  serverStatus: 2,\n  warningCount: 0,\n  message: '(Rows matched: 1  Changed: 1  Warnings: 0',\n  protocol41: true,\n  changedRows: 1 }\n```\n\n### Update multiple rows\n\n- Update multiple rows with primary key: `id`\n\n```js\nconst options = [{\n  id: 123,\n  name: 'fengmk2',\n  email: 'm@fengmk2.com',\n  otherField: 'other field value',\n  modifiedAt: db.literals.now, // `now()` on db server\n}, {\n   id: 124,\n  name: 'fengmk2_2',\n  email: 'm@fengmk2_2.com',\n  otherField: 'other field value 2',\n  modifiedAt: db.literals.now, // `now()` on db server\n}]\nconst result = await db.updateRows('table-name', options);\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 2,\n  insertId: 0,\n  serverStatus: 2,\n  warningCount: 0,\n  message: '(Rows matched: 2  Changed: 2  Warnings: 0',\n  protocol41: true,\n  changedRows: 2 }\n```\n\n- Update multiple rows with `row` and `where` properties\n\n```js\nconst options = [{\n  row: {\n    email: 'm@fengmk2.com',\n    otherField: 'other field value',\n    modifiedAt: db.literals.now, // `now()` on db server\n  },\n  where: {\n    id: 123,\n    name: 'fengmk2',\n  }\n}, {\n  row: {\n    email: 'm@fengmk2_2.com',\n    otherField: 'other field value2',\n    modifiedAt: db.literals.now, // `now()` on db server\n  }, \n  where: {\n    id: 124,\n    name: 'fengmk2_2',\n  }\n}]\nconst result = await db.updateRows('table-name', options);\nconsole.log(result);\n{ fieldCount: 0,\n  affectedRows: 2,\n  insertId: 0,\n  serverStatus: 2,\n  warningCount: 0,\n  message: '(Rows matched: 2  Changed: 2  Warnings: 0',\n  protocol41: true,\n  changedRows: 2 }\n```\n\n### Get\n\n- Get a row\n\n```js\nconst row = await db.get('table-name', { name: 'fengmk2' });\n\n=> SELECT * FROM `table-name` WHERE `name` = 'fengmk2'\n```\n\n### Select\n\n- Select all rows\n\n```js\nconst rows = await db.select('table-name');\n\n=> SELECT * FROM `table-name`\n```\n\n- Select rows with condition\n\n```js\nconst rows = await db.select('table-name', {\n  where: {\n    type: 'javascript'\n  },\n  columns: ['author', 'title'],\n  orders: [['id', 'desc']]\n});\n\n=> SELECT `author`, `title` FROM `table-name`\n WHERE `type` = 'javascript' ORDER BY `id` DESC\n```\n\n### Delete\n\n- Delete with condition\n\n```js\nconst result = await db.delete('table-name', {\n  name: 'fengmk2'\n});\n\n=> DELETE FROM `table-name` WHERE `name` = 'fengmk2'\n```\n\n### Count\n\n- Get count from a table with condition\n\n```js\nconst count = await db.count('table-name', {\n  type: 'javascript'\n});\n\n=> SELECT COUNT(*) AS count FROM `table-name` WHERE `type` = 'javascript';\n```\n\n### Transactions\n\nbeginTransaction, commit or rollback\n\n```js\nconst tran = await db.beginTransaction();\n\ntry {\n  await tran.insert(table, row1);\n  await tran.update(table, row2);\n  await tran.commit();\n} catch (err) {\n  // error, rollback\n  await tran.rollback(); // rollback call won't throw err\n  throw err;\n}\n```\n\n#### Transaction with scope\n\nAPI: `async beginTransactionScope(scope)`\n\nAll query run in scope will under a same transaction.\nWe will auto commit or rollback for you.\n\n```js\nconst result = await db.beginTransactionScope(async conn => {\n  // don't commit or rollback by yourself\n  await conn.insert(table, row1);\n  await conn.update(table, row2);\n  return { success: true };\n});\n// if error throw on scope, will auto rollback\n```\n\nIn `Promise.all` case, Parallel beginTransactionScope will create isolated transactions.\n\n```js\nconst result = await Promise.all([\n  db.beginTransactionScope(async conn => {\n    // commit and success\n  }),\n  db.beginTransactionScope(async conn => {\n    // throw err and rollback\n  }),\n])\n```\n\n### Raw Queries\n\n- Query without arguments\n\n```js\nconst rows = await db.query('SELECT * FROM your_table LIMIT 100');\nconsole.log(rows);\n```\n\n- Query with array arguments\n\n```js\nconst rows = await db.query('SELECT * FROM your_table WHERE id=?', [ 123 ]);\nconsole.log(rows);\n```\n\n- Query with object arguments\n\n```js\nconst rows = await db.query('SELECT * FROM your_table WHERE id=:id', { id: 123 });\nconsole.log(rows);\n```\n\n### Custom query lifecircle\n\n```ts\ndb.beforeQuery((sql: string) => {\n  // change sql string\n  return `/* add custom format here */ ${sql}`;\n});\n\ndb.afterQuery((sql: string, result: any, execDuration: number, err?: Error) => {\n  // handle logger here\n});\n```\n\n## APIs\n\n- `*` Meaning this function is yieldable.\n\n### IO queries\n\n- async query(sql[, values)\n- async queryOne(sql[, values)\n- async select(table, options)\n- async get(table, where, options)\n- async insert(table, row[s], options)\n- async update(table, row, options)\n- async updateRows(table, options)\n- async delete(table, where)\n- async count(table, where)\n\n### Transactions Helpers\n\n- async beginTransaction()\n- async beginTransactionScope(scope)\n\n### Utils\n\n- escape(value, stringifyObjects, timeZone)\n- escapeId(value, forbidQualified)\n- format(sql, values, stringifyObjects, timeZone)\n\n### Literals\n\n```js\nawait db.insert('user', {\n  name: 'fengmk2',\n  createdAt: db.literals.now,\n});\n\n=>\n\nINSERT INTO `user` SET `name` = 'fengmk2', `createdAt` = now()\n```\n\n#### Custom Literal\n\n```js\nconst session = new db.literals.Literal('session()');\n```\n\n## Class Relation\n\n```txt\n+-----------+                          +----------------+\n| RDSClient +-- beginTransaction() --> + RDSTransaction |\n+--+----+---+                          +----+----+------+\n   |    | getConnection()            .conn  |    |\n   |    |         +---------------+         |    |\n   |    +-------->+ RDSConnection +<--------+    |\n   |              +-------+-------+              |\n   |                      | extends              |\n   |                      v                      |\n   |   extends    +-------+-------+    extends   |\n   +------------->+   Operator    +<-------------+\n                  |    query()    |\n                  +---------------+\n```\n\n## For the local dev\n\nRun docker compose to start test mysql service\n\n```bash\ndocker compose -f docker-compose.yml up -d\n# if you run the first time, should wait for ~20s to let mysql service init started\n```\n\nRun the unit tests\n\n```bash\nnpm test\n```\n\nStop test mysql service\n\n```bash\ndocker compose -f docker-compose.yml down\n```\n\n## License\n\n[MIT](LICENSE)\n\n## Contributors\n\n[![Contributors](https://contrib.rocks/image?repo=node-modules/rds)](https://github.com/node-modules/rds/graphs/contributors)\n\nMade with [contributors-img](https://contrib.rocks).\n","_attachments":{},"homepage":"https://github.com/node-modules/rds","bugs":{"url":"https://github.com/node-modules/rds/issues"},"license":"MIT"}