SQLx Database Code Review

•
64
•

Reviews Rust code using SQLx to ensure compile-time query safety, optimal connection pool management, and robust migration patterns.

The SQLx Code Review skill automates the inspection of Rust-based database layers built with the SQLx toolkit. It provides deep analysis of query patterns, validating the use of compile-time checked macros to prevent runtime failures and SQL injection. The skill ensures database connection pools are efficiently configured for production environments, verifies that migrations are reversible and safe, and checks that type mappings between Rust and SQL are accurate. It is specifically optimized for Rust Edition 2024, helping developers implement modern patterns like LazyLock and precise lifetime capture while maintaining high-performance database interactions.

Características Principales

01Checks type mappings between Rust structs and database column types
0264 GitHub stars
03Analyzes connection pool configuration and lifecycle management
04Ensures migration scripts follow naming conventions and safety patterns
05Verifies Rust Edition 2024 compatibility for async traits and lifetime capture
06Validates compile-time query safety and SQL injection prevention

Casos de Uso

01Reviewing complex PostgreSQL transactions and migration scripts for data integrity
02Auditing Rust codebases for database performance bottlenecks and safety leaks
03Upgrading SQLx-based projects to Rust Edition 2024 and modern async patterns