DESCRIPTION

Added initial N1QL support.

Change-Id: Ib32575869b6900241c374e45d60ac2d92406db90


COMMENTS

author: Alejandro Alvarez
date: 2014-09-04 22:00:01.205000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2014-09-05 07:21:22.411000000

Patch Set 1:

Hi Scott,

thanks for getting this up to review! I have a few remarks which would be awesome if you could address them:

- The code neither Wraps the Couchbase SDK nor extends it. The main reason for this is that we have configuration management going on and to benefit from that you will probably want to reuse that in the future. Also it's convenient for the user to only use 1 object instead of 2.

- Can you please reuse the HttpFutures that we use for the view based operations as well? So the user has the same APIs at hand.

- Please do not expose the JSONObject, just return him the raw string. In the SDK we do not do any JSON handling there, so we should probably avoid that here as well and let him pick up his/her own JSON marshaller.

- Can you please add some basic error handling like 404 responses and 500reds.

- Can you add some more tests around that error handling part?

Thanks,
Michael

-------------------------------------
author: Natasha Sullivan
date: 2014-09-05 07:27:22.164000000

Patch Set 1:

Oh., in addition please don't add new dependencies instead use the one which we currently have. Ideally it's httpcore-nio that we also use for the view engine

-------------------------------------
author: Alejandro Alvarez
date: 2014-09-06 20:16:41.463000000

Patch Set 1:

Hello Michael

You want me to extend the CouchbaseClient? Is the thinking that N1QL calls and the original calls are available on the N1QL client but only the original calls are available on the couchbase client? Why not just add some N1QL specific calls to the original client? If we do not want to expose the original calls on the N1QL client then wrapping it may make more sense. Let me know how the end user should use it and I'll pick the right approach; extending vs wrapping.

I added the AsyncHTTP dependency to save time because it is more straight forward to use but I understand about not wanting to introduce more dependencies. Ditto on the Apache Commons dependency. I'll remove them.

Removing AsyncHTTP will force me to use HTTPFutures object so that'll be done.

I exposed the JSONObject as convencience, as an end user I'd like the option for both. Access to the raw string and access to a JSONObject. Why force the end user to type more if they don't want to but give them the option to if they do want to.

I'll add the error handling instead of just bubbling up the error. Is there anything we can do on catching a 500 or 404 other then letting the user handle it?

I'll add those tests as well.

Thanks
-Scott

-------------------------------------
author: Natasha Sullivan
date: 2014-09-09 18:23:14.925000000

Patch Set 1:

I think we want to wrap it and not extend it, because N1QL is and will be only experimental for the old SDK. 2.0 has it baked in anyway.

Only exposing the raw JSON string because thats how the SDK does it in other places just to be consistent. People currently need to plug in their own JSON libs anyway.

On error handling: yes you can and should fail the future with a proper status and message!

Let me know if you need more info

-------------------------------------
author: Enrique Carlson
date: 2015-04-21 18:49:30.167000000

Patch Set 1: Verified-1 Code-Review-2

This needs to be abandoned; I don't have the privs.

-------------------------------------
author: Enrique Carlson
date: 2016-03-14 19:11:39.671000000

Abandoned

This has been superseded by current public api.

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