DESCRIPTION

JCBC-678: support more parameters for N1QL query

Motivation
----------
It makes sense that some request parameters from N1QL specification be
tuned by the user. Offer an API to do that for relevant parameters.

Modifications
-------------
Added QueryParams, following the Parameter Object pattern, to allow to
set various relevant query parameters for N1QL. Added consistency enum.

Added unit tests to check the produced JSON query and the coherence of
the API.

Added method on JsonObject to remove an entry from the JSON, by key.

Result
------
Users now can further tune their N1QL queries with relevant parameters.

Change-Id: If5153f86a09c351a8c3adfdac41a2493cc6e3156


COMMENTS

author: Estrella Humphrey
date: 2015-01-08 18:55:20.666000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2015-01-08 18:56:39.997000000

Patch Set 1: Verified+1

note that constructing the queries will be refactored (into factory methods?) in an upcoming change

-------------------------------------
author: Natasha Sullivan
date: 2015-01-12 08:23:08.709000000

Patch Set 1: Code-Review-1

(6 comments)

Line:121, src/main/java/com/couchbase/client/java/query/QueryParams.java -> I wonder if, on blocking ops, we should set this to the timeout provided by the user? of course we also need to provide it so async users can set it.

Line:133, src/main/java/com/couchbase/client/java/query/QueryParams.java -> please do not expose credentials just yet. There is some discussion ongoing and I want to wait until this is finalized. For now (dp4) we can tell people to work without auth.

it is very likely that we'll completely transparently handle auth.

Line:166, src/main/java/com/couchbase/client/java/query/QueryParams.java -> don't you think we should set this automatically for the user?

There is also the opaque field on key/value that we need to use again.

Line:181, src/main/java/com/couchbase/client/java/query/QueryParams.java -> please remove the AtPlus for now.. there will be a "Token" coming in the future which will expose this in a more user friendly way.

Line:219, src/main/java/com/couchbase/client/java/query/QueryParams.java -> since we then would only expose some without params, for now what about just exposing consistency(ScanConsistency)?  we can worry about adding the token once we know how it will look like

Line:24, src/main/java/com/couchbase/client/java/query/AbstractQuery.java -> ?

-------------------------------------
author: Tate Garrett
date: 2015-01-13 13:52:49.007000000

The change could not be merged due to a path conflict.

Please rebase the change locally and upload the rebased commit for review.

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