Class CouchObject::View
In: lib/couch_object/view.rb
Parent: Object
Enumerable Document StandardError HasManyAssociationError MissingView CantCompareSize DocumentNotFound BelongsToAssociationError HasOneAssociationError CouchDBError MapProcessError DatabaseSaveFailed NoDatabaseLocationSet Array HasManyRelation Response Database Server View Errors VERSION ClassMethods Persistable Utils CouchObject dot/f_3.png

Methods

create   delete   get_db   name   new   query   raw_query  

Attributes

db  [RW] 

Public Class methods

Takes:

Returns: CouchObject::Reponse object instance

Raises:

  • an exeption if it can‘t figure out the database

Takes:

Returns: new CouchObject::View instance

Raises:

  • an exeption if it can‘t figure out the database

Protected Class methods

Public Instance methods

Returns an array of the rows returned by the view

Takes:

  • [params] (hash): a hash of URL query arguments supported by couchDB. If omitted it defaults to not use a key and to update the view.

    Example:

      view.query({:update => false, :key => "bar"}) => Array
    

Returns:

  • a array of rows from the view

Raises:

Returns the response data from CouchDB for a view query without

Takes:

  • [params] (hash): a hash of URL query arguments supported by couchDB. If omitted it defaults to not use a key and to update the view.

    Example:

      view.raw_query({:update => false, :key => "bar"}) => data
    

Returns:

  • the response data for the view

Raises:

[Validate]