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 "keys" methods for the JOIN side of things have been renamed to
"onKeys", added "useKeys" for the FROM side of things (referencing a
primary key).

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

Refactored unit tests where ON KEYS was expected.
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 onKeys(...) methods.

Change-Id: I6da78c7518b15c3893939afe3fb4877dd3dcd375


COMMENTS

author: Estrella Humphrey
date: 2015-04-14 14:43:15.713000000

Uploaded patch set 3.

-------------------------------------
author: Estrella Humphrey
date: 2015-04-14 14:43:35.727000000

Patch Set 3: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2015-04-14 15:02:25.141000000

Patch Set 3: Code-Review+2

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

Change has been successfully cherry-picked as 34f11dfa1b38d81c1ccbc42d279b3f22db233dcb

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