{"_id":"@trovohealth/drizzle-bulk-load","_rev":"9-cc745d2c50be0353410c36ec7ff76aca","name":"@trovohealth/drizzle-bulk-load","dist-tags":{"latest":"0.6.1"},"versions":{"0.1.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.1.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.1.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"69390c067ad089d9b24b9921192478b128adb305","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.1.0.tgz","fileCount":47,"integrity":"sha512-Gd4Xxa9qvnD1GCfUjKdepBznonRqEMbIAA3CGQia3EC7J0oCh70vBXKgg1378F7eWNuAkUJEpU1k/I1FwXsI6Q==","signatures":[{"sig":"MEUCIQDYy+TFsn7+Bp7bGpwCOUVH6GoVsXCPtdoKXqNmSYEXSwIgEXopQZ9KMkm0QEJbnotdCaFV0mS+3jcrj5VVWlceCGQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":95770},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"e8fae9edd0227ed3b362f8ce0f4be0fdc9189536","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"10.9.4","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pg":"^8.20.0","drizzle-orm":"^0.45.1","pg-copy-streams":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.1.0_1772766083574_0.7162650588085551","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.2.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.2.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"001b0ac773587d10bd3df96ce66f98c122a3fca0","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.2.0.tgz","fileCount":47,"integrity":"sha512-nxXv3hxkd+r+fMbV6d6m/DQCeNU4QhGCg9J0biv9yu2u+dQG8RQz14uWMnq37Xon3LHyKS74eXyE1ed/vXXsHA==","signatures":[{"sig":"MEQCIDnkW8Fh7mnqO2nvhLJh9GCOLHElLJ53tyEODB4nn9ifAiAKev9Y8FbEgivz6GLn0u6zLcTgv8frJrcKutiR5Phr+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102910},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"c2c052766dff442459ccca14e4fcb2cd7538e7dc","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"10.9.4","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"22.21.1","dependencies":{"pg":"^8.20.0","drizzle-orm":"^0.45.1","pg-copy-streams":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.2.0_1772771644655_0.6051120162474166","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.3.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.3.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"84f4bab34e86a2c393cdf42229aff49cf181e025","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.3.0.tgz","fileCount":47,"integrity":"sha512-U1lWw4TT2rm9f6u2mzLWgpw5Sf8QRO4OIy8vWiDtKl4N3xjoxAPoLmfpMn16+vlYpBxXujhy3s3A8pGvMT5Zow==","signatures":[{"sig":"MEQCIB6ljQp7gTvza9SlKA+k02ryeF4oF46wTJS7pNaIv3x1AiBvUz9JTJhXPBBJ+9Snkys30RtSkkEa606b9n7wmqsmMQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105272},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"823d10ac0bc1b4d8702b79c71c63dc8d5a3dfaf1","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.3.0_1773081596686_0.53072872446282","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@trovohealth/drizzle-bulk-load","version":"0.3.1","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.3.1","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"4a82e2599a155bc8954010346beb7c0680fdf714","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.3.1.tgz","fileCount":47,"integrity":"sha512-SCHGiNZ+B0zjbfWZFamqZW5vjqyI/kDKP94Q/9oxNJqhloUEHS4bcaBRE5cheF5VMBGPwRHaw/Rwrz43+VTRPg==","signatures":[{"sig":"MEUCIQD0Tm7EcX5j5yZqV6AZVTIndM/MiwYb1hq2ACvJtIniywIgMmjgd4goBYl/8Rjy3Thv0Y8/P/rjKDm0bLzmxFo9hp4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105415},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"823d10ac0bc1b4d8702b79c71c63dc8d5a3dfaf1","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.3.1_1773084015126_0.9764431687264019","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@trovohealth/drizzle-bulk-load","version":"0.3.2","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.3.2","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"999cfc5c7ed5239a92248fbf33ca5533812757ff","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.3.2.tgz","fileCount":9,"integrity":"sha512-9+UOQNn+yvfUOx6c+w53klBc6Dpl1j0Ky1w4MN+dus6e/nQUCyeHpUgWF9fZSd3UycBcfaAgM4uDuTmFf0XZKw==","signatures":[{"sig":"MEQCIAd2GDSVqzQ2DGF3FFWaQZoJRW0XR+5rnDUfK2VNriDkAiAgMJoyi0naIxAbzjiLGQHMv4RaaVlCfiA/e7gFZ05R/w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":211708},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"6a54f5aa16cd00175ee04671ac77a391795b7990","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","tsup":"^8.5.1","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.3.2_1773115206520_0.8050709362142132","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.4.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.4.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"d2d6a0326764ef0da0271578d740eeede57f2b9c","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.4.0.tgz","fileCount":9,"integrity":"sha512-SBZAzQjGPbp0duWP28NAy9gedkngVsE0dWpk+7twW477i4gmkrcKruf05iq2PhivHwgU8xJQz7BHAibWOAdBQg==","signatures":[{"sig":"MEQCIBd19mW6xSNejXI14VbNjoBNdt87PyDkyJo3GMsYYM91AiB2rpc62pLSQvWCas+ItfLcX6xPb+DSejocYCeTNL/hgQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":306126},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"1a11c48ff1e17821585258c0237f8ec3de502777","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","tsup":"^8.5.1","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.4.0_1773198495814_0.8503488768122449","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.5.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.5.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"d2af804cc3d46833e74caa3fa0e744aa3c707148","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.5.0.tgz","fileCount":9,"integrity":"sha512-fS3A7E98QlOGQjYuswxInNa76TdfpoPv4pYbzTxql/mNt4UaIzDH56b0xwguMGn49UQmoyfaSFqVonYnJsrLtg==","signatures":[{"sig":"MEYCIQDL5dOlHx9hzLlELAeqNgxey1tIA0ZXBFgnMBQJq2+AfAIhAPRNw7bHxbGtcwIkCnQRpW2SEH3TW8dMHMFsvdgV064H","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":319588},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"65dc9abeab311f4305512383dbc8f293abfb3471","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","tsup":"^8.5.1","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.5.0_1774285978610_0.467339374382713","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@trovohealth/drizzle-bulk-load","version":"0.6.0","keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","_id":"@trovohealth/drizzle-bulk-load@0.6.0","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"dist":{"shasum":"7c954c634d32d2668d589c512de9072d830b4648","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.6.0.tgz","fileCount":9,"integrity":"sha512-5gHXKtCIP5Lq5+7p/w6/08/kllQJBcBCpEvdLM1U8as9neTMIjs40ZxIIOwA6x2nUxaDZ74sido1FVoHi/dQyQ==","signatures":[{"sig":"MEUCIQDRuaRuQ1DN1DMOa+3MUwSTNXf8hrrsc6oTcIgFrYbxcgIgW+tF99lNiHsk5vPyja1org8oJtispKa/RzQ10U6fADc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":322703},"main":"dist/index.cjs","type":"module","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"65dc9abeab311f4305512383dbc8f293abfb3471","scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"_npmVersion":"11.9.0","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","directories":{},"_nodeVersion":"24.14.0","dependencies":{"drizzle-orm":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.20.0","tsup":"^8.5.1","vitest":"^4.0.18","postgres":"^3.4.8","@types/pg":"^8.18.0","typescript":"^5.9.3","@types/node":"^25.3.3","testcontainers":"^11.12.0","pg-copy-streams":"^7.0.0","temporal-polyfill":"^0.3.2","@types/pg-copy-streams":"^1.2.5","@testcontainers/postgresql":"^11.12.0"},"peerDependencies":{"pg":"^8.0.0","postgres":"^3.0.0","pg-copy-streams":"^7.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"postgres":{"optional":true},"pg-copy-streams":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/drizzle-bulk-load_0.6.0_1774286969999_0.8023122132188842","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@trovohealth/drizzle-bulk-load","version":"0.6.1","description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:watch":"vitest"},"keywords":["drizzle","postgres","copy","bulk","load"],"license":"MIT","dependencies":{"drizzle-orm":"^0.33.0"},"peerDependencies":{"pg":"^8.0.0","pg-copy-streams":"^7.0.0","postgres":"^3.0.0"},"peerDependenciesMeta":{"pg":{"optional":true},"pg-copy-streams":{"optional":true},"postgres":{"optional":true}},"devDependencies":{"@testcontainers/postgresql":"^11.12.0","@types/node":"^25.3.3","@types/pg":"^8.18.0","@types/pg-copy-streams":"^1.2.5","pg":"^8.20.0","pg-copy-streams":"^7.0.0","postgres":"^3.4.8","temporal-polyfill":"^0.3.2","testcontainers":"^11.12.0","tsup":"^8.5.1","typescript":"^5.9.3","vitest":"^4.0.18"},"gitHead":"5076f4e6432acc254535d3e9b3163df01ef5db7e","_id":"@trovohealth/drizzle-bulk-load@0.6.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-D7uQuyFqaQjpVf6MX89EDXysLHv3BeEoZwYjHULGq70rPuvXAMma8Wue7ZbAjFCho/D3Pgld2/LLh1+k4w0eaA==","shasum":"12fe0f21dd60cba93acf76eebc13c5aa2151c255","tarball":"https://registry.npmjs.org/@trovohealth/drizzle-bulk-load/-/drizzle-bulk-load-0.6.1.tgz","fileCount":9,"unpackedSize":318388,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGbCkw+FcvMzM9TBrlvDxmvVibX0Gpq/mA0Bn9mtSk4QAiAohcOmgUDmxAvBctSmMXuk3UO3M8eD1WyvjdN3Y9RVUA=="}]},"_npmUser":{"name":"taylortrovo","email":"taylor@trovohealth.com"},"directories":{},"maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/drizzle-bulk-load_0.6.1_1776180084678_0.2745316204644701"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T03:01:23.459Z","modified":"2026-04-14T15:21:24.959Z","0.1.0":"2026-03-06T03:01:23.733Z","0.2.0":"2026-03-06T04:34:04.883Z","0.3.0":"2026-03-09T18:39:56.846Z","0.3.1":"2026-03-09T19:20:15.272Z","0.3.2":"2026-03-10T04:00:06.690Z","0.4.0":"2026-03-11T03:08:15.986Z","0.5.0":"2026-03-23T17:12:58.764Z","0.6.0":"2026-03-23T17:29:30.239Z","0.6.1":"2026-04-14T15:21:24.835Z"},"license":"MIT","keywords":["drizzle","postgres","copy","bulk","load"],"description":"High-throughput bulk load utilities for Drizzle ORM + Postgres using COPY","maintainers":[{"name":"taylortrovo","email":"taylor@trovohealth.com"}],"readme":"# drizzle-bulk-load\n\nHigh-throughput bulk load utilities for [Drizzle ORM](https://orm.drizzle.team/) + PostgreSQL using the `COPY` protocol.\n\nInspired by [django-bulk-load](https://github.com/cedar-team/django-bulk-load).\n\n## Why\n\nDrizzle ORM doesn't natively support bulk operations that scale to hundreds of thousands of rows. Standard `INSERT` statements hit PostgreSQL's parameter limit (~34k params), and row-by-row operations are slow.\n\nThis library uses PostgreSQL's `COPY FROM STDIN` to stream data into a temporary table, then executes SQL queries (insert, update, upsert, etc.) against the destination table — all within a single transaction.\n\n## Install\n\n```bash\nnpm install @trovohealth/drizzle-bulk-load\n```\n\n**Driver support:** `drizzle-orm/node-postgres` and `drizzle-orm/postgres-js`\n\n## Usage\n\nAll functions accept a Drizzle PostgreSQL database instance (`db`) created via `drizzle()`.\n\nNode-postgres:\n\n```typescript\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { Pool } from 'pg';\n\nconst pool = new Pool({ connectionString: '...' });\nconst db = drizzle(pool);\n```\n\nPostgres.js:\n\n```typescript\nimport { drizzle } from 'drizzle-orm/postgres-js';\nimport postgres from 'postgres';\n\nconst sql = postgres(process.env.DATABASE_URL!);\nconst db = drizzle(sql);\n```\n\nWhen backed by a pooled client (`pg` `Pool` or `postgres.js` root client), the library automatically acquires and releases a dedicated connection for each bulk operation.\n\n### `returnResults` behavior\n\nAll mutation functions support `returnResults: true`. Instead of returning full models, they return an array aligned 1:1 with the input rows and in the same order:\n\n```typescript\n[\n  { pk: { id: 1 }, operation: 'none' },\n  { pk: { id: 2 }, operation: 'updated' },\n  { pk: { id: 3 }, operation: 'inserted' },\n]\n```\n\n`pk` contains the resolved primary key fields for the destination row. `operation` is one of `'inserted'`, `'updated'`, or `'none'`.\n\n### bulkInsertModels\n\nInsert rows using `COPY`, optionally ignoring conflicts.\n\n```typescript\nimport { bulkInsertModels } from '@trovohealth/drizzle-bulk-load';\nimport { users } from './schema';\n\nawait bulkInsertModels({\n  db,\n  table: users,\n  rows: [\n    { name: 'Alice', email: 'alice@example.com' },\n    { name: 'Bob', email: 'bob@example.com' },\n  ],\n  ignoreConflicts: true,             // optional — adds ON CONFLICT DO NOTHING\n  matchFields: [users.id],           // optional — required to resolve existing PKs for ignored conflicts\n  returnResults: true,               // optional — returns ordered { pk, operation } results\n});\n```\n\n### bulkUpdateModels\n\nUpdate existing rows by matching on primary key.\n\n```typescript\nimport { bulkUpdateModels } from '@trovohealth/drizzle-bulk-load';\n\nawait bulkUpdateModels({\n  db,\n  table: users,\n  rows: [\n    { id: 1, name: 'Alice Updated' },\n    { id: 2, name: 'Bob Updated' },\n  ],\n  updateFields: [users.name],            // optional — defaults to all fields present in rows\n  pkFields: [users.id],                  // optional — defaults to table PKs\n  updateIfNullFields: [users.deletedAt], // optional — only update when source or dest is NULL\n  returnResults: true,                   // optional — returns ordered { pk, operation } results\n});\n```\n\n### bulkUpsertModels\n\nInsert new rows and update existing ones in a single operation.\n\n```typescript\nimport { bulkUpsertModels } from '@trovohealth/drizzle-bulk-load';\n\nawait bulkUpsertModels({\n  db,\n  table: users,\n  rows: [\n    { id: 1, name: 'Alice', email: 'alice@new.com' },\n    { id: 99, name: 'New User', email: 'new@example.com' },\n  ],\n  pkFields: [users.id],\n  insertOnlyFields: [users.createdAt], // optional — fields only set on insert, not update\n  returnResults: true,                 // optional — returns ordered { pk, operation } results\n});\n```\n\n### bulkInsertChangedModels\n\nAppend-only insert that only inserts rows where tracked fields have changed compared to the latest existing row (by order field).\n\n```typescript\nimport { bulkInsertChangedModels } from '@trovohealth/drizzle-bulk-load';\n\nawait bulkInsertChangedModels({\n  db,\n  table: priceHistory,\n  rows: newPrices,\n  pkFields: [priceHistory.productId],\n  compareFields: [priceHistory.price, priceHistory.currency],\n  orderField: priceHistory.id, // optional — defaults to PK\n  returnResults: true,         // optional — returns ordered { pk, operation } results\n});\n```\n\n### bulkSelectModelDicts\n\nSelect rows by composite filter keys using parameterized `VALUES` clauses. Automatically batches large filter sets to stay within PostgreSQL's parameter limit.\n\n```typescript\nimport { bulkSelectModelDicts } from '@trovohealth/drizzle-bulk-load';\n\nconst results = await bulkSelectModelDicts({\n  db,\n  table: users,\n  filterFields: [users.id],\n  selectFields: [users.id, users.name, users.email],\n  filterData: [[1], [2], [3]],\n  selectForUpdate: false, // optional — adds FOR UPDATE (requires dedicated connection)\n});\n```\n\n> **Note:** `selectForUpdate` requires a dedicated connection. For `pg`, pass a `PoolClient`-backed drizzle instance. For `postgres.js`, use a transaction/reserved client.\n\n### bulkLoadRowsWithQueries\n\nLow-level function: loads rows into a temp table via `COPY`, then runs arbitrary SQL queries against it. All higher-level functions are built on this.\n\n```typescript\nimport { bulkLoadRowsWithQueries, generateLoadingTableName } from '@trovohealth/drizzle-bulk-load';\n\nconst loadingTableName = generateLoadingTableName('users');\n\nconst rows = await bulkLoadRowsWithQueries({\n  db,\n  table: users,\n  rows: data,\n  loadingTableName,\n  loadQueries: [\n    `INSERT INTO \"users\" (name, email) SELECT name, email FROM \"${loadingTableName}\"`,\n  ],\n  returnRows: true,\n});\n```\n\n`loadQueries` also accepts object entries:\n\n```typescript\n{\n  text: 'SELECT * FROM \"users\" WHERE id = $1',\n  values: [123],\n  returnsRows: true, // optional hint for drivers that do not expose field metadata\n}\n```\n\n## Custom update conditions\n\nUse `updateWhere` to control when updates are applied:\n\n```typescript\nimport { bulkUpdateModels, generateGreaterThanCondition } from '@trovohealth/drizzle-bulk-load';\n\nawait bulkUpdateModels({\n  db,\n  table: users,\n  rows: updates,\n  updateWhere: (updateColumns, srcTable, destTable) =>\n    generateGreaterThanCondition(srcTable, destTable, 'version'),\n});\n```\n\nHelper functions for building WHERE clauses:\n- `generateDistinctCondition` — `IS DISTINCT FROM` (null-safe inequality)\n- `generateGreaterThanCondition` — source column > destination column\n- `generateJoinCondition` — equality join on multiple columns\n- `quoteIdent` — safely quote SQL identifiers\n\n## How it works\n\n1. A temporary table is created (with `ON COMMIT DROP`) matching the destination table's column types\n2. Rows are serialized to CSV and streamed via `COPY FROM STDIN`\n3. SQL queries (insert/update/upsert) run against the temp table within the same transaction\n4. The temp table is automatically dropped when the transaction ends\n\n## License\n\nMIT\n","readmeFilename":"README.md"}