RepoPilot

launchbadge / sqlx

Search launchbadge/sqlx

GitHub

Code

How launchbadge/sqlx is laid out, and where to start for common changes.

There is no import map for this report yet.

Where to start reading

  1. Repository root
  2. Repository root
  3. Likely public API
  4. Likely public API
  5. Suggested starting pointAI
  6. Suggested starting pointAI
  7. Suggested starting pointAI
  8. Suggested starting pointAI

Find files for a task

AI

Add a new database backend (e.g., Oracle)

  • Create new workspace member in Cargo.toml under members array with structure sqlx-{database}
  • Implement Database trait and connection handler in sqlx-{database}/src/connection/mod.rs
  • Implement establish.rs for connection handshake specific to the database protocol
  • Implement executor.rs for query dispatching and result parsing

Support a new SQL data type across all backends

  • Define type mapping in each backend's column.rs (e.g. sqlx-postgres/src/column.rs)
  • Implement Decode trait in sqlx-macros-core/src/derives/decode.rs for deserialization
  • Implement Encode trait in sqlx-macros-core/src/derives/encode.rs for binding
  • Add type converter logic in sqlx-macros-core/src/common.rs for macro expansion

Add a new CLI migration or database management command

  • Define command enum variant and argument struct in sqlx-cli/src/opt.rs
  • Implement command handler as new file in sqlx-cli/src/ (e.g. verify.rs)
  • Route command dispatch in sqlx-cli/src/bin/sqlx.rs main match statement
  • Add database abstraction calls in sqlx-cli/src/database.rs if modifying database state

Add compile-time query validation for a new macro

  • Define macro function signature in sqlx-macros/src/lib.rs
  • Implement macro expansion logic in sqlx-macros-core/src/derives/mod.rs
  • Add database metadata introspection in sqlx-macros-core/src/common.rs to fetch schema
  • Add macro invocation tests in benches/ or sqlx-test/src/ with offline metadata .sqlx files

Change the public API

Add or update tests

Change build or automation

RepoPilot lists up to 500 files, so a file missing here may still exist.

  • Files marked “likely” are guessed from their names.

Code quality and hotspots

Largest source files

  • Branch points23 per file on average
  • Code issues0 errors, 14 warnings
  • Largest file1,845 lines
  • Hotspot load0 high-risk files

Static checks on the 15 largest source files.

Tests, CI and tooling

  • CIGitHub Actions3 workflows
  • Tests191 test filesRust test · 0.48 test files per source file (file count, not coverage)
  • Dependency updatesNo config detected

Test folders: sqlx-cli/tests/migrations_reversible · examples/postgres/axum-social-with-tests/tests · sqlx-cli/tests/assets

Hotspots

Files that change often and branch heavily, highest first. Branch points count if, loop, case, catch, ternary, && and || in the file.