Tools to generate type safe code models from Postgres schema?

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/PostgreSQL

Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • Scout APM - Less time debugging, more time building
  • JetBrains - Developer Ecosystem Survey 2022
  • realworld-axum-sqlx

    A Rust implementation of the Realworld demo app spec using Axum and SQLx.

    Here's an example codebase using these features: https://github.com/launchbadge/realworld-axum-sqlx/blob/main/src/http/articles/listing.rs

  • sqlc

    Generate type-safe code from SQL

    https://github.com/kyleconroy/sqlc is pretty cool. Mainly for Go, but other languages are getting more support.

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • pgocaml

    PG'OCaml provides an interface to PostgreSQL databases for OCaml applications. It uses Camlp4 to extend the OCaml syntax, enabling one to directly embed SQL statements inside the OCaml code.

    I was looking around more and I found this OCaml library: https://github.com/darioteixeira/pgocaml

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts