openpql-runner 0.1.4

A high-performance Rust implementation of Poker Query Language (PQL), enabling SQL-like queries for poker analysis and calculations. This project is a spiritual successor to the original Java implementation developed by Odds Oracle.
Documentation
use std::io;

use clap::Command;
use opql::PQLRunner;

fn build_cli() -> Command {
    Command::new("opql")
        .about("A poker query language CLI\n\n⚠️  WARNING: This project is WIP and subject to change.")
        .arg(clap::Arg::new("command")
            .long("run")
            .value_name("PQL")
            .help("run PQL and exit"))
            .arg_required_else_help(true)
}

fn main() {
    let matches = build_cli().get_matches();

    if let Some(command) = matches.get_one::<String>("command") {
        run_command(command);
    }
}

fn run_command(command: &str) {
    let _ = PQLRunner::run(command, &mut io::stdout(), &mut io::stderr());
}