DESCRIPTION

JCBC-748: join/nest key clause uses ON KEYS syntax

Motivation
----------
In N1QL, the correct syntax for a on-keys clause in a NEST or JOIN is
"ON KEYS Expression" not "KEYS Expression" as currently implemented.

Also there's a clause that uses KEYS keyword, but differently:
when referencing primary keys (document IDs), the "USE KEYS" syntax
should be used. This syntax expects strings or array of strings (not a
token).
Could be implemented as a useKeys(...) method next to the current keys
methods.

Modifications
-------------
KeysElement now takes an enum to denote the type of KEYS clause.
KeysPath keeps "keys" methods for the JOIN side of things, add "useKeys"
methods for the FROM side of things (referencing a primary key).

keys and useKeys accept an array of Strings. UseKeys with array of size
1 will only produce a String in query, not a JSON array.

Modified unit tests where USE KEYS what meant instead of ON KEYS.

Results
-------
All unit tests passing, one can now do a FROM clause on the primary key,
using useKeys(...) methods. The syntax for JOINs key-clause has been
fixed in keys(...) methods.

Change-Id: I6da78c7518b15c3893939afe3fb4877dd3dcd375


COMMENTS

author: Estrella Humphrey
date: 2015-04-13 16:52:42.646000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2015-04-13 16:54:09.629000000

Patch Set 1: Verified+1

-------------------------------------
author: Tate Garrett
date: 2015-04-14 15:22:44.500000000

Change has been successfully cherry-picked as 34f11dfa1b38d81c1ccbc42d279b3f22db233dcb

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