https://github.com/cosmo0920/ruroonga_command
An extensible Groonga query builder and generator for Rust.
https://github.com/cosmo0920/ruroonga_command
groonga rust
Last synced: about 1 month ago
JSON representation
An extensible Groonga query builder and generator for Rust.
- Host: GitHub
- URL: https://github.com/cosmo0920/ruroonga_command
- Owner: cosmo0920
- License: mit
- Created: 2016-02-27T12:48:17.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-22T09:15:17.000Z (almost 8 years ago)
- Last Synced: 2025-02-02T08:32:01.730Z (10 months ago)
- Topics: groonga, rust
- Language: Rust
- Homepage:
- Size: 2.47 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ruroonga Command
===
[](https://travis-ci.org/cosmo0920/ruroonga_command)
[](https://crates.io/crates/ruroonga_command)
[](https://ci.appveyor.com/project/cosmo0920/ruroonga-command/branch/master)
[Documentation](http://cosmo0920.github.io/ruroonga_command/ruroonga_command/index.html)
## 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:
```toml
[dependencies]
ruroonga_command = "~0.3.0"
```
and following lines to your crate root:
```rust,ignore
extern crate ruroonga_command;
```
### A complete example
#### For generating CLI Groonga command
```rust
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
```rust
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](LICENSE).