Skip to content

Type-safe SQL parser and builder for Rust with compile-time validation and SQL injection prevention

License

Notifications You must be signed in to change notification settings

LeakIX/oxide-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Oxide SQL

A type-safe SQL parser and builder for Rust with compile-time validation and SQL injection prevention.

Features

  • 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

Installation

Add to your Cargo.toml:

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

Quick Start

See the API reference for complete examples with compile-time validation. Key modules:

Crates

  • oxide-sql-core: Core parser and type-safe builders
  • oxide-sql-sqlite: SQLite-specific extensions
  • oxide-sql-derive: Derive macros for type-safe tables

Web Framework

Looking for ORM, admin interface, authentication, forms, routing, and migrations? See Corrode, a Django-like web framework for Rust built on oxide-sql.

Documentation

Development

make build          # Build the project
make test           # Run tests
make lint           # Run clippy
make format         # Format code
make doc-dev        # Run documentation dev server

License

MIT

About

Type-safe SQL parser and builder for Rust with compile-time validation and SQL injection prevention

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •