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
- Repository root
- Repository root
- Likely public API
- Likely public API
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
- Suggested starting pointAI
Find files for a task
AIAdd 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.