DESCRIPTION

Added classes to hold a view and a design document

Change-Id: I87673675c9e2a876f85c19e73ba348c31ac12448


COMMENTS

author: Kenny Maynard
date: 2012-03-22 00:27:38.473000000

Uploaded patch set 2.

-------------------------------------
author: Titus Ho
date: 2012-03-22 01:25:52.168000000

Patch Set 2: Looks good to me, approved

(1 inline comment)

thanks for this Mike!  1 comment/request inline

Line:39, lib/couchbase/document.py -> just preference.  Instead of integer indexes, why have a way to use named keys?  

self.name = json_object['view_name']
self.map_func = json_object['view_functions']['map']
...

this way it will be easier to add new attributes or remember where things are.

-------------------------------------
author: Kenny Maynard
date: 2012-03-22 02:07:51.558000000

Patch Set 2: (1 inline comment)



Line:39, lib/couchbase/document.py -> The point of this constructor is to read in a json string where we have no idea what the name of the view is. That's why I used integer indexes. If the view is not valid then an error would be thrown.

-------------------------------------
author: Titus Ho
date: 2012-03-22 02:21:41.933000000

Patch Set 2: (1 inline comment)



Line:39, lib/couchbase/document.py -> Right so I'm saying use a dict instead of array.  In the example 'view_name' is the key to look up the value, otherwise with integers I'd have to know the order in which values are stored.

Very minor anyways :)

-------------------------------------
author: Kenny Maynard
date: 2012-03-22 02:23:32.904000000

Patch Set 2: (1 inline comment)



Line:39, lib/couchbase/document.py -> Let tNathalie Landry about this tomorrow. I'm still new with python so I want to make sure I'm doing things the right way.

-------------------------------------
