Skip to content

An extensible Groonga query builder and generator for Rust.

License

Notifications You must be signed in to change notification settings

cosmo0920/ruroonga_command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruroonga Command

Build Status Build status

Documentation

An extensible Groonga Query Builder for Rust.

ruroonga_command provides extensible Groonga command query builder and generator. It reduces runtime errors about Groonga queries.

Usage

Add following lines to your Cargo.toml:

[dependencies]
ruroonga_command = "~0.3.0"

and following lines to your crate root:

extern crate ruroonga_command;

A complete example

For generating CLI Groonga command

extern crate ruroonga_command as ruroonga;

use ruroonga::dsl::*;
use ruroonga::commandable::Commandable;

fn select_cli_example() {
    let select = select("Entries".to_string())
                 .filter("content @ \"fast\"".to_string()).to_command();
    println!("command: {:?}", select);
}
fn main() {
    select_cli_example();
}

For generating HTTP Groonga command

extern crate ruroonga_command as ruroonga;

use ruroonga::dsl::*;
use ruroonga::queryable::Queryable;

fn select_query_example() {
    let select = select("Entries".to_string())
                 .filter("content @ \"fast\"".to_string()).to_query();
    println!("query: {:?}", select);
}
fn main() {
    select_query_example();
}

Target Rust Version

1.15.1 or later.

Minimum required Groonga Version

6.0.3 or later.

LICENSE

MIT.

About

An extensible Groonga query builder and generator for Rust.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published