2 unstable releases
Uses old Rust 2015
0.2.0 | Sep 26, 2016 |
---|---|
0.1.0 | Sep 22, 2016 |
#6 in #groonga
54KB
1.5K
SLoC
Ruroonga Expr
A Groonga Expr Builder for Rust.
ruroonga_expr provides Groonga expression builder and generator for query syntax. It reduces runtime errors about Groonga expression.
Usage
Add following lines to your Cargo.toml:
[dependencies]
ruroonga_expr = "~0.1.0"
and following lines to your crate root:
extern crate ruroonga_expr;
example
extern crate ruroonga_expr as expr;
use expr::dsl::*;
fn main() {
let lexpr = fulltext_expr("Rust").column("language").prepare().unwrap();
let rexpr = fulltext_expr("Haskell").column("language").prepare().unwrap();
let comb_lexpr = greater_equal_expr("n_likes", "10").prepare();
let result = (comb_lexpr % (lexpr + rexpr)).build();
println!("{}", result);
// #=> 'n_likes:>=10 (language:@Rust + language:@Haskell)'
}
Target Rust Version
1.11.0 or later.
Minimum required Groonga Version
6.0.3 or later.
LICENSE
MIT.
Dependencies
~1.5MB
~49K SLoC