#query-parser #mpd #query #parser #regex

mpd-filters

A simple mpd query parser library for Rust

11 unstable releases (3 breaking)

new 0.4.6 Jan 6, 2025
0.4.5 Jan 6, 2025
0.3.0 Jan 4, 2025
0.2.1 Jan 4, 2025
0.1.0 Jan 3, 2025

#12 in #mpd

Download history 838/week @ 2025-01-01

838 downloads per month

MIT license

23KB
537 lines

mpd-filters

ci downloads crates

A simple mpd query parser for Rust.

Usage

let mut parser = Parser::new("Album == '10 Summers' AND Artist == 'DJ Mustard'");
match parser.parse() {
  Ok(expr) => println!("Parsed expression: {:?}\n sql: {:?}", expr, expr.to_sql(SqlOptions::default())),
  Err(e) => panic!("Error parsing: {}", e),
}

Dependencies

~2.2–3MB
~54K SLoC