DESCRIPTION

JCBC-814: Refactoring query-related code out of AsyncBucket

Motivation:
-----------
In CouchbaseAsyncBucket, the code relative to executing N1QL queries is
starting to take too much space, becoming more difficult to maintain.
Externalize all the actual implementation into a separate class.

Modifications:
--------------
Refactored private methods queryRaw and queryPrepared as well as actual
implementation for prepare into a separate class QueryExecutor.

Separated executing a prepared query and executing it with retry so both
options are available to power users.

The QueryExecutor is accessible through AsyncBucket interface.

Fixed unit tests where a PREPARE is asserted.

Environment is also accessible from Bucket.

Results
-------
Code for query execution is isolated and will be easier to find and to
maintain. Retry behavior can be implemented by the client through using
QueryExecutor.preparedQuery instead of preparedQueryWithRetry.

Unit tests and query integration tests pass.

Change-Id: I597e796769fd7ea4fb3d0052d55ad9ba2d7cbd2e


COMMENTS

author: Estrella Humphrey
date: 2015-07-22 18:23:06.173000000

Uploaded patch set 4.

-------------------------------------
author: Estrella Humphrey
date: 2015-07-22 18:23:24.343000000

Patch Set 4: Verified+1

-------------------------------------
author: Tate Garrett
date: 2015-07-23 07:30:44.917000000

Change has been successfully cherry-picked as 10cdefebba1432a46662e6107903585570c7d7a8

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