SafeQL

SafeQL

Write SQL Queries With Confidence

60 followers

SafeQL is an ESLint plugin for writing SQL queries in a type-safe way. - Automatic Type Inference & Validation - Compatible With Popular SQL Libraries - Easy To Use - Built with Monorepos & Microservices in mind
SafeQL gallery image
SafeQL gallery image
SafeQL gallery image
SafeQL gallery image
SafeQL gallery image
SafeQL gallery image
SafeQL gallery image
Free
Launch tags:Web AppDeveloper ToolsTech
Launch Team
OS Ninja
OS Ninja
Explore and Learn Open Source using AI
Promoted

What do you think? …

Varun Razora
To be honest we already wasted so many hours for fixing the SQL queries and i hope with your product it would save our time and efforts. Good luck
Eliya Cohen
@varunrazora Thanks! 🙂
vados
Note that there is some stiff competition in the space -- do you draw any inspiration from projects like pgTyped? (https://github.com/adelsz/pgtyped)
Eliya Cohen
@vados I have used pgTyped before. While they solve the same problem, they solve it differently. Personally I like my types to be as close as possible to my queries without manually naming and generating them in a different file. While some may prefer pgTyped, there are others that may prefer SafeQL's approach
vados
@eliya_cohen makes sense -- I do like your approach more than pgTyped (separate file & generation is a pain, the types that get generated are often kinda unreasonable). Would you consider making this interoperable with Slonik? Syntax and emphasis on simplicity seem to be somewhat shared between your projects!
Eliya Cohen
@vados I think it should also support Slonik (most of its parts) with a basic configuration. You're not the first one to ask me that question, so I think I'll write a compatibility guide for Slonik as well
Eliya Cohen
## Why SafeQL? There are many well known popular SQL libraries out there, such as [Prisma](https://www.prisma.io/), [Sequelize](https://sequelize.org/), [pg](https://node-postgres.com/), [postgres](https://github.com/porsager/post...). So why should I even consider SafeQL? ### It's a plugin, not an SQL library SafeQL was never meant to replace your current SQL library. Instead, It's a plugin that you can use to add extra functionality to your existing SQL library. It means that you can use SafeQL with any SQL library that you want. You can even use SafeQL with multiple SQL libraries at the same time. ## Why should I write raw queries in the first place? While using our favorite SQL library, sometimes it fails to provide the extra functionality that we need. It can be due to a missing feature, performance issue, or a complex query that is hard to write using the library's API. In these cases, the library will point you to write a raw query, and here's the point where SafeQL comes in.## Why SafeQL? There are many well known popular SQL libraries out there, such as [Prisma](https://www.prisma.io/), [Sequelize](https://sequelize.org/), [pg](https://node-postgres.com/), [postgres](https://github.com/porsager/post...). So why should I even consider SafeQL? ### It's a plugin, not an SQL library SafeQL was never meant to replace your current SQL library. Instead, It's a plugin that you can use to add extra functionality to your existing SQL library. It means that you can use SafeQL with any SQL library that you want. You can even use SafeQL with multiple SQL libraries at the same time. ## Why should I write raw queries in the first place? While using our favorite SQL library, sometimes it fails to provide the extra functionality that we need. It can be due to a missing feature, performance issue, or a complex query that is hard to write using the library's API. In these cases, the library will point you to write a raw query, and here's the point where SafeQL comes in.