DESCRIPTION

JCBC-136: Add support for spatial view queries.

This changeset adds support for spatial view queries and implements
appropriate test cases to prove their usage and behavior. This is a
possible API break because the ViewRow interface has changed a bit
and one now has to cast the documents inside the iteration when
he wants to access the Key or the Value (since geo views have
bbox and geometry values instead).

Change-Id: I17f147e73fbec83fd9f54d28a1ba41e38a3acde1


COMMENTS

author: Natasha Sullivan
date: 2012-11-06 13:50:45.084000000

Patch Set 1:

This is a working first implementation on spatial view queries. See the ViewTests for some examples.

-------------------------------------
author: Ayla Reynolds
date: 2012-11-06 14:10:35.111000000

Patch Set 1: I would prefer that you didn't submit this

(5 inline comments)

See inline comments.

Line:56, src/main/java/com/couchbase/client/protocol/views/ViewRowReduced.java -> This should xxx@xxx.xxx if I was wrong with my comment on the ViewRow interface.

Line:71, src/main/java/com/couchbase/client/protocol/views/ViewRowWithDocsSpatial.java -> Not sure, but I think should be getValue() instead of getDocument() as the Spatial View returns a value and not the full document (btw: "include_docs" is not supported at the moment).

From the tests it looks like you use getDocument to get the value. So it might be the right thing to do.

Line:54, src/main/java/com/couchbase/client/protocol/views/Paginator.java -> Spatial Views support skip and limit. Not sure if you intended not to implement pagination.

Line:59, src/main/java/com/couchbase/client/protocol/views/ViewRowWithDocs.java -> This should xxx@xxx.xxx if I was wrong with my comment on the ViewRow interface.

Line:33, src/main/java/com/couchbase/client/protocol/views/ViewRow.java -> Spatial Views also contain a value, but a bbox instead of a key. I thin you meant to remove the getKey() from the interface, rather then the getValue.

-------------------------------------
author: Kenny Maynard
date: 2012-11-06 18:45:39.127000000

Patch Set 1: (1 inline comment)



Line:32, src/main/java/com/couchbase/client/protocol/views/View.java -> Matt,

In the past we decided not to add comments for private member variables or functions unless the variable name unless they were needed to help code readability. We need to decide whether or not we want to comment all member variables or stick with the old scheme.

-------------------------------------
author: Andreas Short
date: 2012-11-07 06:08:10.424000000

Patch Set 1: (1 inline comment)



Line:32, src/main/java/com/couchbase/client/protocol/views/View.java -> I agree.  They're not needed here since the variable names generally describe things.

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