incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: Custom view parameters???
Date Wed, 14 Jul 2010 06:26:53 GMT

On Jul 13, 2010, at 11:21 PM, Steven.Prentice@nextgen.net wrote:

> ok so I have found out that they are getting past as options from java 
> using jcouchDB, am I on the right track?
> 
> 

you are getting there. I'd suggest goofing around in Futon before you start hacking from Java.

if you have a smaller database (1000 docs or less) it can be pretty fast to play with temp_views.

http://localhost:5984/_utils/index.html

Create a database, then select View: Temp View from the menu on the database page.

Then you can enter your javascript views directly.

Once you have it working, you can see how it runs queries using firebug (or the couch log),
and copy the urls to your browser directly to play with parameters.

Chris

> 
> 
> From:
> Robert Newson <robert.newson@gmail.com>
> To:
> user@couchdb.apache.org
> Date:
> 14/07/2010 03:38 PM
> Subject:
> Re: Custom view parameters???
> 
> 
> 
> I believe the wiki page lists all the standard view parameters and
> there are no others, and no facility to add custom ones.
> 
> However, you can fake some simple things using the _rewrite code. I
> think it's powerful enough to map your 'fromDate=' to 'startkey=', for
> example. More complicated transformations would, I think, need
> client-side Javascript or a server-side patch.
> 
> B.
> 
> On Wed, Jul 14, 2010 at 1:29 AM,  <Steven.Prentice@nextgen.net> wrote:
>> Yes, I realise this. perhaps you would like to re-read my question?
>> 
>> 
>> 
>> 
>> From:
>> Robert Newson <robert.newson@gmail.com>
>> To:
>> user@couchdb.apache.org
>> Date:
>> 14/07/2010 03:26 PM
>> Subject:
>> Re: Custom view parameters???
>> 
>> 
>> 
>> The full set of view querying options are documented here;
>> 
>> http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options
>> 
>> HTH,
>> B.
>> 
>> On Wed, Jul 14, 2010 at 1:19 AM,  <Steven.Prentice@nextgen.net> wrote:
>>> HI I am working on a couchDB database that has a view called
>>> search_with_criteria (pretty self explanatory) anyway this has
>>> functionality to add view parameters such as ?fromDate and ?toDate...I
>> am
>>> just trying to work out thow this all works...are these standard view
>> API
>>> parameters? or are you able to make your own 'custom parameters' in
>>> couchDB? if so Where would you store these??
>>> 
>>> oh also I should mention that the key of this view is a date with 
> format
>>> YYYY-MM-DDThh:mm:ss
>>> 
>>> Cheers
>>> S
>>> 
>>> 
>> 
>> 
>> 
> 
> 


Mime
View raw message