Tools to generate type safe code models from Postgres schema?

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • 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.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • 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