DESCRIPTION

JCBC-755: implement rest of N1QL tutorial and adapt DSL

Motivation
----------
Continuing work from JCBC-750, implementing rest of the steps from the
N1QL tutorial into SelectDslSmokeTest, and adding missing operators or
functions in the DSL along the way. Note that 3 steps make use of DML
which will be covered later.

Modifications
-------------
Added remaining steps from tutorial to smoke tests.

GroupByPath can now directly use identifiers in String form.

Modified KeyPath so that distinction between a String constant key vs an
identifier key is more explicit (constant keys: xxxKeysValues methods).

Added sum and distinct functions in AggregateFunctions.

Added DateFunctions (with strToMillis, datePartStr), NumberFunctions
(moved round there from Functions), StringFunctions (with lower and
substr).

In Expression, added x method to convert a statement, sub method to
convert a statement as a sub-statement between parenthesis, path method
to construct a path from Expressions separated with dots.
Added arithmetic operators add, subtract, multiply and divide.

Added a Case mini-DSL for case and case search expressions
(eg. CASE a.id WHEN b.subid THEN 1 ELSE 0 END).

Removed Functions class (all have been moved in xxxFunctions classes in
the functions package).

Marked various DSL classes as @Experimental xxx@xxx.xxx

Results
-------
Except for tutorial steps where DML is used, all steps are covered by
the SelectDslSmokeTest.

Change-Id: I5a71614c6d8beb6a8de0b94c086d3c68c66bf91b


COMMENTS

author: Estrella Humphrey
date: 2015-04-23 14:35:57.276000000

Uploaded patch set 2.

-------------------------------------
author: Tate Garrett
date: 2015-04-24 09:16:50.766000000

Change has been successfully cherry-picked as 0896e44936c3bb26376b5bf1cafe7efd3282a996

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