Safeql Save

Validate and auto-generate TypeScript types from raw SQL queries in PostgreSQL.

Project README

SafeQL - Automatic Type Inference & Validation for PostgreSQL Queries • Get started

npm version

https://user-images.githubusercontent.com/10504365/192807716-6a4fcbc1-9dc8-4d3b-a63b-2c95c0061689.mp4

Features

  • ⚡️ Automatic Type Inference & Validation:

    SafeQL automatically infers the type of the query result based on the query itself.

  • SafeQL works with any PostgreSQL client, including Prisma, Sequelize, pg, Postgres.js, and more.

  • 🛠️ Easy To Use

    SafeQL was built in mind to be easy to use and integrate with your existing codebase.

  • 📦 Built with Monorepos & Microservices in mind:

    SafeQL was built with monorepos and microservices in mind, and it's easy to use with multiple databases.

Install

I would first recommend follow the instructions in the documentation.

npm install --save-dev @ts-safeql/eslint-plugin libpg-query

Limitations

Since libpg-query doesn't seem to support Windows, the only way to make SafeQL work on Windows is by using WSL2 (see issue).

Open Source Agenda is not affiliated with "Safeql" Project. README Source: ts-safeql/safeql
Stars
1,225
Open Issues
12
Last Commit
2 weeks ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating