DESCRIPTION

JCBC-938: Multi values in array mutations
(this is still an in-design part of RFC-002, subdoc API)

Motivation:
-----------
RFC-002 introduces the possibility to insert multiple values at once in
an existing array. This is the implementation of this part of the RFC.

Modifications:
--------------
A new internal type, MultiValue, is introduced to facilitate the special
encoding needed for multi-valued array mutations.

3 new specs have been added to the subdoc builders: arrayPrependAll,
arrayAppendAll and arrayInsertAll. Each of these takes a Collection of
values. A convenience alternative signature using varargs is also
offered for each (but doesn't offer the createParents parameter).

The different naming (xxxAll suffix) allows to disambiguate some edge
cases relative to varargs for the compiler. It is also close to the java
collections idiom.

Results:
--------
Multi-valued inserts are now possible in the Java subdoc API, using
either a Collection or a vararg enumeration. Tests have been adapted.

Change-Id: I2d3ab0abba64493c12a1d09bb5033155c21d9345


COMMENTS

author: Estrella Humphrey
date: 2016-03-21 14:27:24.743000000

Uploaded patch set 2.

-------------------------------------
author: Natasha Sullivan
date: 2016-03-30 06:34:37.951000000

Patch Set 2: Code-Review-1

(7 comments)

Line:283, src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java -> same comments here like in async

Line:367, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> the docs should point out that parents are not created in this method

Line:416, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> the docs should point out that parents are not created in this method

Line:443, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> maybe a quick before/after example is helpful here. like before [1, 2, 3] then insert at [2] with [4, 5, 6] how does it look afterwards

Line:466, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> maybe a quick before/after example is helpful here. like before [1, 2, 3] then insert at [2] with [4, 5, 6] how does it look afterwards

Line:472, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> the docs should point out that parents are not created in this method

Line:81, src/main/java/com/couchbase/client/java/transcoder/subdoc/JacksonFragmentTranscoder.java -> is it possible to write as bytes and then just wrap the buffer like in single? Maybe this helps avoid (uncecessary) conversion into strings

-------------------------------------
author: Estrella Humphrey
date: 2016-03-30 09:04:49.139000000

Patch Set 2:

(7 comments)

Line:283, src/main/java/com/couchbase/client/java/subdoc/MutateInBuilder.java -> Done

Line:367, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> Done

Line:416, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> Done

Line:443, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> Done

Line:466, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> Done

Line:472, src/main/java/com/couchbase/client/java/subdoc/AsyncMutateInBuilder.java -> Done

Line:81, src/main/java/com/couchbase/client/java/transcoder/subdoc/JacksonFragmentTranscoder.java -> Done

-------------------------------------
author: Tate Garrett
date: 2016-03-31 07:36:48.688000000

Change has been successfully cherry-picked as 8d6d43ca25237684491eb3842114d3ea8a3f23cc

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