{"_id":"@superfunctions/db","_rev":"11-9b63e74b731529df111d90f145bd294c","name":"@superfunctions/db","dist-tags":{"latest":"0.3.4"},"versions":{"0.1.0":{"name":"@superfunctions/db","version":"0.1.0","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21nCo"},"license":"MIT","_id":"@superfunctions/db@0.1.0","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/conduct/issues"},"dist":{"shasum":"b3084b630e8ebb44f499ba3dac7dcb77052a9f5e","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.1.0.tgz","fileCount":66,"integrity":"sha512-jYnWAmjXTIeDYiErK5I99sOcxkya51s9mnLFXZUACdZ7suLA7TV7WIvciV7LfZmy21JStqyTxE+lla76v1nqIQ==","signatures":[{"sig":"MEUCIQCOEza1XCC3g16knU4s/xxoe5JuFv2bHuwqDvNn8WfLxQIgXEqTnKG0PFzpV8tqFfT4MuGetw4gog9L69WB9RZOVpA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":243387},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"}},"gitHead":"b1140ab1f60ad8bd57fe814cd244d543964ba55d","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"9.5.0","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"18.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"drizzle-orm":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.0_1765286053642_0.5864783256191091","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@superfunctions/db","version":"0.1.1","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21nCo"},"license":"MIT","_id":"@superfunctions/db@0.1.1","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/conduct/issues"},"dist":{"shasum":"b08cb675cd9149270c0eb6d175a969e7334c906e","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.1.1.tgz","fileCount":66,"integrity":"sha512-dH8AC4/klJKWN6gtW9WXKqc6NFuHNjrQm+dZTI5zOTshGOrkyVNNt5ffprmctlD1Ij1YHkAY16UuztLV4cfZwg==","signatures":[{"sig":"MEUCIAQIUFx3I1WWkdVTb8NCBasdeubuErwlEk/CzKTMQI8pAiEAyH25xo97Vl89+OuhB41qkUOByY9vVn5+v2Qhh6XWkrk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":241950},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"}},"gitHead":"b1140ab1f60ad8bd57fe814cd244d543964ba55d","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"9.5.0","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"18.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"drizzle-orm":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.1_1765286428946_0.9649503408184903","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@superfunctions/db","version":"0.1.2","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.1.2","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/conduct/issues"},"dist":{"shasum":"64c82177572408b190e95eba44a9e1755a347d20","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.1.2.tgz","fileCount":66,"integrity":"sha512-MpdGNMNqfVR0qt7tn3wL68derzJiummy7jNjAWJ+a4BEos+LM1Ubj9kZfHZM4gJOHKJZWcvXzodjA1jN2WyXfQ==","signatures":[{"sig":"MEQCICebPmmB/K/IPCaW2F12lAlnrEczsaGaH3YQ8lhSm3VvAiAjcvNI5v7e/UaGtHgXE8KOrHTx4zMeOsvkxBShkt1fTg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242637},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"}},"gitHead":"b1140ab1f60ad8bd57fe814cd244d543964ba55d","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"11.6.1","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"drizzle-orm":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.2_1767516849522_0.07803534773313214","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@superfunctions/db","version":"0.1.3","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.1.3","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/conduct/issues"},"dist":{"shasum":"f2fbad3f2d15701c3d0ac7d9fa0890fca564a4aa","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.1.3.tgz","fileCount":66,"integrity":"sha512-GfinBRUGY6wwOo5cZ3C5pdndECyDfUb3K3VE6egQeKbcWh7hMZIfyIUoGdvrTb2rqTQixcgr6GO1Hpv9BNfrNw==","signatures":[{"sig":"MEUCIQCoZUYFWeeWPOXlEneF8i2f1HNwHWRVNBgFC+hAlaoArwIgAtqmtpYOkMgmdrftMIGrIHOUCJf0qBIDwTHNQUuL/Vk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":242637},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"}},"gitHead":"b1140ab1f60ad8bd57fe814cd244d543964ba55d","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"11.6.1","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"23.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"drizzle-orm":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.3_1767624249871_0.6463028444499681","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@superfunctions/db","version":"0.1.4","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.1.4","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"d7c67af3c4a20a6b961a8cc1767b10602517e56a","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.1.4.tgz","fileCount":98,"integrity":"sha512-b/E1VZd2TMLjzn3yT3RfOnlTyNvi24Y8NYJjIeSqv/PivnTLxqfuXCf/L874Ez9lvSElpZhqabjrWVgJN9JSCg==","signatures":[{"sig":"MEYCIQCNFjoRgyXCWV0hNuAl9JJt3IdWMc7aQ05tsj+kyeHKiQIhANNIpDxs82TV6aCnNz0NlqdueVQbF6VgasWluAbOtwgm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":414658},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"13d0068a71d6b6d560853e74e4ef7672eabd431f","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"10.8.2","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.1.4_1778737542966_0.25790959020859816","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@superfunctions/db","version":"0.2.0","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.2.0","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"9f685c1e4d776eaa0714dc717fbee004283e76c1","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.2.0.tgz","fileCount":118,"integrity":"sha512-PK+qwG1vFukIJcDZ0BtoE+xHfTaMwEJ3eVv0MULtSHasSpuX2COHUQOZGzXkGKwclXPzvcNWYcwv1J183uFQ+A==","signatures":[{"sig":"MEUCIQDKVvH7WeBPFX5SKhT++fyJ69jbicYdxsgUiLxHKdGOkgIgBV8SRIV2PK5adFcT+hV1Wwwg4gbBHsbBXYU1RhzmoiI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":540636},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"e11bd81db6390dbc38303a5f3da6baadbaef0c8b","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"10.8.2","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.2.0_1787981021564_0.9030767755675333","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@superfunctions/db","version":"0.2.1","keywords":["database","adapter","orm","drizzle","prisma","kysely","mongodb","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.2.1","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"36f57eaef635e0a21fbebb4196926117dfa4ab1f","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.2.1.tgz","fileCount":118,"integrity":"sha512-1ZOzy437yoX/2mQTjN00B0nolHRDCCvoMFuuEzJXOG6+/ft2vFPk4aQexKcC/f2Cj/lxjp2kBr/wqSQfCwTBRw==","signatures":[{"sig":"MEUCIFVV5KExXiHiS+j99ZovTMMoMem7xhkZDWqCdKFBFpVOAiEAkKn7GRLraPGN0ki00M/4qB5OYH34C2aPUzG7lW6ntao=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBE28UsiPx22tZtLmWnCOOvI5hWruiK+gnzgnflFhsKIAiEAv5HoU/ISmxfTlVQKnQaly6UAZJ3pJOnQyykdGDWT2h0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":541119},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"76ea582129eb3a3968844652a94eedcbe468fe2f","scripts":{"lint":"echo 'lint not configured'","test":"vitest","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.8","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","mongodb":">=6.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"mongodb":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.2.1_1789490074413_0.9663974782172966","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@superfunctions/db","version":"0.3.0","keywords":["database","adapter","orm","drizzle","prisma","kysely","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.3.0","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"edd3ac9f931aace1f551e507713009227857bb38","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.3.0.tgz","fileCount":118,"integrity":"sha512-opvvj2OAihP/wu2h627lGIOyQIavWOIRdm+bmOM4p9eqYcBVnuS604rkwk5DZxmFAlGCNAfazuz2+2cOW7h38A==","signatures":[{"sig":"MEYCIQC/q/xGKjRr2tDYcBmDM7hVdS57lbGIqZe5vq0SWzNazAIhAPU2nAN9l4TZkLuWmSFUu+9MkUa+FC18hXbgKrlgdF4T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIAt3IiyQVutTBdHWQGdJprNe1QDQ3j42RW/tGC7goT9aAiAjS6/QGecHlLv2R5v807xQkt4GWQE698k01GRDV3JHcQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":544318},"main":"./dist/index.js","type":"module","_from":"file:/tmp/npm-release-JZjmqw/superfunctions-db-0.3.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"11f7e104d2d59f62ac94ab2dd06fc01144d0390b","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"_resolved":"/tmp/npm-release-JZjmqw/superfunctions-db-0.3.0.tgz","_integrity":"sha512-opvvj2OAihP/wu2h627lGIOyQIavWOIRdm+bmOM4p9eqYcBVnuS604rkwk5DZxmFAlGCNAfazuz2+2cOW7h38A==","repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/db"},"_npmVersion":"10.9.9","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"22.23.3","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","vitest":"^3.2.4","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"vitest":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.3.0_1791104364335_0.6797980594867141","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@superfunctions/db","version":"0.3.2","keywords":["database","adapter","orm","drizzle","prisma","kysely","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.3.2","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/superfunctions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"86cd2f8c938084ab9167ce48780faa608aab3523","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.3.2.tgz","fileCount":118,"integrity":"sha512-ZCt5igWAQkRrlDJxvse1Ce9Mr/ncQjp7dsAb01bsTe9PMnTKI59AHoEh5VyYYJuOyf74oFA8+A7c+Y0p28+FVg==","signatures":[{"sig":"MEQCIHUccbXiQxXq4uMmIdITwYlgfMJFjtHoF4JpNQdxa6fPAiAdsawrb/awqrp8/UHTrRjGTqhfrD+t8SvJv2FzqB2c3Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCZCcoIw1KFhOxdedwXJCv93hwJZOrxHvcubKxDFwCCmAIhAKWXLLLYKRB9V+j8LhikH8pTlDl1zTQ5kEqHcBIZx8jl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@superfunctions%2fdb@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":553373},"main":"./dist/index.js","type":"module","_from":"file:/home/runner/work/_temp/npm-package/superfunctions-db-0.3.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"699d9d09932199d660333c57fe7bc646492ea3bf","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"098d3933-297b-46e0-9949-436e79cc8f36"}},"_resolved":"/home/runner/work/_temp/npm-package/superfunctions-db-0.3.2.tgz","_integrity":"sha512-ZCt5igWAQkRrlDJxvse1Ce9Mr/ncQjp7dsAb01bsTe9PMnTKI59AHoEh5VyYYJuOyf74oFA8+A7c+Y0p28+FVg==","repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/db"},"_npmVersion":"11.21.0","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"22.23.4","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","vitest":"^3.2.4","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"vitest":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.3.2_1794344338250_0.2614425756778944","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@superfunctions/db","version":"0.3.3","keywords":["database","adapter","orm","drizzle","prisma","kysely","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/db@0.3.3","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/superfunctions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"a1f868eff2a8bfeecbcf41964587859d3eec71db","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.3.3.tgz","fileCount":118,"integrity":"sha512-ZcLEdnIf25eeRFc6Xr9es+Xc9HFcTsgnL+8gZFtYY1xwOF+en9XHyRW7UR2BMEVkbmWwnU/fMdEmL7KXngqLDg==","signatures":[{"sig":"MEYCIQD4WZ9i8hSU//LC86/ylqYOR7JZIHTg7mDR+uypO5p1OAIhAKmVJ1IM/pLr04t6SYQ0iMAwmAyG/dshuaUIZQ4GeWPe","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBFYdYgDa/hW8tCnt0c8uz49MO1XlBYAX3M7N7gOdKZ6AiEA/pnQhQeL+Ggh/nvSnZMk0+uQVczaJJGvjSelA34VJ1g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@superfunctions%2fdb@0.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":553455},"main":"./dist/index.js","type":"module","_from":"file:/home/runner/work/_temp/npm-package/superfunctions-db-0.3.3.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"ff975b400a67255a7d2f678cda7d183fd85d80f3","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"098d3933-297b-46e0-9949-436e79cc8f36"}},"_resolved":"/home/runner/work/_temp/npm-package/superfunctions-db-0.3.3.tgz","_integrity":"sha512-ZcLEdnIf25eeRFc6Xr9es+Xc9HFcTsgnL+8gZFtYY1xwOF+en9XHyRW7UR2BMEVkbmWwnU/fMdEmL7KXngqLDg==","repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/db"},"_npmVersion":"11.21.0","description":"Shared database adapter system for building useful backend libraries","directories":{},"_nodeVersion":"22.23.4","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@electric-sql/pglite":"^0.3.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","vitest":"^3.2.4","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"vitest":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/db_0.3.3_1794978592803_0.46322114148595706","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"_id":"@superfunctions/db@0.3.4","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"57529161f4ae1ab24d9c26a13e4b7726fccfe3bb","tarball":"https://registry.npmjs.org/@superfunctions/db/-/db-0.3.4.tgz","fileCount":118,"integrity":"sha512-ioDnSrmFSgZsJJiiVnk/Ac4xmejqJMGSGFw1zl8zrBqvbqQJ5q4Y5/khpKP6MBY6WA8xEIvcddLhDqEQDfQn5w==","signatures":[{"sig":"MEUCIQD5/95/1USpBKWBdxv0nX06naICqA9uIYSiGnXbcdUgAgIgAo2ifN/2cjUp8flJjlQ+GtqkfxYhwIkyfD5srvUTF5o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD9I0KWfUB3irP4zPRwF2E/6JfcCdRW/De16Z+z13JkqwIgUa5qFZ0s6cuNcocGlZijf7oyBncP+3eHZXXM6S9DV3o="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@superfunctions%2fdb@0.3.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":572015},"main":"./dist/index.js","name":"@superfunctions/db","type":"module","_from":"file:/home/runner/work/_temp/npm-package/superfunctions-db-0.3.4.tgz","types":"./dist/index.d.ts","author":{"name":"21n"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./types":{"types":"./dist/adapter/types.d.ts"},"./schema":{"types":"./dist/adapter/schema-codecs.d.ts","default":"./dist/adapter/schema-codecs.js"},"./testing":{"types":"./dist/testing/index.d.ts","default":"./dist/testing/index.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","default":"./dist/adapters/index.js"},"./observability":{"types":"./dist/observability.d.ts","default":"./dist/observability.js"},"./adapters/redis":{"types":"./dist/adapters/redis/index.d.ts","default":"./dist/adapters/redis/index.js"},"./adapters/memory":{"types":"./dist/adapters/memory/index.d.ts","default":"./dist/adapters/memory/index.js"},"./adapters/drizzle":{"types":"./dist/adapters/drizzle/index.d.ts","default":"./dist/adapters/drizzle/index.js"},"./adapters/dynamodb":{"types":"./dist/adapters/dynamodb/index.d.ts","default":"./dist/adapters/dynamodb/index.js"},"./adapters/cloudflare-do":{"types":"./dist/adapters/cloudflare-do/index.d.ts","default":"./dist/adapters/cloudflare-do/index.js"},"./adapters/cloudflare-kv":{"types":"./dist/adapters/cloudflare-kv/index.d.ts","default":"./dist/adapters/cloudflare-kv/index.js"}},"gitHead":"60fe1a233438f0164d0b31d3ac6f877b70a227a5","license":"MIT","scripts":{"lint":"tsc --noEmit","test":"vitest run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --watch","test:schema-entry":"node scripts/verify-schema-entry.cjs"},"version":"0.3.4","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"098d3933-297b-46e0-9949-436e79cc8f36"}},"homepage":"https://github.com/21nCo/superfunctions#readme","keywords":["database","adapter","orm","drizzle","prisma","kysely","superfunctions"],"_resolved":"/home/runner/work/_temp/npm-package/superfunctions-db-0.3.4.tgz","_integrity":"sha512-ioDnSrmFSgZsJJiiVnk/Ac4xmejqJMGSGFw1zl8zrBqvbqQJ5q4Y5/khpKP6MBY6WA8xEIvcddLhDqEQDfQn5w==","repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/db"},"_npmVersion":"11.21.0","description":"Shared database adapter system for building useful backend libraries","directories":{},"maintainers":[{"name":"21native","email":"npm@21n.org"}],"_nodeVersion":"22.23.4","dependencies":{"@aws-sdk/lib-dynamodb":"^3.800.0","@aws-sdk/client-dynamodb":"^3.800.0","@superfunctions/observability":"0.0.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"kysely":"^0.28.0","vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0","drizzle-orm":"^0.35.0","better-sqlite3":"^12.5.0","@electric-sql/pglite":"^0.3.0","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"kysely":">=0.28.0","vitest":"^3.2.4 || ^4.0.0","drizzle-orm":">=0.35.0","@prisma/client":">=6.0.0"},"peerDependenciesMeta":{"kysely":{"optional":true},"vitest":{"optional":true},"@prisma/client":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/db_0.3.4_1795074007265_0.9065014891127792"}}},"time":{"created":"2025-12-09T13:14:13.577Z","modified":"2026-11-19T07:40:07.731Z","0.1.0":"2025-12-09T13:14:13.808Z","0.1.1":"2025-12-09T13:20:29.089Z","0.1.2":"2026-01-04T08:54:09.679Z","0.1.3":"2026-01-05T14:44:10.040Z","0.1.4":"2026-05-14T05:45:43.137Z","0.2.0":"2026-08-29T05:23:41.760Z","0.2.1":"2026-09-15T16:34:34.503Z","0.3.0":"2026-10-04T08:59:24.449Z","0.3.2":"2026-11-10T20:58:58.332Z","0.3.3":"2026-11-18T05:09:52.916Z","0.3.4":"2026-11-19T07:40:07.393Z"},"bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"author":{"name":"21n"},"license":"MIT","homepage":"https://github.com/21nCo/superfunctions#readme","keywords":["database","adapter","orm","drizzle","prisma","kysely","superfunctions"],"repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/db"},"description":"Shared database adapter system for building useful backend libraries","maintainers":[{"name":"21native","email":"npm@21n.org"}],"readme":"# @superfunctions/db\n\nShared database adapter system for Superfunctions libraries. Provides a unified interface for interacting with databases across multiple ORMs (Drizzle, Prisma, Kysely).\n\n## Installation\n\n```bash\nnpm install @superfunctions/db\n\n# Install the integration you use. drizzle-orm is a required peer;\n# @prisma/client and kysely are optional peers.\nnpm install drizzle-orm\nnpm install @prisma/client\nnpm install kysely\n\n# The PostgreSQL Drizzle examples also import the pg driver directly.\nnpm install pg\n```\n\n## Quick Start\n\nMemory adapter (tests and local):\n\n```typescript\nimport { memoryAdapter } from '@superfunctions/db/adapters';\n\nconst adapter = memoryAdapter();\n\nconst user = await adapter.create({\n  model: 'users',\n  data: { email: 'user@example.com', name: 'John Doe' },\n});\n```\n\nDrizzle adapter (Postgres, MySQL, SQLite):\n\n```typescript\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { drizzleAdapter } from '@superfunctions/db/adapters';\nimport { Pool } from 'pg';\nimport { users } from './schema';\n\nconst pool = new Pool({ connectionString: process.env.DATABASE_URL });\nconst db = drizzle(pool, { schema: { users } });\nconst adapter = drizzleAdapter({\n  db,\n  dialect: 'postgres', // 'postgres' | 'mysql' | 'sqlite'\n  upsertKeys: { users: 'email' },\n});\n```\n\nRunnable demos: [`examples/`](./examples/).\n\n## Core Concepts\n\n### Adapter Interface\n\nAll adapters implement a unified interface:\n\n```typescript\ninterface Adapter {\n  // CRUD operations\n  create(params: CreateParams): Promise<T>;\n  findOne(params: FindOneParams): Promise<T | null>;\n  findMany(params: FindManyParams): Promise<T[]>;\n  update(params: UpdateParams): Promise<T>;\n  delete(params: DeleteParams): Promise<void>;\n  \n  // Batch operations\n  createMany(params: CreateManyParams): Promise<T[]>;\n  updateMany(params: UpdateManyParams): Promise<number>;\n  deleteMany(params: DeleteManyParams): Promise<number>;\n  \n  // Advanced\n  upsert(params: UpsertParams): Promise<T>;\n  count(params: CountParams): Promise<number>;\n  transaction<R>(callback: (trx: TransactionAdapter) => Promise<R>, options?: { isolationLevel: TransactionIsolation }): Promise<R>;\n  \n  // Lifecycle\n  initialize(): Promise<void>;\n  isHealthy(): Promise<HealthStatus>;\n  close(): Promise<void>;\n  \n  // Schema management\n  getSchemaVersion(namespace: string): Promise<number>;\n  setSchemaVersion(namespace: string, version: number): Promise<void>;\n}\n```\n\nPer-call isolation is opt-in: consult `capabilities.transactions.configurableIsolation`\nand the advertised isolation levels before requiring it. PostgreSQL Drizzle honors\nexplicit isolation; unsupported adapters reject requested isolation rather than\nsilently downgrade it. Omitting options retains ordinary transaction behavior.\n\nRelease gates are package-local: `npm run typecheck`, `npm run build`,\n`npm run lint`, and `npm test`. Tests require the declared native SQLite development\ndependency. Consumers of `@superfunctions/db/testing` must also install Vitest.\n\n### Capabilities System\n\nAdapters declare their capabilities, and libraries adapt accordingly:\n\n```typescript\nconst adapter = memoryAdapter();\n\nif (adapter.capabilities.operations.batch) {\n  // Use batch operations\n  await adapter.createMany({ model: 'users', data: users });\n} else {\n  // Fallback to sequential\n  for (const user of users) {\n    await adapter.create({ model: 'users', data: user });\n  }\n}\n```\n\n### Namespace Isolation\n\nScope records by the `namespace` supplied on each operation:\n\n```typescript\nimport { wrapWithRowLevelNamespace } from '@superfunctions/db';\nimport { memoryAdapter } from '@superfunctions/db/adapters';\n\nconst adapter = wrapWithRowLevelNamespace(memoryAdapter(), {\n  enabled: true,\n  columnName: '__ns',\n  mandatory: true,\n});\n\nawait adapter.create({\n  model: 'users',\n  data: { email: 'user@example.com' },\n  namespace: 'auth',\n});\n// Stored with __ns = 'auth'; other namespaces cannot read this row.\n\nawait adapter.create({\n  model: 'files',\n  data: { path: '/readme.md' },\n  namespace: 'files',\n});\n// Stored with __ns = 'files'.\n```\n\n## Built-in Adapters\n\n### Memory Adapter\n\nIn-memory adapter for testing and development:\n\n```typescript\nimport { memoryAdapter } from '@superfunctions/db/adapters';\n\nconst adapter = memoryAdapter({\n  namespace: { enabled: true },\n  debug: true\n});\n```\n\n### Drizzle Adapter\n\nFor Drizzle ORM (PostgreSQL, MySQL, SQLite):\n\n```typescript\nimport { drizzle } from 'drizzle-orm/node-postgres';\nimport { users, posts } from './schema';\nimport { drizzleAdapter } from '@superfunctions/db/adapters';\nimport { Pool } from 'pg';\n\nconst pool = new Pool({ connectionString: process.env.DATABASE_URL });\nconst db = drizzle(pool, { schema: { users, posts } });\nconst adapter = drizzleAdapter({\n  db,\n  dialect: 'postgres', // 'postgres' | 'mysql' | 'sqlite'\n  upsertKeys: { users: 'email' }, // conflict targets\n  debug: false\n});\n```\n\n**Features:**\n- Full CRUD with where/orderBy/select\n- Batch operations\n- Transactions (async for Postgres/MySQL)\n- Upsert with conflict resolution\n- All where operators: eq, ne, gt, gte, lt, lte, in, not_in, contains, starts_with, ends_with\n\n### Prisma Adapter\n\nFor Prisma ORM:\n\n```typescript\nimport { PrismaClient } from '@prisma/client';\nimport { prismaAdapter } from '@superfunctions/db/adapters';\n\nconst prisma = new PrismaClient();\nconst adapter = prismaAdapter({\n  prisma,\n  modelMap: { users: 'user', posts: 'post' }, // model → Prisma model name\n  schemaVersionsTable: 'schemaVersions', // optional\n  debug: false\n});\n```\n\n**Features:**\n- Full where clause translation with AND/OR\n- Select projection and orderBy\n- Batch operations\n- Transaction support via `$transaction`\n- Upsert with unique constraints\n\n### Kysely Adapter\n\nFor Kysely query builder:\n\n```typescript\nimport { Kysely, PostgresDialect } from 'kysely';\nimport { kyselyAdapter } from '@superfunctions/db/adapters';\n\nconst db = new Kysely<Database>({\n  dialect: new PostgresDialect({ pool })\n});\n\nconst adapter = kyselyAdapter({\n  db,\n  dialect: 'postgres', // 'postgres' | 'mysql' | 'sqlite'\n  schema: { users: 'users', posts: 'posts' }, // model → table name\n  schemaVersionsTable: '__schema_versions', // optional\n  debug: false\n});\n```\n\n**Features:**\n- Type-safe query building\n- Full CRUD with all operators\n- Transactions\n- Upsert (INSERT...ON CONFLICT)\n- Multi-dialect support\n\n### Raw SQL\n\n`drizzleAdapter` and `kyselyAdapter` also expose `adapter.rawSql` for statements the CRUD API cannot express, such as an atomic `UPDATE … RETURNING`. Each `?` is a positional parameter, rendered for the dialect (`$1…` on Postgres); the text must contain no other `?`. `rawSql` uses the adapter's connection but bypasses schema mapping and row-level namespaces. Other adapters leave it undefined.\n\n```typescript\nconst rows = await adapter.rawSql!.query(\n  'UPDATE jobs SET state = ? WHERE id = (SELECT id FROM jobs WHERE state = ? LIMIT 1) RETURNING id',\n  ['leased', 'pending']\n);\nawait adapter.rawSql!.execute('CREATE INDEX IF NOT EXISTS jobs_state_idx ON jobs (state)');\n```\n\n`@superfunctions/queue` uses it for its durable `DatabaseQueueAdapter`.\n\n\n## JSON stored in text columns\n\nFunction authors can declare `{ type: \"json\", jsonStorageType: \"json-text\" }`\non a field in their internal `wrapWithSchema` schema when the physical column\nstores JSON as text (for example SQLite `TEXT`). Native JSON storage remains the\ndefault. The wrapper serializes values on writes and parses them on reads,\nincluding transactions; repeated wrappers with the same codec do not encode twice.\nSelected-field projections remain selected-field projections.\n\nCodec ownership also survives intermediate wrappers declaring native storage:\nthose declarations cannot disable an already-active delegated JSON-text or\ninteger-boolean codec. The outer wrapper avoids converting the field twice.\n\nRuntime `null` is stored as SQL NULL. Both SQL NULL and JSON text `null` read as\nruntime `null`; use a tagged application value if that distinction matters.\nStrings are JSON strings, even if they contain valid JSON text. Malformed stored\nJSON raises a TypeError identifying the field without including its contents.\n\nThe optional Vitest peer is required only by the `@superfunctions/db/testing`\ncontract suites; Vitest 3.2.4+ and 4.x are supported. Production adapters do not\nrequire Vitest.\n\nJSON-text predicates use the same JSON serialization as writes (including each value in `in`/`not_in`). Equality compares the serialized representation, so object key order remains significant; this is not a database-native JSON structural comparison.\n\nJSON-text fields support `eq`, `ne`, `in`, and `not_in`. Range and substring\noperators reject with a field-specific error instead of silently comparing\nserialized JSON using undefined application semantics.\n\nImport `wrapWithSchema` from `@superfunctions/db/schema` when only schema wrapping is needed. This narrow ESM entry does not initialize database drivers or observability; it also supports synchronous `require()` on Node versions that support requiring synchronous ESM (validated on Node 20.19).\n\n## Testing\n\nUse the built-in memory adapter for testing:\n\n```typescript\nimport { memoryAdapter } from '@superfunctions/db/testing';\nimport { describe, it, expect } from 'vitest';\n\ndescribe('My Library', () => {\n  it('should create records', async () => {\n    const adapter = memoryAdapter();\n    \n    const result = await adapter.create({\n      model: 'users',\n      data: { name: 'John' }\n    });\n    \n    expect(result).toHaveProperty('id');\n    expect(result.name).toBe('John');\n  });\n});\n```\n\n## TypeScript\n\nFull TypeScript support with strict types:\n\n```typescript\nimport type {\n  Adapter,\n  CreateParams,\n  WhereClause,\n  TableSchema\n} from '@superfunctions/db';\n\nconst adapter: Adapter = memoryAdapter();\n\nconst params: CreateParams = {\n  model: 'users',\n  data: { name: 'John' }\n};\n\nconst user = await adapter.create(params);\n```\n\n## Error Handling\n\nStandardized error classes across all adapters:\n\n```typescript\nimport { \n  AdapterError, \n  NotFoundError, \n  ConnectionError \n} from '@superfunctions/db';\n\ntry {\n  await adapter.findOne({ model: 'users', where: [{ field: 'id', operator: 'eq', value: '123' }] });\n} catch (error) {\n  if (error instanceof NotFoundError) {\n    console.log('User not found');\n  } else if (error instanceof ConnectionError) {\n    console.log('Database connection failed');\n  } else if (error instanceof AdapterError) {\n    console.log('Adapter error:', error.code);\n  }\n}\n```\n\n## License\n\nApache-2.0\n\n## Contributing\n\nContributions welcome! See [Contributing Guide](../../CONTRIBUTING.md) for details.\n\n## Related Packages\n\n- `@superfunctions/cli` - Schema management and migrations\n","readmeFilename":"README.md"}