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


COMMENTS

author: Estrella Humphrey
date: 2015-01-08 10:29:13.614000000

Uploaded patch set 2.

-------------------------------------
author: Estrella Humphrey
date: 2015-01-08 10:30:27.394000000

Patch Set 2: Verified+1

patch set 2 needs http://review.couchbase.org/#/c/45066/ in core, Buffers utility class having been moved to core

-------------------------------------
author: Natasha Sullivan
date: 2015-01-08 11:39:58.448000000

Patch Set 2: Code-Review+2

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