Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.6.x

Membase Exception handling

1 reply [Last post]
  • Login or register to post comments
Thu, 01/13/2011 - 23:39
Sushant_Chavan
Sushant_Chavan's picture
Offline
Joined: 12/28/2010
Groups: None

Hi all,

 

Challenge 1:

Is there  a way to genrate a exception if the data/object is not stored in the database. When a user signs up on my website. His object is created and this object gets stored in the dB.

I need to check if the user sign up has been done successfully !!!!

(Using Silverlight & C#)

Challenge 2:

If there 50 users then there will be 50 objects in the db. How do I fetch object based on one property of the user. Like "get all the users whose age is > 24".

I am talking about something like a SQL query.

Love & Peace

Sushant

sushantchavan111@gmail.com

__________________

Sushant Chavan
☎ +91 9916325743
☎ +91 9920229852
✉ sushantchavan111@gmail.com 

Top
  • Login or register to post comments
Fri, 01/14/2011 - 15:35
perry
Offline
Joined: 10/11/2010
Groups:

 Hi Sushant, happy to help here.

 

For the first challenge, if you make a request for the item and it does not exist in the database, Membase will return a "NULL".  There is also an API call in the Enyim client called "TryGet" which will return 0 instead of NULL if the item doesn't exist for cases where you need a non-nullable data type like an integer or boolean.

 

For the second, the ability to query and index is a feature that we are currently working on for an upcoming release.  It will be built upon our TAP interface which you could use today to achieve the same results.  Take a look at this wiki page: http://wiki.membase.org/display/membase/TAP+Protocol as well as this blog entry (http://blog.membase.com/libmembase-c-interface-to-membase).  That will let you stream all the data out of the Membase server (either from an external server or locally on the same system) and then you can write some logic to return only the items "whose age is > 24".

Make sense?  We'll be doing essentially the same thing with a more robust and user-friendly interface on it.

 

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

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