DESCRIPTION

JVMCBC-357: Add raw N1QL querying msg that returns JSON

Motivation
----------
In some use cases, notably when developing a REST backend that could
just build N1QL queries and pass the JSON response back to a javascript
frontend, being able to perform a N1QL query and not interpret the
response but rather return is raw (JSON ByteBuf) can make sense.

Modifications:
-------------
Implemented a dedicated message for this that will just aggregate the
response body in the handler and return it. The HTTP status code and
message are also be returned. Note the new message extends the
GenericQueryRequest one.

Result
------
Users can directly query the N1QL service and get the uninterpreted
JSON response by using the RawQueryRequest message.

Change-Id: I9f96bb67da8132fa28b29e4bcfb59343f8545f32


COMMENTS

author: Estrella Humphrey
date: 2016-08-23 14:15:52.323000000

Uploaded patch set 2.

-------------------------------------
author: Estrella Humphrey
date: 2016-08-23 14:16:03.525000000

Patch Set 2: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2016-08-24 12:36:55.342000000

Patch Set 2:

(1 comment)

Line:249, src/main/java/com/couchbase/client/core/endpoint/query/QueryHandler.java -> why are we copying and are we cleaning up the original one? :)

-------------------------------------
author: Estrella Humphrey
date: 2016-08-24 12:41:51.342000000

Patch Set 2:

(1 comment)

Line:249, src/main/java/com/couchbase/client/core/endpoint/query/QueryHandler.java -> responseContent is cleared line 206 above at the beginning of processing of a new response. since the whole response must still be available to the consumer, even after the original is cleared, we copy. on the java-client side, the util class takes care of releasing that copy.

-------------------------------------
author: Natasha Sullivan
date: 2016-08-24 12:46:02.080000000

Patch Set 2: Code-Review+2

(1 comment)

Line:249, src/main/java/com/couchbase/client/core/endpoint/query/QueryHandler.java -> Done

-------------------------------------
author: Gerrit Code Review
date: 2016-08-24 13:41:45.730000000

Change has been successfully cherry-picked as 748865defba072abd15b7b428dd3c07d08d973e6 by Estrella Humphrey

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