A type-safe SQL parser and builder for Rust with compile-time validation and SQL injection prevention.
- Type-Safe SQL Building: Invalid SQL constructs are caught at compile time using the typestate pattern
- SQL Injection Prevention: All user input is automatically parameterized
- Hand-Written Parser: Recursive descent parser with Pratt expression parsing
- SQLite Extensions: SQLite-specific syntax like UPSERT
Add to your Cargo.toml:
[dependencies]
oxide-sql-core = "0.1"
oxide-sql-sqlite = "0.1" # Optional, for SQLite-specific featuresSee the API reference for complete examples with compile-time validation. Key modules:
oxide_sql_core::builder-- type-safe and dynamic query buildersoxide_sql_core::builder::typed-- compile-time column validation with#[derive(Table)]oxide_sql_sqlite::builder-- SQLite-specific extensions (UPSERT)
- oxide-sql-core: Core parser and type-safe builders
- oxide-sql-sqlite: SQLite-specific extensions
- oxide-sql-derive: Derive macros for type-safe tables
Looking for ORM, admin interface, authentication, forms, routing, and migrations? See Corrode, a Django-like web framework for Rust built on oxide-sql.
make build # Build the project
make test # Run tests
make lint # Run clippy
make format # Format code
make doc-dev # Run documentation dev serverMIT