vibesql-executor

Crates.iovibesql-executor
lib.rsvibesql-executor
version0.1.4
created_at2025-12-04 05:05:26.587858+00
updated_at2026-01-19 06:51:23.676414+00
descriptionQuery execution engine for vibesql SQL database
homepage
repositoryhttps://github.com/rjwalters/vibesql
max_upload_size
id1965907
size11,187,462
Robb Walters (rjwalters)

documentation

README

vibesql-executor

SQL query execution engine for VibeSQL database.

Overview

This crate provides the query execution engine that processes SQL statements against the storage layer. It includes query optimization, expression evaluation, and execution of DDL, DML, and query operations.

Features

  • Query Execution: SELECT with joins, aggregates, window functions, CTEs
  • DDL Operations: CREATE, ALTER, DROP for all database objects
  • DML Operations: INSERT, UPDATE, DELETE with constraint validation
  • Expression Evaluation: Full SQL expression support with type coercion
  • Query Optimization: Join reordering, predicate pushdown, subquery optimization
  • Query Plan Cache: LRU cache for compiled query plans
  • Common Subexpression Elimination: Automatic CSE for repeated expressions
  • Transaction Support: BEGIN, COMMIT, ROLLBACK, SAVEPOINT
  • Constraint Validation: PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK
  • Triggers: BEFORE/AFTER INSERT/UPDATE/DELETE triggers
  • Access Control: GRANT/REVOKE privilege checking
  • Advanced Objects: Functions, procedures, sequences, domains

Usage

Add this to your Cargo.toml:

[dependencies]
vibesql-executor = "0.1"

Basic example:

use vibesql_executor::QueryExecutor;
use vibesql_storage::Database;
use vibesql_catalog::Catalog;

// Create database and executor
let catalog = Catalog::new();
let mut db = Database::new(catalog, Default::default());
let mut executor = QueryExecutor::new(&mut db);

// Execute a query
let result = executor.execute("SELECT * FROM users WHERE age > 18")?;

// Process results
for row in result.rows {
    println!("{:?}", row);
}

Documentation

License

This project is licensed under either of:

at your option.

Commit count: 3672

cargo fmt