SQL transpiler for PostgreSQL

Validates queries, generates typesafe multiplatform client code

Release the development resources

There is no need to develop, maintain or test the DB layer of your app. It can be automated.

Increase the reliability of your applications

Most DB-compatiblity bugs become impossible. The generated code is guaranteed to match your schema.

Version-control your migrations and your queries together

Keep your queries together with the schema migrations. Use pGenie to ensure that they are always compatible.

How it works

Migration

Specify Schema

Using schema migration files in SQL

Queries

Specify Queries

In SQL as well

Generated Code

Generate SDKs

By running the pGenie CLI app

Try out the demo

Get a quick feel of pGenie by playing with our demonstration project.

Status and pricing

pGenie is in public beta. All features are available for free until it goes out of beta. Free tier will remain afterwards.

What pGenie can do

Schema migrations validation

Quickly ensure that the schema migration scripts that you provide won't cause any errors.

Queries validation

As quickly ensure that the queries won't cause any compatibility errors.

Client SDKs generation

Generate client libraries for Haskell and Java. These libraries provide high-level typesafe APIs specialised to your DB. Type-mapping, parameterisation, result decoding, query execution and not only - are all solved for you and are hidden under the hood of easy to use APIs.

Advanced datatypes support

Generate code that easily integrates with composites, enums and arrays. That bit is only provided for Haskell for now.

What's coming

Stored procedures support

Generation of code that integrates with stored procedures and functions.

GitHub Actions

Specialized GitHub actions for continuous deployment of the generated code. For instance, for publishing the generated packages into your private Maven repository.

Support for more languages

The ultimate goal is to support all languages that can interact with Postgres.

Early compatibility issues detection

Via checks of schema-compatibility at connection time. Instead of waiting for an incompatible query to get triggered by a user, it's possible to detect incompatibilities at the initialisation phase of your app. This will allow to make it a continuous deployment stage, ensuring that versions of your app that are incompatible with your DB do not get deployed. This can become a major boost in the reliability of your app.

API service generation

Generation of binary executables of servers that run REST or gRPC applications. Support for standards like OpenAPI.

Query performance-checking

Avoid Seq Scan with index configuration validation.

Optimization suggestions

When all queries are known it's possible to resolve which indices are lacking.

Documentation hosting

Accurate, up-to-date documentation generation.

Mocking DB hosting

A freshly instantiated mocking DB might come in handy for testing and development.

Deep query analysis

Simulations on generated data helping fine-grained performance tuning.

DSLs support

Modern alternatives to SQL arise. E.g., Prql. pGenie can be extended to support such formats alongside SQL.

Keep informed

Stay up to date with our latest developments by subscribing to our Twitter feed.

Install pGenie

Precompiled distros are available for the following platforms:

Place the downloaded binary in any location listed in the PATH env variable. E.g., /usr/local/bin.

If your platform is not available, you can build from source. Check out the instructions.

Check out the demo for an exhaustive explanation on how to use pGenie.