Skip to content

garrensmith/mango_smoothie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mango Smoothie Build Status

A CouchDB Mango/Cloudant query client for rust. It supports creating indexes, listing indexes and querying indexes

For (docs)[http://garrensmith.com/mango_smoothie/]

extern crate mango_smoothie;
use mango_smoothie::database;
#[macro_use]
extern crate serde_json;


let query_resp = db.query_index(json!({
                "selector": {
                    "diet": {
                        "$eq": "omnivore"
                    }
                },
                "fields": ["_id", "_rev", "name", "class", "diet"]
             }));

  let result = query_resp.unwrap();
  let doc = &result.docs[0];
  assert_eq!(doc["class"], "mammal");

License

Mango Smoothie is licensed under MIT. See the LICENSE file for more