{"repo":"porsager/postgres","free":true,"listed":false,"github":"https://github.com/porsager/postgres","clone":"git clone https://github.com/porsager/postgres.git","description":"Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare","language":"JavaScript","stars":8701,"topics":["postgresql","postgres","database","nodejs","driver","client","deno","cockroachdb"],"license":"Unlicense","category":"databases-storage","readme_excerpt":"- 🚀 Fastest full-featured node & deno client - 🏷 ES6 Tagged Template Strings at the core - 🏄‍♀️ Simple surface API - 🖊️ Dynamic query support - 💬 Chat and help on Gitter - 🐦 Follow on Twitter Getting started Installation Usage Create your sql database instance Simply import for use elsewhere ESM dynamic imports The library can be used with ESM dynamic imports as well as shown here. Table of Contents Connection Queries Building queries Advanced query methods Transactions Data Transformation Listen & notify Realtime subscribe Numbers, bigint, numeric Result Array Connection details Custom Types Teardown / Cleanup Error handling TypeScript support Reserving connections Changelog Connection postgres([url], [options]) You can use either a postgres:// url connection string or the options to define your database connection properties. Options in the object will override any present in the url. Options will fall back to the same environment variables as psql. More options can be found in the Connection details section. Queries Postgres.js utilizes Tagged template functions to process query parameters before interpolation. Using tagged template literals benefits developers by: 1. Enforcing safe query generation 2. Giving the sql function powerful utility and query building features. Any generic value will be serialized according to an inferred type, and replaced by a PostgreSQL protocol placeholder $1, $2, ... . The parameters are then sent separately to the database which handl","default_branch":null,"files":null,"tree":[],"storefront":"/r/porsager","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/porsager/postgres/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}