DESCRIPTION

JCBC-674: API for prepared statements

Motivation
----------
In N1QL dp4, prepared statements are a bit different from parametrized
statements. Executing a prepared statement requires two steps: obtain
the query plan then later on execute the query plan.

Modifications
-------------
Added classes to represent a PREPARE Statement (the one for step 1, that
allows to obtain an execution plan), and the QueryPlan itself.

PreparedQuery now uses the QueryPlan and can value parameters.

Added methods on (Async)Bucket to obtain a QueryPlan from a
PrepareStatement (step 2 is just using a PreparedQuery in the existing
method).

Refactored the various Query classes with a common base AbstractQuery,
fixed the unit tests in QueryToN1qlTest.

Added an integration test for Queries (work in progress).

Result
------
Users can now obtain a QueryPlan from a Statement and execute said plan.

Change-Id: I3b7cba7adeeaf8d7a1b32b2d87d25ec3e45f53cc
Reviewed-on: http://review.couchbase.org/45000
Tested-by: Estrella Humphrey xxx@xxx.xxx
Reviewed-by: Natasha Sullivan xxx@xxx.xxx


COMMENTS

author: Estrella Humphrey
date: 2015-01-08 11:59:31.574000000

Change has been successfully cherry-picked as 733ce5e8f60629d9070fa8bb636f56aa0e90b5d6

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