// COMPOSABLE BACKEND TOOLING FOR RUST

TYPE-SAFE QUERIES.RUST-NATIVE.

OxideR Query is a type-safe, multi-dialect SQL query builder for Rust, inspired by Java's QueryDSL. Compose queries from typed primitives, let the compiler reject invalid ones, and render predictable SQL for PostgreSQL, MySQL or SQLite.

◆ v0.2.2 latest release§ MIT license⬡ crates.io coming soon
Compile-timeType safety
ArchitectureTyped AST
DialectsPG · MySQL · SQLite
OxideR Query Q mark
OXIDE + RUSTFORGED FOR BACKENDS
user_query.rsRUST
use oxider_query::prelude::*;

let rendered = User::query()
    .select((User::id, User::name))
    .filter(
        User::name.contains("nguyen")
            .and(User::age.ge(18))
    )
    .order_by(User::id.desc())
    .limit(20)
    .to_sql(&Postgres)?;

// SELECT "users"."id", "users"."name" FROM "users"
// WHERE "users"."name" LIKE $1 ESCAPE '!' AND "users"."age" >= $2
// ORDER BY "users"."id" DESC LIMIT 20

Type-Safe by Design

Catch incompatible expressions while compiling.

Composable

Build complex queries from reusable predicates.

Zero-Cost Mindset

Keep abstractions explicit and runtime overhead lean.

Database Focused

Render safe SQL with bound parameters.

Rust-Native DX

Traits, generics and macros shaped around Rust.

// WHY OXIDER QUERY

SQL SHOULD STAY VISIBLE.
INVALID QUERIES SHOULDN'T.

The goal is not to hide relational databases behind magic. OxideR Query gives database code a typed vocabulary, while keeping the generated SQL understandable and debuggable.

01

Expressions know their types

String operations belong to strings. Numeric comparisons belong to numeric columns.

02

Queries compose from primitives

Filters, ordering, joins and projections should be reusable instead of string-built.

03

The database remains a first-class concept

SQL rendering and bind parameters remain explicit parts of the architecture.

// LET THE COMPILER HELP

MAKE ILLEGAL EXPRESSIONS
HARD TO REPRESENT.

VALID typed expression
// Column<User, i32>
User::age.ge(18)

// Column<User, String>
User::name.contains("oxide")

The operation matches the column's capabilities.

COMPILE ERROR incompatible expression
// name is a String, not an integer
User::name.eq(123)

// Department is not in this query's scope
User::query().filter(Department::name.eq("AI"))

Rejected by the compiler, before it reaches a database.

// FROM DOMAIN TO DATABASE

A SMALL, TYPED CORE.
CLEAR RESPONSIBILITIES.

01

Domain Entity

Derive typed metadata from Rust structs.

→
02

Expressions

Columns, predicates, projection and ordering.

→
03

Typed AST

Composable query state independent from raw strings.

→
04

SQL Backend

PostgreSQL, MySQL and SQLite rendering with safe parameter binding.

// PART OF THE OXIDER ECOSYSTEM

ONE BACKEND TOOLKIT.
COMPOSABLE PIECES.

OxideR Query is the first module and the only one released today. The other modules are ideas, not commitments: each would be a focused Rust backend primitive adopted independently.

OxideR QueryType-safe query DSL
V0.2.2
OxideR DIDependency injection
IDEA
OxideR WebWeb primitives
IDEA
OxideR RPCTyped service communication
IDEA
OxideR CacheCaching primitives
IDEA
OxideR TestBackend testing tools
IDEA
// ROADMAP

SHIP THE USEFUL CORE.
GROW FROM REAL USE.

PHASE 01SHIPPED

Typed Query Core

Entity derive, typed columns and operators, every join, CTEs, window functions, subqueries and full DML, rendered for PostgreSQL, MySQL and SQLite.

PHASE 02SHIPPED

Execution & Codegen

Optional sqlx execution, typed projections, pagination, streaming, decimal/uuid/json values, and schema codegen for PostgreSQL and SQLite.

PHASE 03NEXT

Closing the Gaps

PostgreSQL arrays, codegen for MySQL, and English documentation (the guide is currently written in Vietnamese).

PHASE 04LATER

Release & Ecosystem

Publish to crates.io. More dialects and other OxideR modules only when real users ask for them.

// BUILT IN PUBLIC

BUILT BY THE COMMUNITY.
FOR THE COMMUNITY.

OxideR is an open-source Rust project focused on backend ergonomics. Contributors can help shape API design, macros, SQL rendering, documentation, examples and the long-term ecosystem.

RustDatabasesProc MacrosAPI DesignDocsExamples
Rust-inspired oxidized crab mascot
// OXIDER QUERY

TYPE-SAFE QUERIES.
RUST-NATIVE BY DESIGN.

Star the RepositoryMIT licensed · Open source