sqlx VS pg-to-ts

Compare sqlx vs pg-to-ts and see what are their differences.

sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)

pg-to-ts

Generate TypeScript interface definitions from your Postgres schema (by danvk)
Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
sqlx pg-to-ts
144 2
11,742 86
4.0% -
9.2 3.3
7 days ago 5 months ago
Rust TypeScript
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

sqlx

Posts with mentions or reviews of sqlx. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-09.

pg-to-ts

Posts with mentions or reviews of pg-to-ts. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-16.
  • ADVICE WANTED - Typescript PostgreSQL without ORM
    7 projects | /r/typescript | 16 Oct 2022
    I have so far found: - kanel https://github.com/kristiandupont/kanel - and pg-to-ts https://github.com/danvk/pg-to-ts
  • Postgres to TypeScript Interfaces and Enums
    13 projects | news.ycombinator.com | 20 Jun 2021
    There are many forks of schemats out there that add various features. Here’s mine: https://github.com/danvk/pg-to-ts

    It copies Postgres comments over to JSDoc/TSDoc comments, emits some data about foreign key relationships and supports TS types for json/jsonb columns via @type comments. Feel free to copy any of those feature if you think they’re good ideas :)

What are some alternatives?

When comparing sqlx and pg-to-ts you can also consider the following projects:

diesel - A safe, extensible ORM and Query Builder for Rust

kanel - Generate Typescript types from Postgres

sea-orm - 🐚 An async & dynamic ORM for Rust

pgtyped - pgTyped - Typesafe SQL in TypeScript

tokio - A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

mfsqlchecker - Statically validate correctness of all your SQL queries. TypeScript, PostgreSQL

rust-postgres - Native PostgreSQL driver for the Rust programming language

squabble - An extensible linter for SQL queries and migrations.

rbatis - Rust Compile Time ORM robustness,async, pure Rust Dynamic SQL

slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.

actix-web - Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

kysely-codegen - Generate Kysely type definitions from your database.