{"_id":"@fastify/postgres","_rev":"38-88d50adf802a7f0e3e522d9dc6936f14","name":"@fastify/postgres","dist-tags":{"next":"6.0.0","latest":"6.1.0"},"versions":{"4.0.0":{"name":"@fastify/postgres","version":"4.0.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@4.0.0","maintainers":[{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"ethan_arrowood","email":"ethan@arrowood.dev"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"davidmarkclements","email":"david.mark.clements@gmail.com"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"7c734f0939156ae59d20e7701469baec6c1a1736","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-4.0.0.tgz","fileCount":24,"integrity":"sha512-Mm4rU3SJZ/5HD3cB+fnaj7qgT0yaeR7hFf+jXq1Lc/PeBN2t/hpp2TsKZ2he2UGnmhCPBESMnjmujrO5zUsong==","signatures":[{"sig":"MEUCIQDpMPO1asBsuxTRqTLvGF+nZMqh0bopRCXepKgNtK+2ogIgP2CzWz3LIwK/13iMlIPkMVeD9D79s5XUuRBseFxwAu8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaVp9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDGA/+NFkuwFuD7pajk3KO6jne0pEQfHX8Mu55s12dG01kOvHWF9Wl\r\nrJnZFsA4fwrZxVI81EiFrrwK5PXBlXLu9cj3qwNKnLrtiuhIe0Q2q2yBxle/\r\nkQBvWx6pSGfeai69aKzromOjlnjsZx12Sq0+6LbOmzy5DrlaNMKd2ORgWR0c\r\n7YzXML4vPuG900ZvvyDR2ZwEA1/7K8zlvo+HSS7HbdmjyJ7elqXjRrp6NmPD\r\nkPV3Uwa4YSHlKFvFFNrFw+TiYu7ccG6svCMNeCAQvkhSgYDQg/iJEW1v4Z/l\r\n7PPmHI7jm+UyUKxfgSJNWSO2p4olrXnrWaZS359Z/hg34WjHIUpNMUv6tGRn\r\nW+3g+tehRRb7BvRkmnP36ermejshUU6O3OKSCvoeOCi+crh6ur5t+F0+sSjs\r\n7+j2xqwGViiPxVIVJo+UJmoI7Q5i3pp/qkIqxbwMHUSEj7/Bv0qtSUSXcMlT\r\ngfohsbqmfX1olNBip4yUPcgCJICPRsooyOD0qAhEk0KqWoTcpIJLjimNW+Vi\r\nORj8lQYEctbX0kIc18+rl8u282Y+8MQw5a89Yjkv/0Vc2m/ANesxTTpywBx9\r\nv820cubx9jzoa8400X5RfPDZb8fKCpTA5XtcYAoRx+vBe8S+//4LouJc3b6f\r\n2GmiK7ZpG8KZX6x+di13OW2Hq6yV2guyRd8=\r\n=uija\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"5e3d88a8f642c460efa7821f5b71176b106e413e","scripts":{"test":"standard && tap -J test/*.test.js && npm run test:typescript","test:ci":"standard && tap -J test/*.test.js --coverage-report=lcovonly && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"8.5.5","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"16.15.0","dependencies":{"fastify-plugin":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.20.0","fastify":"^3.21.5","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^4.4.3","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_4.0.0_1651071613796_0.28432313626309846","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"@fastify/postgres","version":"4.0.1","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@4.0.1","maintainers":[{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"ethan_arrowood","email":"ethan@arrowood.dev"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"davidmarkclements","email":"david.mark.clements@gmail.com"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"3eee93367c46922d2fdb82ea2d39032cccc859f7","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-4.0.1.tgz","fileCount":24,"integrity":"sha512-OHzfNdCVcirDkcCHjm0BqgebbEaE+WEcWE4xgm59UWdlqj4a4d8gWo+pUUtxb5eLTYfxnE7cR5zeJyWpYkzaOQ==","signatures":[{"sig":"MEQCICb6bWrHG9gDae1fpwDjVNsDScA6TTX269nf2eVGonrGAiBWSsZdICdyY4TdV7eaaEA7rBNYWN5cMBWhqrnBl3CgMA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifRdAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIEA//TmA+ibVAxztBdk2eNeUR05F7FjdNSvoAMwKexPfmT1IsMmDq\r\nbCusSATpgPLGfm8N6+qNLiraQwP0XLUQpchc2M+HqtC1HnpIB8G/HryY4ukc\r\nY0Vg+TH2UaUvkfom9Uamp2iE4V1B3bktKn9Ss7V6uoa1iH5Sgw66Ieufvn6K\r\nCvbGB1VwrMZNbrdR8VdXWdQKN5v8HZ+4oATveq1k3FwdMw6MPyiNHbnrpRMj\r\nChVzdoUbl0tobTqTnc/b1gHSWqfMw+p6Bl0nqrdAOuHuoeJ35PAzYobNje9d\r\nYvSM/KKw4vsRf3M+fqMfmmOSqn3C2qV91mnuFKbs5LfQq0nLkpE47Uodjfcr\r\nDToTVj6ZkYY6dkyjsPThBuAKDBx2V5giFh1OqL3jbH7k1+/3iPwjVxVocpeY\r\nNAmj6pI/22KE1r72hGaAOKA8Zhg0oxJq+zms2iAclDXUREopm2tziYwbP6St\r\npbhu1vg6ejXL8muKtDhCN8gt0fwQDpFXZweok55rdLkhlyITyAVC8NMPfycG\r\nxtIkABo0Wq+DJIMFGR40MMjz9RZ4HCu6GdSEHvrvVEOMerShYJoDg4UoKIPY\r\n0/Jy3fUs0H+BS8g5E3IBGedhl/2sXeCEDxZQoHVE3ej6cHsyaiv6Az6vmlMr\r\nbX21mKGm37fyNU5e31jDuz9myz3NK4abp0w=\r\n=csst\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"70560a34386697195e407d0d5c0310d5fc5ad835","scripts":{"test":"standard && tap -J test/*.test.js && npm run test:typescript","test:ci":"standard && tap -J test/*.test.js --coverage-report=lcovonly && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"8.5.5","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"16.14.0","dependencies":{"fastify-plugin":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.20.0","fastify":"^3.21.5","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^4.4.3","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_4.0.1_1652365120001_0.8238009418761816","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@fastify/postgres","version":"5.0.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@5.0.0","maintainers":[{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"ethan_arrowood","email":"ethan@arrowood.dev"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"davidmarkclements","email":"david.mark.clements@gmail.com"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"41a8749fa2c6e512addf868dc16c30213959e5b0","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-5.0.0.tgz","fileCount":24,"integrity":"sha512-FXb6EA2bu18Gl4i82h82JUP7j704PCEin7fMf8Wm0MilZw2gJ0f/0qhEAP1XzZjFdhqLTAxNXCE5URt+nE+02Q==","signatures":[{"sig":"MEQCIDb4C1mwvEmZ4UEAtca8hWLUnvglTZh4AGTwpHrj1TzKAiAQGbcA6cDtGjWkO6Qn0MgpzF4fdwtvR9IBKzujvgbR2w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifnURACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmobIg//SJnOUD1P6efgGsCmrf/pqFor9Tq/zGFELZUcuXulmhQ39lFl\r\n4QdogHSbl3qrQQGNkhxenURYx2Vqieo5dgoOjwvzo/Vk7l1OOqTkP77KczZK\r\np6EzJefGe4MPg5OsVLyJSCvwedDmv/F2/tIoYtzkkeILtXs+n19BHYvNFmLm\r\n40IJF8pLpF7MS/rEKMGc9cfLf6zVzcTOVa7egsImam3w8kMj0QeBc8CSjIJk\r\nyovtJqJr05gWth6BpltPHj+LXak0db6wJhDuElZIU5Jh06zLoSVUhBldHZSk\r\nseW5GVsxDvKdPCSQtuu960L8zz+d6yQ/VepH8nF6JpnbXJjPEbPeJqJeeFtk\r\nbhNr7odi47hoP+zuBEIpgHItQ4UQMJSxcckd9xNIIzAv1PBGSlDpSB7MXIe6\r\nan9riOuewZbHlEJ5+MMwLK9VY/pNTxbuFsod4J8sgCw++mb0IO0mpfnsV0ke\r\nXIvNYA9JqB1UhKvuDj5XoR0fK54KV+jWOiU8bBz5XGOHA9x8qY4i7UA8xh6s\r\nxtUBkcAw2niO/kycvoMqaFiIOS1kVq2ng6VQvsNWfeIgYgT8AgMoPNOvUh5G\r\nns5xkawETvR1knhwaQwH/GTv2ecnTdHHrpwLPs8Q6Eutr0nuKy5WGkjTRc52\r\ndXm2wk/9Alj4cM1OTaC3fSrQyI1ThPomzfU=\r\n=+j9o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"21612604e4e4d33483db320f2f2b679bf3d71ad8","scripts":{"test":"standard && tap -J test/*.test.js && npm run test:typescript","test:ci":"standard && tap -J test/*.test.js --coverage-report=lcovonly && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"8.5.5","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"16.14.0","dependencies":{"fastify-plugin":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.20.0","fastify":"^4.0.0-rc.2","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^4.4.3","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_5.0.0_1652454673681_0.6256671999917849","host":"s3://npm-registry-packages"}},"5.1.0":{"name":"@fastify/postgres","version":"5.1.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@5.1.0","maintainers":[{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"ethan_arrowood","email":"ethan@arrowood.dev"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"davidmarkclements","email":"david.mark.clements@gmail.com"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"59b18bfad833f929618366ced085130e10734db3","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-5.1.0.tgz","fileCount":24,"integrity":"sha512-nFqnJMiVagliPU1e4dwZIEYM1SgkSev1tD72hy5gOk7l6yiDlL2JJfsRhnPIAhlEPLKVr+7neXq7v79/+gfJFg==","signatures":[{"sig":"MEUCIB4M4HDcQMBEW5pyQ+MlCXWlXvoBxFd3ux+nHM0ktRIbAiEAnU0cLBN4MJv6PI5g4aggsqSoZlwnI3H0hIad9Igkk3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62263,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+0qrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo8fQ/+NzVx3h2rNJwhulJrb38+blq9QClP4GujMRKub+9atfIQV74L\r\nETJQ1/VPs0o6DdPPGNROvWdPRUp7LLV1Lgn0p0UiwngtrYSL8BEnAbZc925B\r\nIp89eNiamqaI7JbEiutJ/h/8g0G7r75DYPA7iiZP7IauRiO+aaI2IwHJHXuC\r\nca2o7PyDfm4a20XUwtM7IdPs/WgtSol5EcsKL3ZdhDDHxk0aSjbzl+Rpp2vG\r\ntD/btKMnv05TjoyZxja3VFmHWfmuM+363g9hwLDThMQHr4EAxwjLHG7Jso5r\r\nF+b+VQcYMjjECBos/L826pm/EwobBWhlTWHNwIHxSjtG1gUOTk2j5SoYhqYr\r\nfulHS8OiBmUA39PYglgo0ShEZBcLL+QnJveqZ5AP48zG1irsa4c2yOHHcIUZ\r\nA+4MYqz1h4St/K07R3PY6D1zjEf5jtUCUrwGt85CeFkkxZ8tLsOqXWQ071M7\r\nQBl1at3jzE0olcsk1IJ5MvgiIK0sOV3QSm5K2M6EXL2WjJ9NBxJAyAjWfl00\r\nBr8TOR/Eg39+7j4j6GyL3xLiBIQdpsCn0ssAPK7Y7NQAMAJypVnTQtGJO4Wl\r\n2KCBWQjIV31FnqvAGQfUeIfo1NMxOGHCJgja8YHBOQSGITR1IM1uBx876DSN\r\nwwK+vDRbhh23eRR9FksHyMoW/qtN00ZRqIk=\r\n=pU4c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"7b1f5a18449d2227adb3c2d265f05322ae14f663","scripts":{"test":"standard && tap -J test/*.test.js && npm run test:typescript","test:ci":"standard && tap -J test/*.test.js --coverage-report=lcovonly && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"8.17.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"16.15.1","dependencies":{"fastify-plugin":"^4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.22.0","fastify":"^4.0.0-rc.2","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^4.4.3","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_5.1.0_1660635819125_0.23445870685670522","host":"s3://npm-registry-packages"}},"5.2.0":{"name":"@fastify/postgres","version":"5.2.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@5.2.0","maintainers":[{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"davidmarkclements","email":"david.mark.clements@gmail.com"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"d97560739845c1af35a2613603191d161720fe62","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-5.2.0.tgz","fileCount":24,"integrity":"sha512-5NVC+11YGHhv4YoQoNTUduMeD6QHT+axZbF6AHA5vkMj8R7hndjS48Rbqdzqll7Q8aXgaXmwb1FndboBvKyBZQ==","signatures":[{"sig":"MEYCIQDEGzTuF3bOF4ECLlVY3f+csJNho8dGZj14eAo1ojP2jwIhAOTDBbW/B+yP4asDzJfMertpOI/+Hd+vYa4xnBcDRQUP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjbv6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpVCA//W3e+xrTOZnY9Rvn0oflSWoi8WgxDbu4IaGtCwE/VaBRwhsEg\r\nQul8lYfIAItkbTXnpicqElVpiu6QT8rD+xVou279fEsGXs1aGbKEHFn9qW3h\r\nSwEool3B8NtEjyx3sG6s79KfOZWJyKofaBItieY+05iQDj8P0mqKSONLqEOo\r\n6HOTST4TG3mpWTw6Yu9B1p4SowfGD3nKGrWFO0MJ6+bMbBjdowwE8b/8sSBa\r\nzk5Y6eBXFXjVSBEFBklQ1ENEdSQz0fT8tJi2670EA50feSNCQHCNWhYgCCpJ\r\niHnSppAPemtzKLUjA/23vuw6B9CWpRnU8iCmGKqbDzV3GJKUvfNgVs0AVELL\r\n5gi4NvrTPvI1zzMyN776Yu0eOlZR5g4MqStelCbMDzsuWCpRvLHsLqvse9ip\r\n/Hx374FJHudFXKUh2pVhazCs7Aqkx/cPup5tyGYraKUmpMzIyWqoCa9U5A5u\r\nyZDnsmyS70J6/oinXPHCTG6pSQl5wGthte9T07lsurl0A61I0uMpZrncjsku\r\ngwX0BQGzSNs5bQFDjundBXzGkWaY4yR0UfRp2f3/r/Za31SEDFPbhko0B43Y\r\nRrjcqKhDFk9Atjv95GjYASrVFWUeOdN2Z2HXKomNFzWYYX4IOOZwNloIxAoV\r\naF8UKmWXCipkz18mOpnNvYHQQWX3CAi2o4c=\r\n=fRUC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","types":"index.d.ts","gitHead":"62a39e223df634ae5dbe9a556b562a77575e0802","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap -J test/*.test.js","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"9.1.2","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"16.17.0","dependencies":{"fastify-plugin":"^4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.25.0","fastify":"^4.0.0-rc.2","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^4.4.3","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_5.2.0_1670233082588_0.5696312095908429","host":"s3://npm-registry-packages"}},"5.2.1":{"name":"@fastify/postgres","version":"5.2.1","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@5.2.1","maintainers":[{"name":"gurgunday","email":"gurgun.dayioglu@icloud.com"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"c9479f90200d7b044772b53c9a483d8cb8b23fa9","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-5.2.1.tgz","fileCount":24,"integrity":"sha512-CFVjcrYIIvdanAugo0SFwvped2JVkncElKd88exo2NteDVHhdpCv5u7jglDhSIMio9JCfWj3g/kcxcYLeigoGA==","signatures":[{"sig":"MEYCIQDLiB4S/rGXrDYVn1ReKZs+OqIIUpYqE8hVT2gCVdenKQIhAK4Enx57KoCAg6VfQrxRxPenC7JPETu+9DzOqAw3tR88","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":62665},"main":"index.js","types":"index.d.ts","gitHead":"bd81d51b7469aa64f51e0fca927cde52431edb1a","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap -J test/*.test.js","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"eomm","email":"behemoth89@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.1.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.8.0","dependencies":{"fastify-plugin":"^4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.29.0","fastify":"^4.0.0-rc.2","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^5.0.2","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_5.2.1_1697647597701_0.8618101613158344","host":"s3://npm-registry-packages"}},"5.2.2":{"name":"@fastify/postgres","version":"5.2.2","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@5.2.2","maintainers":[{"name":"gurgunday","email":"gurgun.dayioglu@icloud.com"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@outlook.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"8a6b9cf3b67ae28eb1a409fcb427039d2c9fa74d","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-5.2.2.tgz","fileCount":24,"integrity":"sha512-8TWRqDSiXJp0SZjbHrqwyhl0f55eV4fpYAd9m7G0hGUpyEZJFwcxIDQYjnlRAXcVTq5NloUjFH6DxgmxZ3apbQ==","signatures":[{"sig":"MEUCIG9xqpEaH1ajEuKtRe2ZlA2OgD5CmgB6gvhkUwN3NhOeAiEA1UTI9KsIRIbvOUpwX9QVtVcwA9e3S52ka5YSbN8gubI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63539},"main":"index.js","types":"index.d.ts","gitHead":"f00cefc4690a0fe3f5c274b28ae9c55d66b1ae66","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap -J test/*.test.js","test:report":"standard && tap -J --coverage-report=html test/*.test.js","test:verbose":"standard && tap -J test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"eomm","email":"behemoth89@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.1.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.8.0","dependencies":{"fastify-plugin":"^4.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.7.1","tap":"^16.0.0","tsd":"^0.29.0","fastify":"^4.0.0-rc.2","standard":"^17.0.0","@types/pg":"^8.6.1","pg-native":"^3.0.0","typescript":"^5.0.2","@tsconfig/node10":"^1.0.8"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_5.2.2_1697953509597_0.5974417605761475","host":"s3://npm-registry-packages"}},"6.0.0-pre.fv5.1":{"name":"@fastify/postgres","version":"6.0.0-pre.fv5.1","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.0.0-pre.fv5.1","homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"edf1da01309bfd4729006aa0f028bfb35cdd45f4","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.0.0-pre.fv5.1.tgz","fileCount":24,"integrity":"sha512-xUhYCNwG48lMJ997w/DZ0G93JEExxZOoNH36+YjJyP9D5k+u6mUui3LZINspkxFOrnh/t3swd1aSZ25zBhOZDg==","signatures":[{"sig":"MEUCIQC8ZndnlC04jlswBBilgdf28f2cUbYnAwdeis35FXfB8wIgfykQOoYOryuXOYjMNoJwITPivqyBETVObIsAeMARrK0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63577},"main":"index.js","type":"commonjs","types":"index.d.ts","gitHead":"ace0759fe14252629629c8efe1ad1847842a5630","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap test/*.test.js","test:report":"standard && tap --coverage-report=html test/*.test.js","test:verbose":"standard && tap test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"jsumners","email":"james.sumners@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.7.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.15.0","dependencies":{"fastify-plugin":"^5.0.0-pre.fv5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"pg":"^8.11.3","tap":"^18.7.1","tsd":"^0.30.7","fastify":"^5.0.0-alpha.3","standard":"^17.1.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"^5.4.3","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.0.0-pre.fv5.1_1719656804954_0.22215596681549998","host":"s3://npm-registry-packages"}},"6.0.0-pre.fv5.2":{"name":"@fastify/postgres","version":"6.0.0-pre.fv5.2","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.0.0-pre.fv5.2","maintainers":[{"name":"gurgunday","email":"hey@gurgun.day"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"8e4e50cea837057348d9bd73afb57ade10e0258c","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.0.0-pre.fv5.2.tgz","fileCount":24,"integrity":"sha512-L799/No3uzpXGRSJ+5wYJXGclk6VNKaXtzJs1DDmBsk2Ig7uID0vcJGqIfdZJ22ClJNNGVNGcZzeQEmLfTu5ag==","signatures":[{"sig":"MEUCIFZn60jjU7OROCXIsjx97zUTffqzGsQiE+9a1zRT5McQAiEAgPkz0lD0YYNGbuiJj/lK/UhNGRgpwo/qKG2is/1DW3o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63577},"main":"index.js","type":"commonjs","types":"index.d.ts","gitHead":"5cc304963a34b624cc439755d8e1cc290c756300","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap test/*.test.js","test:report":"standard && tap --coverage-report=html test/*.test.js","test:verbose":"standard && tap test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"fdawgs","email":"frazer.dev@icloud.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.7.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"18.20.4","dependencies":{"fastify-plugin":"^5.0.0-pre.fv5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"pg":"^8.11.3","tap":"^18.7.1","tsd":"^0.31.1","fastify":"^5.0.0-alpha.3","standard":"^17.1.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"^5.4.3","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.0.0-pre.fv5.2_1723048131466_0.027053111298388943","host":"s3://npm-registry-packages"}},"6.0.0":{"name":"@fastify/postgres","version":"6.0.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.0.0","maintainers":[{"name":"gurgunday","email":"hey@gurgun.day"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"e71b2aebcf075135117544fa85ab5db2197abac6","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.0.0.tgz","fileCount":34,"integrity":"sha512-dnOyGbva1UxHWhR2kQNJZM3nJMOm/56XnwOUaF4f8LNyp7I54kqN90EbE49RZCmOAAWoov05tKLkS2QUtn6eiQ==","signatures":[{"sig":"MEYCIQCmwXH1pBtdjU4dY3Ne745TiwJ3aapBSNsvnTpq5FVmjwIhAKzbe2W4aoHEjzHUChplVUtHK6sRhe6mkaHMDXjABIEw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172817},"main":"index.js","type":"commonjs","types":"index.d.ts","gitHead":"ecb2f969ccce573402040b5b0c655fcdbfa4610d","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap test/*.test.js","test:report":"standard && tap --coverage-report=html test/*.test.js","test:verbose":"standard && tap test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"matteo.collina","email":"hello@matteocollina.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.8.1","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.16.0","dependencies":{"fastify-plugin":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"pg":"^8.11.3","tap":"^18.7.1","tsd":"^0.31.1","fastify":"^5.0.0-alpha.4","standard":"^17.1.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"^5.4.3","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.0.0_1725636209429_0.2530421942416152","host":"s3://npm-registry-packages"}},"6.0.1":{"name":"@fastify/postgres","version":"6.0.1","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.0.1","maintainers":[{"name":"gurgunday","email":"hey@gurgun.day"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"is2ei","email":"issei.horie@is2ei.com"},{"name":"fdawgs","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"f3f8baf2e4d5223bc8d861963cf8b542db8fdd2b","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.0.1.tgz","fileCount":24,"integrity":"sha512-z+lJWvJO61uWquysPs7yfyEggKVPKUNssfzEsiIBCtl+qshv7FNgxFEqS0BShXRModzRRk+woS+Fa06ZPC5JIA==","signatures":[{"sig":"MEUCIQDORwsZn57kOZlsPC80Vw505laJiSrrXdIzuW8SbTIWogIgIm1xBh5pcWgTaMe94rJBQzxd+LtwaTnlC5ujzXRuXD4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":63549},"main":"index.js","type":"commonjs","types":"index.d.ts","gitHead":"058d2cc9269ede1b8547ebbaa2e5f5abeb157ccf","scripts":{"lint":"standard","test":"npm run test:unit && npm run test:typescript","lint:fix":"standard --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"tap test/*.test.js","test:report":"standard && tap --coverage-report=html test/*.test.js","test:verbose":"standard && tap test/*.test.js -Rspec","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"eomm","email":"behemoth89@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.1.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.8.0","dependencies":{"fastify-plugin":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"pg":"^8.11.3","tap":"^18.7.1","tsd":"^0.31.1","fastify":"^5.0.0","standard":"^17.1.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"^5.4.3","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.0.1_1726908965719_0.36159532612219936","host":"s3://npm-registry-packages"}},"6.0.2":{"name":"@fastify/postgres","version":"6.0.2","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"http://delved.org","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.0.2","maintainers":[{"name":"starptech","email":"deusdustin@gmail.com"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"coopflow","email":"community@coopflow.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"allevo","email":"tomallevi@gmail.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"gurgunday","email":"hey@gurgun.day"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"fdawgs","email":"frazer.dev@icloud.com"}],"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"url":"https://github.com/fdawgs","name":"Frazer Smith","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"tsd":{"directory":"test/types"},"dist":{"shasum":"945efa8462ae3a85533b11ebfd69a504dcea7c3b","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.0.2.tgz","fileCount":27,"integrity":"sha512-b8JKy/aNcz/iKzFEe0Qwx7xkk2lmcQXxylg6jOctYCpNW/shSJZunIhMrTI3J5GQQubtMmRGXEiwfKdq5h4LNQ==","signatures":[{"sig":"MEUCIDiq4NqAuacE8rmzGtFge+Aofg9C/XuDC7n0jjL5q2lsAiEArfjfRYdRfSwqRkfzMtPaKihCGhijHC1fcxkDJlBbeV4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":67561},"main":"index.js","type":"commonjs","types":"index.d.ts","funding":[{"url":"https://github.com/sponsors/fastify","type":"github"},{"url":"https://opencollective.com/fastify","type":"opencollective"}],"gitHead":"8c6e22795198e68ec0b9536fa59c5700484165d8","scripts":{"lint":"eslint","test":"npm run test:unit && npm run test:typescript","lint:fix":"eslint --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:11-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"c8 --100 node --test","test:report":"standard && c8 --reporter html node --test","check-examples":"tsc --build examples/typescript/*","test:typescript":"tsd"},"_npmUser":{"name":"fdawgs","email":"frazer.dev@icloud.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"10.8.2","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"20.18.1","dependencies":{"fastify-plugin":"^5.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","pg":"^8.11.3","tsd":"^0.31.1","fastify":"^5.0.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"~5.7.2","neostandard":"^0.12.0","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.0.2_1736582534585_0.22280703455981277","host":"s3://npm-registry-packages-npm-production"}},"6.1.0":{"name":"@fastify/postgres","version":"6.1.0","keywords":["fastify","postgres","postgresql","database","connection","sql"],"author":{"url":"https://delvedor.dev","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","_id":"@fastify/postgres@6.1.0","maintainers":[{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"delvedor","email":"tommydelved@gmail.com"},{"name":"matteo.collina","email":"hello@matteocollina.com"},{"name":"jsumners","email":"james.sumners@gmail.com"},{"name":"zekth","email":"vince.legoff@gmail.com"},{"name":"eomm","email":"behemoth89@gmail.com"},{"name":"fox1t","email":"maksim@sinik.it"},{"name":"airhorns","email":"harry@harry.me"},{"name":"kibertoad","email":"iselwin@gmail.com"},{"name":"climba03003","email":"kaka@kakawebsitedemo.com"},{"name":"galvez","email":"jonasgalvez@gmail.com"},{"name":"simenb","email":"sbekkhus91@gmail.com"},{"name":"gurgunday","email":"hey@gurgun.day"},{"name":"tony133","email":"a.tripodi133@gmail.com"},{"name":"metcoder95","email":"me@metcoder.dev"},{"name":"jean-michelet","email":"jean.antoine.michelet@gmail.com"},{"name":"ilteoood","email":"matteopietro.dazzi@gmail.com"},{"name":"fdawgs","email":"frazer.dev@icloud.com"}],"contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"url":"https://github.com/fdawgs","name":"Frazer Smith","email":"frazer.dev@icloud.com"}],"homepage":"https://github.com/fastify/fastify-postgres#readme","bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"dist":{"shasum":"b76e505092116cc9ff4b7b62caeb3ef9fe3ad187","tarball":"https://registry.npmjs.org/@fastify/postgres/-/postgres-6.1.0.tgz","fileCount":26,"integrity":"sha512-TN/pd+VXwotrpbxcBGERJ4JrwwqPCE4T63NmR2+Pue5McMeiVITMAmhExLhLLfEAGJ83M/AhiQrbh3/lrd+NTg==","signatures":[{"sig":"MEUCICjWPHzq7jgOB/yVt9yKvFcaH+OttBBM5DHpJedfuSgcAiEApq7IJIFzgHhMmMtfj7zYApTPVKCMjPn80FW7u45iXLM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69150},"main":"index.js","type":"commonjs","types":"index.d.ts","funding":[{"url":"https://github.com/sponsors/fastify","type":"github"},{"url":"https://opencollective.com/fastify","type":"opencollective"}],"gitHead":"e70528985dc79cfc19ba211872b4023ba890f245","scripts":{"lint":"eslint","test":"npm run test:unit && npm run test:typescript","lint:fix":"eslint --fix","postgres":"docker run -p 5432:5432 --name fastify-postgres -e POSTGRES_PASSWORD=postgres -d postgres:18-alpine","load-data":"docker exec -it fastify-postgres psql -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);' -U postgres -d postgres","test:unit":"c8 --100 node --test","test:report":"standard && c8 --reporter html node --test","check-examples":"tsc --build examples/typescript/*","test:typescript":"tstyche"},"_npmUser":{"name":"eomm","email":"behemoth89@gmail.com"},"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"_npmVersion":"11.11.0","description":"Fastify PostgreSQL connection plugin","directories":{},"_nodeVersion":"24.14.1","dependencies":{"fastify-plugin":"^6.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^11.0.0","pg":"^8.11.3","fastify":"^5.0.0","tstyche":"^7.0.0","@types/pg":"^8.11.4","pg-native":"^3.0.1","typescript":"~6.0.2","neostandard":"^0.13.0","@tsconfig/node10":"^1.0.9"},"peerDependencies":{"pg":">=6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/postgres_6.1.0_1783523263329_0.08099624496285873","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2022-04-27T15:00:13.711Z","modified":"2026-09-04T11:16:47.782Z","4.0.0":"2022-04-27T15:00:13.941Z","4.0.1":"2022-05-12T14:18:40.251Z","5.0.0":"2022-05-13T15:11:13.859Z","5.1.0":"2022-08-16T07:43:39.288Z","5.2.0":"2022-12-05T09:38:02.776Z","5.2.1":"2023-10-18T16:46:37.957Z","5.2.2":"2023-10-22T05:45:09.845Z","6.0.0-pre.fv5.1":"2024-06-29T10:26:45.099Z","6.0.0-pre.fv5.2":"2024-08-07T16:28:51.691Z","6.0.0":"2024-09-06T15:23:29.595Z","6.0.1":"2024-09-21T08:56:05.966Z","6.0.2":"2025-01-11T08:02:14.775Z","6.1.0":"2026-07-08T15:07:43.532Z"},"bugs":{"url":"https://github.com/fastify/fastify-postgres/issues"},"author":{"url":"https://delvedor.dev","name":"Tomas Della Vedova - @delvedor"},"license":"MIT","homepage":"https://github.com/fastify/fastify-postgres#readme","keywords":["fastify","postgres","postgresql","database","connection","sql"],"repository":{"url":"git+https://github.com/fastify/fastify-postgres.git","type":"git"},"description":"Fastify PostgreSQL connection plugin","contributors":[{"name":"Matteo Collina","email":"hello@matteocollina.com"},{"name":"Manuel Spigolon","email":"behemoth89@gmail.com"},{"name":"Aras Abbasi","email":"aras.abbasi@gmail.com"},{"url":"https://github.com/fdawgs","name":"Frazer Smith","email":"frazer.dev@icloud.com"}],"maintainers":[{"email":"hello@matteocollina.com","name":"matteo.collina"},{"email":"behemoth89@gmail.com","name":"eomm"},{"email":"iselwin@gmail.com","name":"kibertoad"},{"email":"kaka@kakawebsitedemo.com","name":"climba03003"},{"email":"hey@gurgun.day","name":"gurgunday"},{"email":"a.tripodi133@gmail.com","name":"tony133"},{"email":"me@metcoder.dev","name":"metcoder95"},{"email":"frazer.dev@icloud.com","name":"fdawgs"}],"readme":"# @fastify/postgres\n\n[![CI](https://github.com/fastify/fastify-postgres/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/fastify/fastify-postgres/actions/workflows/ci.yml)\n[![NPM version](https://img.shields.io/npm/v/@fastify/postgres.svg?style=flat)](https://www.npmjs.com/package/@fastify/postgres)\n[![neostandard javascript style](https://img.shields.io/badge/code_style-neostandard-brightgreen?style=flat)](https://github.com/neostandard/neostandard)\n\nFastify PostgreSQL connection plugin; with this, you can share the same PostgreSQL connection pool in every part of your server.\nUnder the hood [node-postgres](https://github.com/brianc/node-postgres) is used, and the options that you pass to `register` will be passed to the PostgreSQL pool builder.\n\n## Install\n\n```\nnpm i pg @fastify/postgres\n```\n\n### Compatibility\n\n| Plugin version | Fastify version |\n| ---------------|-----------------|\n| `>=6.x`        | `^5.x`          |\n| `^5.x`         | `^4.x`          |\n| `>=3.x <5.x`   | `^3.x`          |\n| `>=1.x <3.x`   | `^2.x`          |\n| `>=1.x <3.x`   | `^1.x`          |\n\nPlease note that if a Fastify version is out of support, then so are the corresponding versions of this plugin\nin the table above.\nSee [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details.\n\n## Usage\n\nAdd it to your project with `register` and you are done!\nThis plugin will add the `pg` namespace to your Fastify instance, with the following properties:\n\n```\nconnect: the function to get a connection from the pool\npool: the pool instance\nClient: a client constructor for a single query\nquery: a utility to perform a query _without_ a transaction\ntransact: a utility to perform multiple queries _with_ a transaction\n```\n\nExample:\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres'\n})\n\nfastify.get('/user/:id', (req, reply) => {\n  fastify.pg.connect(onConnect)\n\n  function onConnect (err, client, release) {\n    if (err) return reply.send(err)\n\n    client.query(\n      'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n      function onResult (err, result) {\n        release()\n        reply.send(err || result)\n      }\n    )\n  }\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\nAsync await is supported as well!\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres'\n})\n\nfastify.get('/user/:id', async (req, reply) => {\n  const client = await fastify.pg.connect()\n  try {\n    const { rows } = await client.query(\n      'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n    )\n    // Note: avoid doing expensive computation here, this will block releasing the client\n    return rows\n  } finally {\n    // Release the client immediately after query resolves, or upon error\n    client.release()\n  }\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\nUse of `pg.query`\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres'\n})\n\nfastify.get('/user/:id', (req, reply) => {\n  fastify.pg.query(\n    'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n    function onResult (err, result) {\n      reply.send(err || result)\n    }\n  )\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\nUse of `pg.transact`\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres'\n})\n\nfastify.post('/user/:username', (req, reply) => {\n  // will return a promise, fastify will send the result automatically\n  return fastify.pg.transact(async client => {\n    // will resolve to an id, or reject with an error\n    const id = await client.query('INSERT INTO users(username) VALUES($1) RETURNING id', [req.params.username])\n\n    // potentially do something with id\n\n    return id\n  })\n})\n\n/* or with a transaction callback\n\nfastify.pg.transact(client => {\n    return client.query('INSERT INTO users(username) VALUES($1) RETURNING id', [req.params.username])\n  },\n  function onResult (err, result) {\n    reply.send(err || result)\n  }\n})\n\n*/\n\n/* or with a commit callback\n\nfastify.pg.transact((client, commit) => {\n  client.query('INSERT INTO users(username) VALUES($1) RETURNING id', [req.params.username], (err, id) => {\n    commit(err, id)\n  });\n})\n\n*/\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\nAs you can see there is no need to close the client since it is done internally. Promises and async await are supported as well.\n\n### Name option\n\nIf you need to have multiple databases set up, then you can name each one of them by passing `name: 'foo'`. It will then be accessible as `fastify.pg.foo`.\nYou can use both unnamed and named postgres connections at once. There can be only one unnamed connection, and it will be accessible as `fastify.pg`.\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres',\n  name: 'foo'\n})\n\nfastify.get('/user/:id', (req, reply) => {\n  fastify.pg.foo.query(\n    'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n    function onResult (err, result) {\n      reply.send(err || result)\n    }\n  )\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\n### Native option\n\nIf you want maximum performance you can install [pg-native](https://github.com/brianc/node-pg-native), and pass `native: true` to the plugin options.\n*Note: it requires PostgreSQL client libraries & tools installed, see [instructions](https://github.com/brianc/node-pg-native#install).*\nNote: trying to use native options without successful installation of `pg-native` will return a warning and fallback to the regular `pg` module.\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres',\n  native: true\n})\n\nfastify.get('/user/:id', (req, reply) => {\n  fastify.pg.query(\n    'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n    function onResult (err, result) {\n      reply.send(err || result)\n    }\n  )\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\n### `pg` option\n\nIf you want to provide your own `pg` module, for example, to support packages like [`pg-range`](https://www.npmjs.com/package/pg-range), you can provide an optional `pg` option with the patched library to use:\n\n```js\nconst fastify = require('fastify')()\nconst pg = require(\"pg\");\nrequire(\"pg-range\").install(pg)\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://postgres@localhost/postgres',\n  pg: pg\n})\n\nfastify.get('/user/:id', (req, reply) => {\n  fastify.pg.query(\n    'SELECT id, username, hash, salt FROM users WHERE id=$1', [req.params.id],\n    function onResult (err, result) {\n      reply.send(err || result)\n    }\n  )\n})\n\nfastify.listen({ port: 3000 }, err => {\n  if (err) throw err\n  console.log(`server listening on ${fastify.server.address().port}`)\n})\n```\n\n### SSL/TLS Usage\n\nThis plugin does not implement SSL itself: any option you pass to `register` (including `ssl`) is forwarded as-is to `pg`'s `Pool`/`Client` constructor, so any SSL configuration supported by [node-postgres](https://node-postgres.com/features/ssl) works here too.\n\nThere are two ways to enable SSL:\n\n**1. Via the `ssl` option object**\n\nUseful when you need to disable certificate validation (e.g. connecting to a database with a self-signed certificate, such as on Heroku) or provide certs/keys directly.\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: process.env.DATABASE_URL,\n  ssl: {\n    rejectUnauthorized: false\n  }\n})\n```\n\n**2. Via SSL parameters in the connection string**\n\nYou can also enable SSL by adding parameters such as `sslmode`, `sslrootcert`, `sslcert` and `sslkey` directly to the connection string:\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('@fastify/postgres'), {\n  connectionString: 'postgres://username:password@host:port/databasename?sslmode=verify-full&sslrootcert=yourrootcert&sslcert=yourclientcertificate&sslkey=yourclientkey'\n})\n```\n\n> **Warning:** do not mix the two approaches. If the connection string contains any of `sslmode`, `sslcert`, `sslkey` or `sslrootcert`, those values take precedence over anything set in the `ssl` option object, and the `ssl` option will effectively be ignored. Pick one approach (either the `ssl` object, or SSL parameters in the connection string) and stick to it.\n\n### Transact route option\n\nIt is possible to automatically wrap a route handler in a transaction by using the `transact` option when registering a route with Fastify. Note that the option must be scoped within a `pg` options object to take effect.\n\n`query` commands can then be accessed at `request.pg` or `request.pg[name]` and `transact` can be set for either the root pg client with value `true` or for a pg client at a particular namespace with value `name`. Note that the namespace needs to be set when registering the plugin in order to be available on the request object.\n\n```js\n// transact set for the route pg client\nfastify.get('/user/:id', { pg: { transact: true } }, (req, reply) => {\n  // transaction wrapped queries, NO error handling\n  req.pg.query('SELECT username FROM users WHERE id=1')\n  req.pg.query('SELECT username FROM users WHERE id=2')\n  req.pg.query('SELECT username FROM users WHERE id=3')\n})\n\n// transact set for a pg client at name\nfastify.get('/user/:id', { pg: { transact: 'foo' } }, (req, reply) => {\n  // transaction wrapped queries, NO error handling\n  req.pg.foo.query('SELECT username FROM users WHERE id=1')\n  req.pg.foo.query('SELECT username FROM users WHERE id=2')\n  req.pg.foo.query('SELECT username FROM users WHERE id=3')\n})\n```\n\nImportant: rolling back a transaction relies on the handler failing and being caught by an `onError` hook. This means that the transaction wrapped route handler must not catch any errors internally.\n\nIn the plugin this works by using the `preHandler` hook to open the transaction, then the `onError` and `onSend` hooks to commit or rollback and release the client back to the pool.\n\n## TypeScript Usage\n\nInstall the compiler and typings for pg module:\n\n```shell script\nnpm i -D typescript @types/pg\n```\n\nMore examples in the [examples/typescript](./examples/typescript) directory.\n\n## Development and Testing\n\n### Docker approach\n\nFirst, start postgres with:\n\n```sh\nnpm run postgres\n```\n\nThen you can, in another terminal, find the running docker, init the DB, then run the tests:\n\n```sh\n$ docker ps\nCONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                    NAMES\n28341f85c4cd        postgres:9.6-alpine   \"docker-entrypoint.s…\"   3 minutes ago       Up 3 minutes        0.0.0.0:5432->5432/tcp   jovial_shockley\n\n$ docker exec -ti jovial_shockley /usr/local/bin/psql -d postgres -U postgres  -c 'CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);'\nCREATE TABLE\n\n$ npm test\n```\n\n### Custom Postgres approach\n\n1. Set up a database of your choice in a postgres server of your choice\n2. Create the required table using\n\n    ```sql\n    CREATE TABLE users(id serial PRIMARY KEY, username VARCHAR (50) NOT NULL);\n    ```\n\n3. Specify a connection string to it in a `DATABASE_TEST_URL` environment variable when you run the tests\n\n    ```bash\n    DATABASE_TEST_URL=\"postgres://username:password@localhost/something_thats_a_test_database\" npm test\n    ```\n\n## Acknowledgments\n\nThis project is kindly sponsored by:\n- [nearForm](https://nearform.com)\n\nPast sponsors:\n- LetzDoIt\n\n## License\n\nLicensed under [MIT](./LICENSE).\n","readmeFilename":"README.md"}