{"_id":"@apexdesigner/loopback-connector-postgresql","_rev":"17-a36935760f98ff8e34f4fef2f3c27dd2","name":"@apexdesigner/loopback-connector-postgresql","dist-tags":{"latest":"8.0.7"},"versions":{"7.0.4":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.4","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.4","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/loopbackio/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/loopbackio/loopback-connector-postgresql/issues"},"dist":{"shasum":"5b988e3c407891f3bb73bc558797dacdfbecd14b","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.4.tgz","fileCount":25,"integrity":"sha512-h4OnFpaDgao+fNdcvwwnIK8zTyNr7GQtMKppBTOKIqw9YWIkb08cInbyK0Q0CyPzkpiYgAplTdurj1Fxapi2TA==","signatures":[{"sig":"MEYCIQDior+c9PkLATTbXAStjx2bKCQRjU6A5LXxcgZdsHQ87gIhAJpZk5+U+euQ1AIvk3Miwqcx56G3lN/VHUwbho3pGZAZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132244},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"ec296ec27cdac9076a5e6b227a8fb1a881736b0e","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/loopbackio/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.4_1711635522084_0.7516687058194469","host":"s3://npm-registry-packages"}},"7.0.5":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.5","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.5","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"c6c52d65df37492e8d14a61bf8555a41ad4c42c4","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.5.tgz","fileCount":25,"integrity":"sha512-5P10UoG1rB667njp4k2LUTos3GANbU7zj9RD9S66N5ZuRJy5si9wvLALLN6y/tpbhY/ZkCY/5d873GCdSUaiQA==","signatures":[{"sig":"MEUCIFSg5iJhcI0jSYAUJJET7VcgtvBMI/0HoSAK4tRYift6AiEA5Tbs8bo6v2+ZelZHcve3J0yw+EL6/tbgHIc1IHPwcbk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132246},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"2a3be1fd5124bc8f63c6cd139f7b615868e9bfe8","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.5_1711638015027_0.22706969686641854","host":"s3://npm-registry-packages"}},"7.0.6":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.6","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.6","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"0264512f9c98e4cb9eb70aa2bfb57d8aa5489bb0","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.6.tgz","fileCount":25,"integrity":"sha512-Uw6D0lRQ/qm2IOxQlXHRwg+ud+RWQ1aV/vFUiOg+9XWNcWLB2rrJ4TmNxHDgtu/zQbJMifYuYvRCZWW2c1/0uQ==","signatures":[{"sig":"MEUCIQDdDbRASh4s2Zisa/w9O2eR5etfWhhIO122m4E8wYq5iAIgJGyuCEsfEgyL4LVUBW42acS0EM6gdriKFT1+zgPz4EY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132283},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"9bc8c31f3e62dcebe32e26c1b1f71ac0f51433e7","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.6_1711642892763_0.21946692549555835","host":"s3://npm-registry-packages"}},"7.0.7":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.7","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.7","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"204a2a10247cb289b81adb0fe8de6b98c53849fe","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.7.tgz","fileCount":25,"integrity":"sha512-33S8b4zOzrR/AqeqC53VVp2afH2VxIe1jbfgRGYo+7YuAMYCvfCZZEeGZKYApF3Aai08zhf5/Q7PNRq3rxP8IA==","signatures":[{"sig":"MEUCIQC8CgrHyjAqaDNcFJwwEZCkAs9ZM1jp+6KdVkknQbxIyQIgay0h4XiGtBja8qSa464OzjHA/JEVWKNX5Ivh80bPi+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132474},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"00c03972a9229d7ce3c33e242047f70558f4947b","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.7_1711646363964_0.8623765485652939","host":"s3://npm-registry-packages"}},"7.0.8":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.8","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.8","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"83ffe9e95b9aa426234a62dd2f42ebe6a13ad0b7","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.8.tgz","fileCount":25,"integrity":"sha512-m7I9JpMC4zdX2voVlI14x7g8fb00nHtU4/P8aqLaUdzFa6icy3PLDhxu8i0/Gsthw9O9vJyEjaQZIY7sCuoaug==","signatures":[{"sig":"MEUCIQDrAuicTHnBbqLHYR4y2UaJ7QugsLd2dXieYPhYoTrIEAIgYvswf3kIsgWUZDWvWbvK3I88U6Au0CT9skPjltNkUKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132669},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"a93dd62ed888f2484d62d3aceef47f159aea90b1","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"10.5.0","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"21.7.2","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.0.0"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.8_1712266253196_0.8800163209456413","host":"s3://npm-registry-packages"}},"7.0.9":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.9","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.9","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"38ce975d74bc194dac591e55a6412ca9b64d8626","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.9.tgz","fileCount":25,"integrity":"sha512-gtZ7eS40gRHlpOI8dGf5CgIEvU+LYLYwlxH/s2Luc04sf96EpgFihrTPaW9GBMBShB45CofmqN820F7v9IGN7g==","signatures":[{"sig":"MEQCIA/ghUvBaLb1or+sGyipcLFUZIWyCYK9ocpX6N3pZEFKAiBusvxEQyE6+tpk9nraBYbRTluC57Mt4S8T/FLbIWgLoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132594},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"5bc395974645d77da114f32e8b93e273f52ffae1","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.1.4"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.9_1712688272227_0.23999939871323583","host":"s3://npm-registry-packages"}},"7.0.10":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.10","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.10","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"21df267ea515df48c54d14f2026f4f39fcbb8874","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.10.tgz","fileCount":25,"integrity":"sha512-UTWswxnuWyB85OcZZ2lrMzoDIZNq0odrnHQtWCx7Yu3qBcazCFk5ga1rSEPnDm7gySfnurgp9HDL92SsRkpyIQ==","signatures":[{"sig":"MEQCICAZ/WfRVaQkTNdcgMcSjt+IFctuYU/p2ZWOFM3sEHXpAiAvw2xkRVRnEg4/1YR7nLkdZIaJgHezFi/3NGs4VC+Tpw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134191},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"6feba627289e6ecf31847b371c1b4feddc34c9cd","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.1.5"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.10_1712689139837_0.43477620814625695","host":"s3://npm-registry-packages"}},"7.0.11":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.11","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.11","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"3e88034f48ee33beeaf392790c6e6627c37233ba","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.11.tgz","fileCount":25,"integrity":"sha512-rxtbVfZLjJHDw1ZLs4xVysi7yvLW3rSrSwR6AbylIm9dRHu4/3w9rBn+9QXpCW7CAzSMhJFgTtYpK4/8BDZ+ig==","signatures":[{"sig":"MEQCIEcLJkBMYHzmQ/Da2h3+W5svAAQKrZL+KFNcp+QUEQbnAiAdSu0ZRiuKuE7geAu5eIuCcXjVnEvKTG+tljWVHVZgMw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134273},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"4764e9a0bf593858bcfdc4285bf9e994cb8998bb","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"9.6.4","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"20.1.0","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.1.5"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.11_1713358984599_0.7174392794797468","host":"s3://npm-registry-packages"}},"7.0.12":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.12","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.12","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"255e8273566cdc5f666a20d6e0d6736f1f8c21e7","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.12.tgz","fileCount":25,"integrity":"sha512-6/NWzRkKLo/+VxmnJ9Dm5MNgDZWAQNSrh0VCyCVrwRhEqfP1HQ3xI/6ChEE/aQS9U7lurswAIjfhVAzncoKb5A==","signatures":[{"sig":"MEQCIClpv0WR1Q4GE1zrenFFKHZ7KwRablOvczfQ+1ac3u74AiBNp6g7z4ZIzLG3dwgHri3IcpNStYGREswNCfsfdftSQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134409},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"11a4a0e1aa37142b9c2571f95783b493b7d5671f","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"10.5.0","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"21.7.2","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.1.5"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.12_1714137920392_0.6948661755338414","host":"s3://npm-registry-packages"}},"7.0.13":{"name":"@apexdesigner/loopback-connector-postgresql","version":"7.0.13","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"author":{"name":"IBM Corp."},"license":"Artistic-2.0","_id":"@apexdesigner/loopback-connector-postgresql@7.0.13","maintainers":[{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"}],"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"dist":{"shasum":"21b76140521de379dce7ca5f45875c329fb502c0","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-7.0.13.tgz","fileCount":25,"integrity":"sha512-a7VDsw0fGs31Mi42AnHvgjx7v/nJe2PiS3ifBWar3DuSQHhDaf/0AltUSX4SLR5Iy8qU8CM8oQ1l+m0Av63AOw==","signatures":[{"sig":"MEQCIA3ymXevQhShUsIaZxpK9r/YDTDB1v00JgoX/ppoZrrPAiBJh/PK5WzaCyE5iLnSKKmHInLzBoipG7JaTDQl0jHeQQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":134483},"main":"index.js","engines":{"node":"18 || 20"},"gitHead":"e3c00c0159b44b5237b5c7f0107d725c65db511a","scripts":{"lint":"eslint .","test":"mocha test/*.test.js","pretest":"node pretest.js","posttest":"npm run lint"},"_npmUser":{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},"repository":{"url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git","type":"git"},"_npmVersion":"10.5.0","description":"Loopback PostgreSQL Connector","directories":{},"_nodeVersion":"21.7.2","dependencies":{"pg":"^8.0.2","uuid":"^9.0.0","async":"^3.2.0","chalk":"^4.0.0","debug":"^4.1.1","bluebird":"^3.4.6","strong-globalize":"^6.0.0","loopback-connector":"npm:@apexdesigner/loopback-connector@^6.1.5"},"_hasShrinkwrap":false,"devDependencies":{"rc":"^1.0.0","mocha":"^10.0.0","sinon":"^17.0.0","eslint":"^8.0.0","lodash":"^4.17.4","should":"^13.2.3","@commitlint/cli":"^19.0.0","eslint-config-loopback":"^13.1.0","loopback-datasource-juggler":"^5.0.0","@commitlint/config-conventional":"^19.0.0"},"_npmOperationalInternal":{"tmp":"tmp/loopback-connector-postgresql_7.0.13_1714141705450_0.9457813456591986","host":"s3://npm-registry-packages"}},"8.0.7":{"name":"@apexdesigner/loopback-connector-postgresql","version":"8.0.7","description":"Loopback PostgreSQL Connector","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"license":"Artistic-2.0","main":"index.js","author":{"name":"IBM Corp."},"repository":{"type":"git","url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git"},"engines":{"node":">=20"},"scripts":{"pretest":"node pretest.js","test":"mocha test/*.test.js","posttest":"npm run lint","lint":"eslint .","lint-fix":"eslint . --fix"},"dependencies":{"async":"^3.2.0","bluebird":"^3.4.6","chalk":"^5.0.0","debug":"^4.1.1","loopback-connector":"npm:@apexdesigner/loopback-connector@^7.0.0","pg":"^8.0.2","strong-globalize":"^6.0.0","uuid":"^13.0.0"},"devDependencies":{"@commitlint/cli":"^20.0.0","@commitlint/config-conventional":"^20.0.0","eslint":"^8.0.0","eslint-config-loopback":"^14.0.0","lodash":"^4.17.4","loopback-datasource-juggler":"^6.0.0","mocha":"^11.0.0","rc":"^1.0.0","rewire":"^9.0.0","should":"^13.2.3","sinon":"^21.0.0"},"gitHead":"503cf923ff5b5834fa16bef940051655cef378ac","_id":"@apexdesigner/loopback-connector-postgresql@8.0.7","bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-OZofQbLIVI3tWGXmzIKMseGpZUC78/Ntds3XhKO28Pe4ioPNLHF1Xw5uo4Q4gFh3T6YgsBEeJtnQMQndsmpSqQ==","shasum":"c44d9f68997f46e8ee0f2e9aaadb5634039b8e00","tarball":"https://registry.npmjs.org/@apexdesigner/loopback-connector-postgresql/-/loopback-connector-postgresql-8.0.7.tgz","fileCount":25,"unpackedSize":138388,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBJsBbM9YCfl7UXcWGFdg9YfAU2gvV8ed8cPNddok8yIAiB9JO0eSbTqke2uKMhE4kwqT/xUbc9wx6iDuitI2ZzNIA=="}]},"_npmUser":{"name":"dknapp47","email":"david.knapp@apexbpm.com"},"directories":{},"maintainers":[{"name":"jvolpe","email":"jim.volpe@apexbpm.com"},{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"},{"name":"nlaughton","email":"nick.laughton@apexbpm.com"},{"name":"ashishad","email":"ashish.gupta@apexbpm.com"},{"name":"kyle-apex","email":"kyle.hoskins@apexbpm.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/loopback-connector-postgresql_8.0.7_1775577541112_0.1570851868662848"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-28T14:18:41.979Z","modified":"2026-04-07T15:59:01.451Z","7.0.4":"2024-03-28T14:18:42.301Z","7.0.5":"2024-03-28T15:00:15.195Z","7.0.6":"2024-03-28T16:21:32.953Z","7.0.7":"2024-03-28T17:19:24.178Z","7.0.8":"2024-04-04T21:30:53.388Z","7.0.9":"2024-04-09T18:44:32.399Z","7.0.10":"2024-04-09T18:59:00.021Z","7.0.11":"2024-04-17T13:03:04.884Z","7.0.12":"2024-04-26T13:25:20.586Z","7.0.13":"2024-04-26T14:28:25.659Z","8.0.7":"2026-04-07T15:59:01.272Z"},"bugs":{"url":"https://github.com/apexdesigner/loopback-connector-postgresql/issues"},"author":{"name":"IBM Corp."},"license":"Artistic-2.0","homepage":"https://github.com/apexdesigner/loopback-connector-postgresql#readme","keywords":["LoopBack","PostgreSQL","DataSource","Connector"],"repository":{"type":"git","url":"git+https://github.com/apexdesigner/loopback-connector-postgresql.git"},"description":"Loopback PostgreSQL Connector","maintainers":[{"name":"jvolpe","email":"jim.volpe@apexbpm.com"},{"name":"rathreya.apex","email":"rama.athreya@apexbpm.com"},{"name":"dknapp47","email":"david.knapp@apexbpm.com"},{"name":"nlaughton","email":"nick.laughton@apexbpm.com"},{"name":"ashishad","email":"ashish.gupta@apexbpm.com"},{"name":"kyle-apex","email":"kyle.hoskins@apexbpm.com"}],"readme":"# loopback-connector-postgresql\n\n[PostgreSQL](https://www.postgresql.org/), is a popular open-source object-relational database.\nThe `loopback-connector-postgresql` module is the PostgreSQL connector for the LoopBack framework.\n\n<div class=\"gh-only\">\nThe PostgreSQL connector supports both LoopBack 3 and LoopBack 4. For more information, see\n<a href=\"https://loopback.io/doc/en/lb4/PostgreSQL-connector.html\">LoopBack 4 documentation</a>,\n<a href=\"http://loopback.io/doc/en/lb3/PostgreSQL-connector.html\">LoopBack 3 documentation</a>\nand <a href=\"#module-long-term-support-policy\">Module Long Term Support Policy</a> below.\n<br/><br/>\nNOTE: The PostgreSQL connector requires PostgreSQL 8.x or 9.x.\n</div>\n\n## Installation\n\nIn your application root directory, enter this command to install the connector:\n\n```shell\n$ npm install loopback-connector-postgresql --save\n```\n\nThis installs the module from npm and adds it as a dependency to the application's `package.json` file.\n\nIf you create a PostgreSQL data source using the data source generator as described below, you don't have to do this, since the generator will run `npm install` for you.\n\n## Creating a data source\n\nFor LoopBack 4 users, use the LoopBack 4 [Command-line interface](https://loopback.io/doc/en/lb4/Command-line-interface.html) to generate a DataSource with PostgreSQL connector to your LB4 application. Run [`lb4 datasource`](https://loopback.io/doc/en/lb4/DataSource-generator.html), it will prompt for configurations such as host, post, etc. that are required to connect to a PostgreSQL database.\n\nAfter setting it up, the configuration can be found under `src/datasources/<DataSourceName>.datasource.ts`, which would look like this:\n\n```ts\nconst config = {\n  name: 'db',\n  connector: 'postgresql',\n  url: '',\n  host:'localhost',\n  port: 5432,\n  user: 'user',\n  password: 'pass',\n  database: 'testdb',\n};\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\nUse the [Data source generator](http://loopback.io/doc/en/lb3/Data-source-generator.html) to add a PostgreSQL data source to your application.\nThe generator will prompt for the database server hostname, port, and other settings\nrequired to connect to a PostgreSQL database. It will also run the `npm install` command above for you.\n\nThe entry in the application's `/server/datasources.json` will look like this:\n\n{% include code-caption.html content=\"/server/datasources.json\" %}\n\n```javascript\n\"mydb\": {\n  \"name\": \"mydb\",\n  \"connector\": \"postgresql\"\n  \"host\": \"mydbhost\",\n  \"port\": 5432,\n  \"url\": \"postgres://admin:admin@mydbhost:5432/db1?ssl=false\",\n  \"database\": \"db1\",\n  \"password\": \"admin\",\n  \"user\": \"admin\",\n  \"ssl\": false\n}\n```\n\nEdit `datasources.json` to add other properties that enable you to connect the data source to a PostgreSQL database.\n\n</details>\n\n### Connection Pool Settings\n\nYou can also specify connection pool settings in `<DataSourceName>.datasource.ts` ( or `datasources.json` for LB3 users). For instance you can specify the minimum and the maximum pool size, and the maximum pool client's idle time before closing the client.\n\nExample of `db.datasource.ts`:\n\n```ts\nconst config = {\n  name: 'db',\n  connector: 'postgresql',\n  url: '',\n  host: 'localhost',\n  port: 5432,\n  user: 'user',\n  password: 'pass',\n  database: 'testdb',\n  min: 5,\n  max: 200,\n  idleTimeoutMillis: 60000,\n  ssl: false\n};\n```\n\nCheck out [node-pg-pool](https://github.com/brianc/node-pg-pool) and [node postgres pooling example](https://github.com/brianc/node-postgres#pooling-example) for more information.\n\n### Configuration options\n\n<table>\n  <thead>\n    <tr>\n      <th>Property</th>\n      <th>Type</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n    <tbody>\n    <tr>\n      <td>connector</td>\n      <td>String</td>\n      <td>\n        Connector name, either \"loopback-connector-postgresql\" or \"postgresql\"\n      </td>\n    </tr>\n    <tr>\n      <td>database</td>\n      <td>String</td>\n      <td>Database name</td>\n    </tr>\n    <tr>\n      <td>debug</td>\n      <td>Boolean</td>\n      <td>If true, turn on verbose mode to debug database queries and lifecycle.</td>\n    </tr>\n    <tr>\n      <td>host</td>\n      <td>String</td>\n      <td>Database host name</td>\n    </tr>\n    <tr>\n      <td>password</td>\n      <td>String</td>\n      <td>Password to connect to database</td>\n    </tr>\n    <tr>\n      <td>port</td>\n      <td>Number</td>\n      <td>Database TCP port</td>\n    </tr>\n    <tr>\n      <td>url</td>\n      <td>String</td>\n      <td>Use instead of the<code>host</code>,<code>port</code>,<code>user</code>,<code>password</code>,\n        and<code>database</code>properties. For example:'postgres://test:mypassword@localhost:5432/dev'.\n      </td>\n    </tr>\n    <tr>\n      <td>username</td>\n      <td>String</td>\n      <td>Username to connect to database</td>\n    </tr>\n    <tr>\n      <td>min</td>\n      <td>Integer</td>\n      <td>Minimum number of clients in the connection pool</td>\n    </tr>\n    <tr>\n      <td>max</td>\n      <td>Integer</td>\n      <td>Maximum number of clients in the connection pool</td>\n    </tr>\n    <tr>\n      <td>idleTimeoutMillis</td>\n      <td>Integer</td>\n      <td>Maximum time a client in the pool has to stay idle before closing it</td>\n    </tr>\n    <tr>\n      <td>ssl</td>\n      <td>Boolean</td>\n      <td>Whether to try SSL/TLS to connect to server</td>\n    </tr>\n    <tr>\n      <td>defaultIdSort</td>\n      <td>Boolean/String</td>\n      <td>Set to <code>false</code> to disable default sorting on <code>id</code> column(s). Set to <code>numericIdOnly</code> to only apply to IDs with a number type <code>id</code>.</td>\n    </tr>\n    <tr>\n      <td>allowExtendedOperators</td>\n      <td>Boolean</td>\n      <td>Set to <code>true</code> to enable PostgreSQL-specific operators\n          such as <code>contains</code>. Learn more in\n          <a href=\"#extended-operators\">Extended operators</a> below.\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n**NOTE**: By default, the 'public' schema is used for all tables.\n\nThe PostgreSQL connector uses [node-postgres](https://github.com/brianc/node-postgres) as the driver. For more\ninformation about configuration parameters, see [node-postgres documentation](https://github.com/brianc/node-postgres/wiki/Client#constructors).\n\n### Connecting to UNIX domain socket\n\nA common PostgreSQL configuration is to connect to the UNIX domain socket `/var/run/postgresql/.s.PGSQL.5432` instead of using the TCP/IP port. For example:\n\n```ts\nconst config = {\n  name: 'db',\n  connector: 'postgresql',\n  url: '',\n  host: '/var/run/postgresql/',\n  port: 5432,\n  user: 'user',\n  password: 'pass',\n  database: 'testdb',\n  debug: true\n};\n```\n\n## Defining models\n\nLoopBack allows you to specify some database settings through the model definition and/or the property definition. These definitions would be mapped to the database. Please check out the CLI [`lb4 model`](https://loopback.io/doc/en/lb4/Model-generator.html) for generating LB4 models. The following is a typical LoopBack 4 model that specifies the schema, table and column details through model definition and property definitions:\n\n```ts\n@model({\n  settings: { postgresql: { schema: 'public', table: 'inventory'} },\n})\nexport class Inventory extends Entity {\n  @property({\n    type: 'number',\n    required: true,\n    scale: 0,\n    id: 1,\n    postgresql: {\n      columnName: 'id',\n      dataType: 'integer',\n      dataLength: null,\n      dataPrecision: null,\n      dataScale: 0,\n      nullable: 'NO',\n    },\n  })\n  id: number;\n\n  @property({\n    type: 'string',\n    postgresql: {\n      columnName: 'name',\n      dataType: 'text',\n      dataLength: null,\n      dataPrecision: null,\n      dataScale: null,\n      nullable: 'YES',\n    },\n  })\n  name?: string;\n\n  @property({\n    type: 'boolean',\n    required: true,\n    postgresql: {\n      columnName: 'available',\n      dataType: 'boolean',\n      dataLength: null,\n      dataPrecision: null,\n      dataScale: null,\n      nullable: 'NO',\n    },\n  })\n  available: boolean;\n\n  constructor(data?: Partial<User>) {\n    super(data);\n  }\n}\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\nThe model definition consists of the following properties.\n\n<table>\n  <thead>\n    <tr>\n      <th>Property</th>\n      <th>Default</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>name</td>\n      <td>Camel-case of the database table name</td>\n      <td>Name of the model.</td>\n    </tr>\n    <tr>\n      <td>options</td>\n      <td>N/A</td>\n      <td>Model level operations and mapping to PostgreSQL schema/table</td>\n    </tr>\n    <tr>\n      <td>properties</td>\n      <td>N/A</td>\n      <td>Property definitions, including mapping to PostgreSQL column</td>\n    </tr>\n  </tbody>\n</table>\n\nFor example:\n\n{% include code-caption.html content=\"/common/models/model.json\" %}\n\n```javascript\n{\n  \"name\": \"Inventory\",\n  \"options\": {\n    \"idInjection\": false,\n    \"postgresql\": {\n      \"schema\": \"strongloop\",\n      \"table\": \"inventory\"\n    }\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"String\",\n      \"required\": false,\n      \"length\": 64,\n      \"precision\": null,\n      \"scale\": null,\n      \"postgresql\": {\n        \"columnName\": \"id\",\n        \"dataType\": \"character varying\",\n        \"dataLength\": 64,\n        \"dataPrecision\": null,\n        \"dataScale\": null,\n        \"nullable\": \"NO\"\n      }\n    },\n    \"productId\": {\n      \"type\": \"String\",\n      \"required\": false,\n      \"length\": 20,\n      \"precision\": null,\n      \"scale\": null,\n      \"id\": 1,\n      \"postgresql\": {\n        \"columnName\": \"product_id\",\n        \"dataType\": \"character varying\",\n        \"dataLength\": 20,\n        \"dataPrecision\": null,\n        \"dataScale\": null,\n        \"nullable\": \"YES\"\n      }\n    },\n    \"locationId\": {\n      \"type\": \"String\",\n      \"required\": false,\n      \"length\": 20,\n      \"precision\": null,\n      \"scale\": null,\n      \"id\": 1,\n      \"postgresql\": {\n        \"columnName\": \"location_id\",\n        \"dataType\": \"character varying\",\n        \"dataLength\": 20,\n        \"dataPrecision\": null,\n        \"dataScale\": null,\n        \"nullable\": \"YES\"\n      }\n    },\n    \"available\": {\n      \"type\": \"Number\",\n      \"required\": false,\n      \"length\": null,\n      \"precision\": 32,\n      \"scale\": 0,\n      \"postgresql\": {\n        \"columnName\": \"available\",\n        \"dataType\": \"integer\",\n        \"dataLength\": null,\n        \"dataPrecision\": 32,\n        \"dataScale\": 0,\n        \"nullable\": \"YES\"\n      }\n    },\n    \"total\": {\n      \"type\": \"Number\",\n      \"required\": false,\n      \"length\": null,\n      \"precision\": 32,\n      \"scale\": 0,\n      \"postgresql\": {\n        \"columnName\": \"total\",\n        \"dataType\": \"integer\",\n        \"dataLength\": null,\n        \"dataPrecision\": 32,\n        \"dataScale\": 0,\n        \"nullable\": \"YES\"\n      }\n    }\n  }\n}\n```\n\n</details>\n\nTo learn more about specifying database settings, please check the section [Data Mapping Properties](https://loopback.io/doc/en/lb4/Model.html#data-mapping-properties).\n\n## Type mapping\n\nSee [LoopBack 4 types](http://loopback.io/doc/en/lb4/LoopBack-types.html) (or [LoopBack 3 types](http://loopback.io/doc/en/lb3/LoopBack-types.html)) for\ndetails on LoopBack's data types.\n\n### LoopBack to PostgreSQL types\n\n<table>\n  <thead>\n    <tr>\n      <th width=\"450\">LoopBack Type</th>\n      <th width=\"450\">PostgreSQL Type</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>String<br>JSON<br>Text<br>Default</td>\n      <td>\n        VARCHAR2<br/>\n        Default length is 1024\n      </td>\n    </tr>\n     <tr>\n      <td>String[]</td>\n      <td>\n        VARCHAR2[]\n      </td>\n    </tr>\n    <tr>\n      <td>Number</td>\n      <td>INTEGER</td>\n    </tr>\n    <tr>\n      <td>Date</td>\n      <td>TIMESTAMP WITH TIME ZONE</td>\n    </tr>\n    <tr>\n      <td>Boolean</td>\n      <td>BOOLEAN</td>\n    </tr>\n  </tbody>\n</table>\n\nBesides the basic LoopBack types, as we introduced above, you can also specify the database type for model properties. It would be mapped to the database (see [Data Mapping Properties](https://loopback.io/doc/en/lb4/Model.html#data-mapping-properties)). For example, we would like the property `price` to have database type `double precision` in the corresponding table in the database, we have specify it as following:\n\n```ts\n  @property({\n    type: 'number',\n    postgresql: {\n      dataType: 'double precision',\n    },\n  })\n  price?: number;\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\n```javascript\n\"properties\": {\n    // ..\n    \"price\": {\n      \"type\": \"Number\",\n      \"postgresql\": {\n        \"dataType\": \"double precision\",\n      }\n    },\n```\n\n</details>\n\n{% include warning.html content=\"\nNot all database types are supported for operating CRUD operations and queries with filters. For example, type Array cannot be filtered correctly, see GitHub issues: [# 441](https://github.com/loopbackio/loopback-connector-postgresql/issues/441) and [# 342](https://github.com/loopbackio/loopback-connector-postgresql/issues/342).\n\" %}\n\n### PostgreSQL types to LoopBack\n\n<table>\n  <thead>\n    <tr>\n      <th width=\"450\">PostgreSQL Type</th>\n      <th width=\"450\">LoopBack Type</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>BOOLEAN</td>\n      <td>Boolean</td>\n    </tr>\n    <tr>\n      <td>\n        VARCHAR<br>CHARACTER VARYING<br>CHARACTER<br>CHAR<br>TEXT\n      </td>\n      <td>String</td>\n    </tr>\n    <tr>\n      <td>BYTEA</td>\n      <td>Node.js <a href=\"http://nodejs.org/api/buffer.html\">Buffer object</a></td>\n    </tr>\n    <tr>\n      <td>SMALLINT<br>INTEGER<br>BIGINT<br>DECIMAL<br>NUMERIC<br>REAL<br>DOUBLE PRECISION<br>FLOAT<br>SERIAL<br>BIGSERIAL</td>\n      <td>Number</td>\n    </tr>\n    <tr>\n      <td>DATE<br>TIMESTAMP<br>TIMESTAMP WITH TIME ZONE<br>TIMESTAMP WITHOUT TIME ZONE<br>TIME<br>TIME WITH TIME ZONE<br>TIME WITHOUT TIME ZONE</td>\n      <td>Date</td>\n    </tr>\n    <tr>\n      <td>POINT</td>\n      <td><a href=\"http://apidocs.strongloop.com/loopback-datasource-juggler/#geopoint\">GeoPoint</a></td>\n    </tr>\n  </tbody>\n</table>\n\n## Numeric Data Type\n\n**Note**: The [node.js driver for postgres](https://github.com/brianc/node-postgres) by default casts `Numeric` type as a string on `GET` operation. This is to avoid _data precision loss_ since `Numeric` types in postgres cannot be safely converted to JavaScript `Number`.\n\nFor details, see the corresponding [driver issue](https://github.com/brianc/node-pg-types/issues/28).\n\n## Querying JSON fields\n\n**Note** The fields you are querying should be setup to use the JSON postgresql data type - see Defining models\n\nAssuming a model such as this:\n\n```ts\n  @property({\n    type: 'number',\n    postgresql: {\n      dataType: 'double precision',\n    },\n  })\n  price?: number;\n```\n\nYou can query the nested fields with dot notation:\n\n```ts\nCustomerRepository.find({\n  where: {\n    address.state: 'California',\n  },\n  order: 'address.city',\n});\n```\n\n## Extended operators\n\nPostgreSQL supports the following PostgreSQL-specific operators:\n\n- [`contains`](#operator-contains)\n- [`containedBy`](#operator-containedby)\n- [`containsAny`](#operator-containsany)\n- [`match`](#operator-match)\n\nPlease note extended operators are disabled by default, you must enable\nthem at datasource level or model level by setting `allowExtendedOperators` to\n`true`.\n\n### Operator `contains`\n\nThe `contains` operator allow you to query array properties and pick only\nrows where the stored value contains all of the items specified by the query.\n\nThe operator is implemented using PostgreSQL [array operator\n`@>`](https://www.postgresql.org/docs/current/functions-array.html).\n\n**Note** The fields you are querying must be setup to use the postgresql array data type - see [Defining models](#defining-models) above.\n\nAssuming a model such as this:\n\n```ts\n@model({\n  settings: {\n    allowExtendedOperators: true,\n  }\n})\nclass Post {\n  @property({\n    type: ['string'],\n    postgresql: {\n      dataType: 'varchar[]',\n    },\n  })\n  categories?: string[];\n}\n```\n\nYou can query the tags fields as follows:\n\n```ts\nconst posts = await postRepository.find({\n  where: {\n    {\n      categories: {'contains': ['AA']},\n    }\n  }\n});\n```\n\n### Operator `containedBy`\n\nInverse of the `contains` operator, the `containedBy` operator allow you to query array properties and pick only\nrows where the all the items in the stored value are contained by the query.\n\nThe operator is implemented using PostgreSQL [array operator\n`<@`](https://www.postgresql.org/docs/current/functions-array.html).\n\n**Note** The fields you are querying must be setup to use the postgresql array data type - see [Defining models](#defining-models) above.\n\nAssuming a model such as this:\n\n```ts\n@model({\n  settings: {\n    allowExtendedOperators: true,\n  }\n})\nclass Post {\n  @property({\n    type: ['string'],\n    postgresql: {\n      dataType: 'varchar[]',\n    },\n  })\n  categories?: string[];\n}\n```\n\nYou can query the tags fields as follows:\n\n```ts\nconst posts = await postRepository.find({\n  where: {\n    {\n      categories: {'containedBy': ['AA']},\n    }\n  }\n});\n```\n\n### Operator `containsAnyOf`\n\nThe `containsAnyOf` operator allow you to query array properties and pick only\nrows where the any of the items in the stored value matches any of the items in the query.\n\nThe operator is implemented using PostgreSQL [array overlap operator\n`&&`](https://www.postgresql.org/docs/current/functions-array.html).\n\n**Note** The fields you are querying must be setup to use the postgresql array data type - see [Defining models](#defining-models) above.\n\nAssuming a model such as this:\n\n```ts\n@model({\n  settings: {\n    allowExtendedOperators: true,\n  }\n})\nclass Post {\n  @property({\n    type: ['string'],\n    postgresql: {\n      dataType: 'varchar[]',\n    },\n  })\n  categories?: string[];\n}\n```\n\nYou can query the tags fields as follows:\n\n```ts\nconst posts = await postRepository.find({\n  where: {\n    {\n      categories: {'containsAnyOf': ['AA']},\n    }\n  }\n});\n```\n\n### Operator `match`\n\nThe `match` operator allows you to perform a [full text search using the `@@` operator](https://www.postgresql.org/docs/10/textsearch-tables.html#TEXTSEARCH-TABLES-SEARCH) in PostgreSQL.\n\nAssuming a model such as this:\n```ts\n@model({\n  settings: {\n    allowExtendedOperators: true,\n  }\n})\nclass Post {\n  @property({\n    type: 'string',\n  })\n  content: string;\n}\n```\nYou can query the content field as follows:\n\n```ts\nconst posts = await postRepository.find({\n  where: {\n    {\n      content: {match: 'someString'},\n    }\n  }\n});\n```\n\n## Discovery and auto-migration\n\n### Model discovery\n\nThe PostgreSQL connector supports _model discovery_ that enables you to create LoopBack models\nbased on an existing database schema. Once you defined your datasource:\n-  LoopBack 4 users could use the commend [`lb4 discover`](https://loopback.io/doc/en/lb4/Discovering-models.html) to discover models.\n- For LB3 users, please check [Discovering models from relational databases](https://loopback.io/doc/en/lb3/Discovering-models-from-relational-databases.html).\n\n(See [database discovery API](http://apidocs.strongloop.com/loopback-datasource-juggler/#datasource-prototype-discoverandbuildmodels) for related APIs information)\n\n### Auto-migration\n\nThe PostgreSQL connector also supports _auto-migration_ that enables you to create a database schema\nfrom LoopBack models.\n\nFor example, based on the following model, the auto-migration method would create/alter existing `customer` table under `public` schema in the database. Table `customer` would have two columns: `name` and `id`, where `id` is also the primary key and has the default value `SERIAL` as it has definition of `type: 'Number'` and `generated: true`:\n\n```ts\n@model()\nexport class Customer extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true\n  })\n  id: number;\n\n  @property({\n    type: 'string'\n  })\n  name: string;\n}\n```\n\nBy default, tables generated by the auto-migration are under `public` schema and named in lowercase.\n\nBesides the basic model metadata, LoopBack allows you to specify part of the database schema definition via the\nproperty definition, which would be mapped to the database.\n\nFor example, based on the following model, after running the auto-migration script, a table named `CUSTOMER` under schema `market` will be created. Moreover, you can also have different names for your property and the corresponding column. In the example, by specifying the column name, the property `name` will be mapped to the `customer_name` column. This is useful when your database has a different naming convention than LoopBack (camelCase).\n\n```ts\n@model(\n  settings: {\n    postgresql: {schema: 'market', table: 'CUSTOMER'},\n  }\n)\nexport class Customer extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true\n  })\n  id: number;\n\n  @property({\n    type: 'string',\n    postgresql: {\n      columnName: 'customer_name'\n    }\n  })\n  name: string;\n}\n```\n\nFor how to run the script and more details:\n- For LB4 users, please check [Database Migration](https://loopback.io/doc/en/lb4/Database-migrations.html)\n- For LB3 users, please check [Creating a database schema from models](https://loopback.io/doc/en/lb3/Creating-a-database-schema-from-models.html)\n\n(See [LoopBack auto-migrate method](http://apidocs.strongloop.com/loopback-datasource-juggler/#datasource-prototype-automigrate) for related APIs information)\n\nHere are some limitations and tips:\n\n- If you defined `generated: true` in the id property, it generates integers by default. For auto-generated uuid, see [Auto-generated id property](#auto-generated-id-property)\n- Only the id property supports the auto-generation setting `generated: true` for now\n- Auto-migration doesn't create foreign key constraints by default. But they can be defined through the model definition. See [Auto-migrate with foreign keys](#auto-migrateauto-update-models-with-foreign-keys)\n- Destroying models may result in errors due to foreign key integrity. First delete any related models by calling delete on models with relationships.\n\n### Auto-migrate/Auto-update models with foreign keys\n\nForeign key constraints can be defined in the model definition.\n\n**Note**: The order of table creation is important. A referenced table must exist before creating a foreign key constraint.\n\nDefine your models and the foreign key constraints as follows:\n\n`customer.model.ts`:\n\n```ts\n@model()\nexport class Customer extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true\n  })\n  id: number;\n\n  @property({\n    type: 'string'\n  })\n  name: string;\n}\n```\n\n`order.model.ts`:\n\n```ts\n@model({\n  settings: {\n    foreignKeys: {\n      fk_order_customerId: {\n        name: 'fk_order_customerId',\n        entity: 'Customer',\n        entityKey: 'id',\n        foreignKey: 'customerId',\n        onDelete: 'CASCADE',\n        onUpdate: 'SET NULL'\n      },\n    },\n  })\nexport class Order extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true\n  })\n  id: number;\n\n  @property({\n    type: 'string'\n  })\n  name: string;\n\n  @property({\n    type: 'Number'\n  })\n  customerId: number;\n}\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\n```json\n({\n  \"name\": \"Customer\",\n  \"options\": {\n    \"idInjection\": false\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\",\n      \"id\": 1\n    },\n    \"name\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n},\n{\n  \"name\": \"Order\",\n  \"options\": {\n    \"idInjection\": false,\n    \"foreignKeys\": {\n      \"fk_order_customerId\": {\n        \"name\": \"fk_order_customerId\",\n        \"entity\": \"Customer\",\n        \"entityKey\": \"id\",\n        \"foreignKey\": \"customerId\",\n        \"onDelete\": \"CASCADE\",\n        \"onUpdate\": \"SET NULL\"\n      }\n    }\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\"\n      \"id\": 1\n    },\n    \"customerId\": {\n      \"type\": \"Number\"\n    },\n    \"description\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n})\n```\n\n</details>\n<br>\n{% include tip.html content=\"\nRemoving or updating the value of `foreignKeys` will be updated or delete or update the constraints in the db tables. If there is a reference to an object being deleted then the `DELETE` will fail. Likewise if there is a create with an invalid FK id then the `POST` will fail. The `onDelete` and `onUpdate` properties are optional and will default to `NO ACTION`.\n\" %}\n\n### Auto-generated ids\n\nAuto-migrate supports the automatic generation of property values for the id property. For PostgreSQL, the default id type is _integer_. Thus if you have `generated: true` in the id property, it generates integers by default:\n\n```ts\n{\n  id: true,\n  type: 'Number',\n  required: false,\n  generated: true // enables auto-generation\n}\n```\n\nIt is common to use UUIDs as the primary key in PostgreSQL instead of integers. You can enable it with either the following ways:\n\n- use uuid that is **generated by your LB application** by setting [`defaultFn: uuid`](https://loopback.io/doc/en/lb4/Model.html#property-decorator):\n\n\n```ts\n  @property({\n    id: true,\n    type: 'string'\n    defaultFn: 'uuid',\n    // generated: true,  -> not needed\n  })\n  id: string;\n```\n\n- use PostgreSQL built-in (extension and) uuid functions:\n\n```ts\n  @property({\n  id: true,\n  type: 'String',\n  required: false,\n  // settings below are needed\n  generated: true,\n  useDefaultIdType: false,\n  postgresql: {\n    dataType: 'uuid',\n  },\n})\n  id: string;\n```\n\nThe setting uses `uuid-ossp` extension and `uuid_generate_v4()` function as default.\n\nIf you'd like to use other extensions and functions, you can do:\n\n```ts\n  @property({\n  id: true,\n  type: 'String',\n  required: false,\n  // settings below are needed\n  generated: true,\n  useDefaultIdType: false,\n  postgresql: {\n    dataType: 'uuid',\n    extension: 'myExtension',\n    defaultFn: 'myuuid'\n  },\n})\n  id: string;\n```\n\nWARNING: It is the users' responsibility to make sure the provided extension and function are valid.\n\n## Module Long Term Support Policy\n\nThis module adopts the [Module Long Term Support (LTS)](http://github.com/CloudNativeJS/ModuleLTS) policy, with the following End Of Life (EOL) dates:\n\n| Version | Status     | Published | EOL                  |\n| ------- | ---------- | --------- | -------------------- |\n| 5.x     | Current    | Apr 2020  | Apr 2023 _(minimum)_ |\n| 3.x     | Active LTS | Mar 2017  | Apr 2022             |\n\nLearn more about our LTS plan in [docs](https://loopback.io/doc/en/contrib/Long-term-support.html).\n\n## Running tests\n\n### Own instance\n\nIf you have a local or remote PostgreSQL instance and would like to use that to run the test suite, use the following command:\n\n- Linux\n\n```bash\nPOSTGRESQL_HOST=<HOST> POSTGRESQL_PORT=<PORT> POSTGRESQL_USER=<USER> POSTGRESQL_PASSWORD=<PASSWORD> POSTGRESQL_DATABASE=<DATABASE> CI=true npm test\n```\n\n- Windows\n\n```bash\nSET POSTGRESQL_HOST=<HOST> SET POSTGRESQL_PORT=<PORT> SET POSTGRESQL_USER=<USER> SET POSTGRESQL_PASSWORD=<PASSWORD> SET POSTGRESQL_DATABASE=<DATABASE> SET CI=true npm test\n```\n\n### Docker\n\nIf you do not have a local PostgreSQL instance, you can also run the test suite with very minimal requirements.\n\n- Assuming you have [Docker](https://docs.docker.com/engine/installation/) installed, run the following script which would spawn a PostgreSQL instance on your local:\n\n```bash\nsource setup.sh <HOST> <PORT> <USER> <PASSWORD> <DATABASE>\n```\n\nwhere `<HOST>`, `<PORT>`, `<USER>`, `<PASSWORD>` and `<DATABASE>` are optional parameters. The default values are `localhost`, `5432`, `root`, `pass` and `testdb` respectively.\n\n- Run the test:\n\n```bash\nnpm test\n```\n","readmeFilename":"README.md"}