Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: a0e7828b90
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (18 sloc) 0.595 kB
module Couchup
module Commands
class View
def run(*params)
rows = MapReduce.reduce(*params)
ap "Found #{rows.size} item(s)"
ap rows
rows
end
def self.describe(params = nil)
{:description => "Executes the given View. Runs Map and Reduce and retuns the results",
:usage => "view <view_name> [options]",
:examples => ["view 'Riders/top_ten'", "view 'Riders/top_ten', [10,100,200]", "view 'Riders/top_ten', 10", "view 'Riders/top_ten', {:group_level=>2, :group=> true}"]
}
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.