DESCRIPTION

JCBC-900 Datastructures support

Motivation
----------
Provide higher level data structure support over Subdoc APIs. This aims
for a rich developer experience by ready-to-use data structures like
list, map, queue and set for creating and populating couchbase
documents.

Changes
-------
Added CouchbaseList, CouchbaseMap, CouchbaseQueue and CouchbaseSet data
structures. Synchronous and asynchronous apis are added to bucket level
interface where each operation needs underlying backing document id.
There is also a direct data structure api to continue working on a single
document which mimicks a collection except that it is asynchronous.

Change-Id: Iad27d81eeebe65ecae916227fa5df912409d4fae


COMMENTS

author: Marques Ellis
date: 2016-10-24 15:28:08.204000000

Patch Set 13: Published edit on patch set 12

-------------------------------------
author: Natasha Sullivan
date: 2016-10-24 17:21:40.925000000

Patch Set 13:

Wow, this is a big change :)

As a first step, can you please refactor all the datastructures like list, map and such into their own changeset? So we have one on the core bucket extensions and another one on the additional datastructures.

I think we have more runway on the actual datastructures and their semantics but should get the bucket API stuff in now. I'll continue with review of just the bucket level stuff on this changeset for now.

-------------------------------------
author: Natasha Sullivan
date: 2016-10-26 17:29:24.843000000

Patch Set 13:

(7 comments)

Line:100, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> does this need to be converted on the new impl?

Line:112, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> when you are doing the wrapping the other way round, does this actually need to be converted?

Line:118, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> defer is not needed, the underlying observable is already cold.

Line:121, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> int will be cast to string automatically under string concatenation

Line:169, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> defer not needed

Line:220, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> why is that separate line?

Line:528, src/main/java/com/couchbase/client/java/datastructures/CouchbaseList.java -> what if the doc is not found? also a good place for a test case

-------------------------------------
author: Natasha Sullivan
date: 2016-10-26 17:35:32.396000000

Patch Set 13:

(5 comments)

Line:129, src/main/java/com/couchbase/client/java/datastructures/CouchbaseMap.java -> Actually we have a RequestTooBigException already!

Line:137, src/main/java/com/couchbase/client/java/datastructures/CouchbaseMap.java -> not needed

Line:233, src/main/java/com/couchbase/client/java/datastructures/CouchbaseMap.java -> I guess this is not needed now on the new impl

Line:283, src/main/java/com/couchbase/client/java/datastructures/CouchbaseMap.java -> do we have a test case which checks remove if the key doesn't exist?

Line:348, src/main/java/com/couchbase/client/java/datastructures/CouchbaseMap.java -> what if the doc doesn't exist?

-------------------------------------
author: Natasha Sullivan
date: 2016-10-26 17:41:22.847000000

Patch Set 13:

(4 comments)

Line:118, src/main/java/com/couchbase/client/java/datastructures/CouchbaseSet.java -> reuse existing exception if possible

Line:215, src/main/java/com/couchbase/client/java/datastructures/CouchbaseSet.java -> what if get returns null?

Line:365, src/main/java/com/couchbase/client/java/datastructures/CouchbaseSet.java -> can we do this directly?

Line:325, src/main/java/com/couchbase/client/java/datastructures/CouchbaseQueue.java -> is it really needed to create a list just for the size? can we do a direct call?

-------------------------------------
author: Marques Ellis
date: 2016-10-26 23:25:44.127000000

Patch Set 13:

Fixed the comments in a separate patch http://review.couchbase.org/#/c/69167/. Will abandon this one as it has bucket level apis and collections like interface. We will want only the bucket api for next release.

-------------------------------------
author: Marques Ellis
date: 2016-10-26 23:25:47.919000000

Abandoned

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