{"repo":"adelsz/pgtyped","free":true,"listed":false,"github":"https://github.com/adelsz/pgtyped","clone":"git clone https://github.com/adelsz/pgtyped.git","description":"pgTyped - Typesafe SQL in TypeScript","language":"TypeScript","stars":3277,"topics":["postgres","typescript","query","generator","types","postgresql","sql","type-safety"],"license":"MIT","category":"databases-storage","readme_excerpt":"PgTyped PgTyped makes it possible to use raw SQL in TypeScript with guaranteed type-safety. No need to map or translate your DB schema to TypeScript, PgTyped automatically generates types and interfaces for your SQL queries by using your running Postgres database as the source of type information. --- Features: 1. Automatically generates TS types for parameters/results of SQL queries of any complexity. 2. Supports extracting and typing queries from both SQL and TS files. 3. Generate query types as you write them, using watch mode. 4. Useful parameter interpolation helpers for arrays and objects. 5. No need to define your DB schema in TypeScript, your running DB is the live source of type data. 6. Prevents SQL injections by not doing explicit parameter substitution. Instead, queries and parameters are sent separately to the DB driver, allowing parameter substitution to be safely done by the PostgreSQL server. 7. Native ESM support. Runtime dependencies are also provided as CommonJS. Documentation Visit our documentation page at https://pgtyped.dev/ Getting started 1. npm install -D @pgtyped/cli typescript (typescript is a required peer dependency for pgtyped) 2. npm install @pgtyped/runtime ( @pgtyped/runtime is the only required runtime dependency of pgtyped) 3. Create a PgTyped config.json file. 4. Run npx pgtyped -w -c config.json to start PgTyped in watch mode. More info on getting started can be found in the Getting Started page. You can also refer to the example app for ","default_branch":null,"files":null,"tree":[],"storefront":"/r/adelsz","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/adelsz/pgtyped/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."}