Struct sofa::Database[][src]

pub struct Database { /* fields omitted */ }

Database holds the logic of making operations on a CouchDB Database (sometimes called Collection in other NoSQL flavors such as MongoDB).

Methods

impl Database
[src]

Launches the compact process

Starts the compaction of all views

Starts the compaction of a given index

Checks if a document ID exists

Gets one document

Gets documents in bulk with provided IDs list

Gets documents in bulk with provided IDs list, with added params. Params description can be found here: Parameters description can be found here: http://docs.couchdb.org/en/latest/api/ddoc/views.html#api-ddoc-view

Gets all the documents in database

Gets all the documents in database, with applied parameters. Parameters description can be found here: http://docs.couchdb.org/en/latest/api/ddoc/views.html#api-ddoc-view

Finds a document in the database through a Mango query. Parameters here http://docs.couchdb.org/en/latest/api/database/find.html

Updates a document

Creates a document from a raw JSON document Value.

Removes a document from the database. Returns success in a bool

Inserts an index in a naive way, if it already exists, will throw an Err

Reads the database's indexes and returns them

Method to ensure an index is created on the database with the following spec. Returns true when we created a new one, or false when the index was already existing.

Trait Implementations

impl Debug for Database
[src]

Formats the value using the given formatter. Read more

impl Clone for Database
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Database

impl Sync for Database