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

Recommend including total_rows value in Java Client ViewResponse class

1 reply [Last post]
  • Login or register to post comments
Tue, 02/05/2013 - 18:28
JohnSDouglass
Offline
Joined: 02/01/2013
Groups: None

Sometimes it's useful to know the total_rows value returned from a view query, but the current Java client SDK drops that value.

Looking at the SDK code, it looks pretty simple to get this value and store it as the view data is being parsed. I think it would only require:

1. A new long value in the ViewResponse class, perhaps called totalViewRows.

2. New constructors for ViewResponse, ViewResponseNoDocs, ViewResponseWithDocs, and ViewResponseReduced to include the value of totalViewRows.

3. Update parseResult in NoDocsOperationImpl.java, DocsOperationImpl.java, and ReducedOperationImpl.java to read and save total_rows.

Maybe -1 could be used for an unknown number of rows in the current constructor.

I could try to do this myself, if someone at Couchbase thinks it's worthwhile.

Top
  • Login or register to post comments
Thu, 02/07/2013 - 01:14
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello John

It is a valid request and I have created a new enhancement request in the Java SDK client project:
http://www.couchbase.com/issues/browse/JCBC-240

Do not hesitate to contribute to the SDK, it will be great to have this, if you are not familiar yet with the process here how to start:
http://www.couchbase.com/wiki/display/couchbase/Contributing+Changes

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