TYPEDSQL

Fully type-safe raw SQL

TypedSQL is the best way to express the full power of SQL in queries.
Fully type-safe, with auto-completion, and a fantastic DX for using raw SQL with Prisma.

End-to-end type-safety

All TypedSQL queries have typed inputs and outputs preventing errors related to incorrect types and improving DX. Any type mismatches can be caught right away, while type-safety significantly improves ergonomics while developing.

Learn more about type-safety with TypedSQL

Full control of SQL

When you need the full control of the SQL engine, write and execute raw SQL queries directly. This gives you the flexibility to use advanced SQL-specific features and optimizations that are not available in the Prisma Client API, while maintaining type safety.

Write queries using TypedSQL

Great DX

TypedSQL combines the productivity of a higher-level abstraction with type-safety for crafting SQL directly.

Use familiar SQL tools in your editor, complete with syntax highlighting, error checking, and autocompletion. Benefit from intelligent suggestions, and seamlessly switch between the Prisma Client API and SQL.

See TypedSQL in action

Expand your capabilities

Built on Prisma Client, TypedSQL pairs well with all Prisma products and features.

Works alongside Prisma Schema & Migrate

TypedSQL complements Prisma Schema and Prisma Migrate. It extends the functionality you’re already used to with type-safe SQL queries.

Use with Prisma Accelerate & Optimize

Continue using SQL queries while benefiting from products built for Prisma Client, such as connection pooling provided by Accelerate and insightful query metrics and recommendations with Optimize.

Raw SQL with type-safety and autocompletion

TypedSQL gives you even more flexibility and control in your database queries. Start using TypedSQL in any new or existing Prisma project.