Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

getView() and getViews()

2 replies [Last post]
  • Login or register to post comments
Fri, 02/08/2013 - 10:32
TimMeade
Offline
Joined: 01/27/2013
Groups: None

Greetings all,

We are testing Couchbase 2.0 and are very impressed, but very very new to this. So please be a little patient please!

Using java libraries with ColdFusion actually.

Gets and sets are working great, so we are pretty sure we are getting the client properly.

We have written some views and via html seem to be working properly also.

BUT; using the beerView = myClient.getViews('beer') from the sample data, returns nothing at all. No errors, just beerView is not even defined. Same when trying to get a particular view.

Looking at the methods in myClient and getView() and getViews are both there.

Am I missing something very simple here?

Much thanks.

Tim

Top
  • Login or register to post comments
Sat, 02/09/2013 - 19:10
mikew
Offline
Joined: 03/14/2011
Groups:

Can you tell me which version of the client your using and also post the code that is causing the issue?

Top
  • Login or register to post comments
Tue, 02/12/2013 - 08:09
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello,

Take a look to this sample code:
https://github.com/couchbaselabs/DeveloperDay/blob/master/Java/basic-ope...

                View view = cb.getView("brewery", "by_name");
                Query query = new Query();
                query.setLimit(10);
 
                ViewResponse viewResponse = cb.query(view, query);
                for (ViewRow row : viewResponse) {
                    System.out.println(row.getKey());
                }

You should use the client.getView()

I am surprised that you see a getViews() in your client API, the only place I see a getViews is part of the designDocument API

Regards

__________________

Tug
@tgrall

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker