Skip to main content

PgTyped

Typesafe SQL in TypeScript

[object Object]

Typesafety

Pgtyped generates TS types for parameters and results of SQL queries of any complexity.

[object Object]

Parse SQL and TS files

Queries can be written in SQL files together with useful parameter annotations. In Typescript files, queries can be defined using a sql template string literal.

[object Object]

Prevent SQL injections

PgTyped prevents SQL injections by separately sending queries and parameters to the DB for execution. This allows parameter substitution to be safely done by the PostgreSQL server