PgTyped logo

PgTyped

Typesafe SQL in TypeScript and Postgres
2
10
+ 1
0

What is PgTyped?

It makes it possible to use raw SQL in TypeScript with guaranteed type-safety. No need to map or translate your DB schema to TypeScript, it automatically generates types and interfaces for your SQL queries by using your running Postgres database as the source of type information.
PgTyped is a tool in the Database Tools category of a tech stack.
PgTyped is an open source tool with 3K GitHub stars and 99 GitHub forks. Here’s a link to PgTyped's open source repository on GitHub

Who uses PgTyped?

PgTyped Integrations

PgTyped's Features

  • Automatically generates TS types for parameters/results of SQL queries of any complexity
  • Supports extracting and typing queries from both SQL and TS files
  • Generate query types as you write them, using watch mode
  • Useful parameter interpolation helpers for arrays and objects
  • No need to define your DB schema in TypeScript, your running DB is the live source of type data
  • 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

PgTyped Alternatives & Comparisons

What are some alternatives to PgTyped?
MySQL
The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.
PostgreSQL
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.
MongoDB
MongoDB stores data in JSON-like documents that can vary in structure, offering a dynamic, flexible schema. MongoDB was also designed for high availability and scalability, with built-in replication and auto-sharding.
Redis
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams.
Amazon S3
Amazon Simple Storage Service provides a fully redundant data storage infrastructure for storing and retrieving any amount of data, at any time, from anywhere on the web
See all alternatives

PgTyped's Followers
10 developers follow PgTyped to keep up with related blogs and decisions.