qmetrics.net

SQLx

Async Rust SQL toolkit with compile-time query checks

DatabasesDesktop/CLI app

SQLx is a Rust crate for async database access with optional compile-time SQL validation. It supports PostgreSQL, MySQL, MariaDB, and SQLite without requiring a query DSL.

Overview

SQLx is an async, pure Rust SQL library aimed at applications that want direct SQL strings rather than an ORM-style API. It can verify queries at compile time through macros that check SQL against a development database, while still accepting any syntax the database understands.

The crate is database-agnostic across PostgreSQL, MySQL, MariaDB, and SQLite, with drivers largely written in Rust. It works with common async runtimes and TLS backends, includes connection pooling, streams rows asynchronously, and prepares and caches statements when using the high-level query API.

Applications can run prepared or simple queries, map rows into domain types, and use macros such as query! for typed anonymous records or query_as! for named output types. Migrations can be embedded at compile time, and offline mode caches analysis so builds do not always need a live database.

SQLx explicitly states it is not an ORM: it does not offer a Rust query builder DSL. For teams comparing approaches, the project points readers to separate ecosystem resources for asynchronous ORMs.

Key features

  • Async await database access
  • Compile-time checked query macros
  • PostgreSQL, MySQL, MariaDB, SQLite
  • Built-in connection pooling
  • Runtime choice for tokio or async-std
  • TLS support for networked databases
  • Embedded migrations and offline compile mode
  • PostgreSQL LISTEN and NOTIFY support

Use cases

  • Rust services needing async SQL access
  • Compile-time SQL validation in CI
  • Multi-database Rust codebases
  • Streaming large query result sets

Tags

Similar software

Supabase

Open-source Postgres platform with auth, APIs, and storage

Supabase bundles a dedicated Postgres database with authentication, auto-generated REST and GraphQL APIs, realtime, functions, file storage, and vector tooling.

★ 115.6k⟳ todayApache-2.0
Open Source Alternative to:FirebaseFirebase Realtime Database

Prometheus

Open-source metrics monitoring and time series database

Prometheus collects metrics from configured targets, evaluates rules, and can raise alerts. It stores time series data and exposes a query language called PromQL.

★ 67.9k⟳ yesterdayApache-2.0
Open Source Alternative to:PRTG Network Monitor

NocoDB

Self-hostable no-code database with spreadsheet interface

NocoDB turns Postgres, MySQL, SQLite, or a hosted database into editable tables with grid, kanban, form, gallery, and calendar views. Teams collaborate with roles, sharing, REST APIs, and workflow integrations.

★ 65.6k⟳ todaySource-available
DatabasesSelf-hostable

etcd

Raft-backed distributed consistent key-value store

etcd stores small critical configuration and coordination data for clusters. It exposes a gRPC API, tolerates failures via Raft, and ships with the etcdctl command-line client.

★ 52.7k⟳ 3 days agoApache-2.0
DatabasesSelf-hostable

DBeaver

Universal multi-platform database tool and SQL client

Free desktop client for developers and DBAs with SQL editing, data editing, ER diagrams, exports, and support for hundreds of JDBC or ODBC databases.

★ 52.6k⟳ todayApache-2.0
DatabasesDesktop/CLI app
Open Source Alternative to:DataGripNavicat+2

ClickHouse

Column-oriented real-time analytics database management system

ClickHouse is a column-oriented database for generating analytical reports in real time using SQL on large datasets.

★ 51.2k⟳ todayApache-2.0
Open Source Alternative to:Amazon Redshift