A tiny Groonga client via HTTP written by Rust language.
Rust
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
src
.gitignore
.travis.yml
Cargo.toml
LICENSE
README.md
appveyor.yml

README.md

Ruroonga Client

Build Status Build status

Documentation

A tiny Groonga client mainly via HTTP written by Rust language.

GQTP protocol support is experimental for now.

Usage

Add following lines to your Cargo.toml:

[dependencies]
ruroonga_client = "~0.5.0"

and following lines to your crate root:

extern crate ruroonga_client;

use ruroonga_client as groonga;

Using GQTP protocol

If you want to use GQTP module, please specify the dependency as follows for now:

[dependencies.ruroonga_client]
version = "~0.5.0"
features = ["gqtp"]

Example

extern crate ruroonga_client as groonga;

use groonga::builtin::command_query::CommandQuery;


fn main() {
    let mut request = groonga::HTTPRequest::new();
    let mut command = CommandQuery::new("select");
    command.set_argument(vec![("table", "Sites")]);
    let uri_base = groonga::URIBase::new().build();
    let url = groonga::RequestURI::new(uri_base, command.encode()).url();
    println!("url: {}", url);
    let res = request.get(url);
    let result = request.receive(&mut res.unwrap()).unwrap();
    println!("result: {}", result);
}

Testing

Execute cargo test.

LICENSE

MIT.