Getting Started | Oxide SQL

This guide will help you get started with Oxide SQL, a type-safe SQL parser and builder for Rust.

[dependencies]
oxide-sql-core = "0.1"
oxide-sql-derive = "0.1" # For derive macros
oxide-sql-sqlite = "0.1" # Optional, for SQLite-specific features

The simplest way to use Oxide SQL is with the string-based builder. See the builder module rustdoc for examples.

For compile-time validation of column names, use the derive macro. See the typed builder module rustdoc for examples.

Oxide SQL automatically parameterizes all user input. Even malicious input is safely parameterized -- the SQL structure is fixed at compile time and user input can never modify the query structure.

The typestate pattern ensures that invalid SQL cannot be constructed. For example, a SELECT without a FROM clause will not compile.