wardenclyffe 0.1.1

A tiny Rust query engine that supports SQL-like filters, CSV scanning, projections, and a custom DSL powered by Pest.
Documentation
use clap::Parser;
use wardenclyffe::executor::execute;

#[derive(Parser)]
struct Args {
    #[arg(short = 'p', long)]
    file: String,

    #[arg(short = 'f', long)]
    filter: Option<String>,

    #[arg(short = 's', long)]
    select: Option<String>,
}

fn main() {
    let args: Args = Args::parse();

    let selects: Vec<&str> = args
        .select
        .as_deref()
        .unwrap_or("*")
        .split(',')
        .map(|x| x.trim())
        .collect();

    execute(&args.file, args.filter.as_deref(), selects);
}