Pro Couchbase Development by Deepak Vohra
Author:Deepak Vohra
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA
If the get method is invoked on key not defined in the Couchbase Server the Couchbase::Error::NotFound error is generated. To demonstrate delete the document with ID catalog2 and run the following script.
require 'rubygems'
require 'couchbase'
client = Couchbase.connect(" http://127.0.0.1:8091 ")
print client.get("catalog2")
The Couchbase::Error::NotFound error gets generated as shown in Figure 5-28.
Figure 5-28.Couchbase::Error::NotFound error
Updating a Document
The replace method may be used to replace a key-value pair. The set method may also be used to update the value of a key already in the server to a new value. The replace method has the following signature.
object.replace(key, value [, ruby-replace-options ])
The replace method returns the CAS value of the object stored as a fixed number. The method args are discussed in Table 5-3.Table 5-3.The replace method Arguments
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Access | Data Mining |
Data Modeling & Design | Data Processing |
Data Warehousing | MySQL |
Oracle | Other Databases |
Relational Databases | SQL |
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8303)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6754)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6730)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6612)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6395)
Driving Data Quality with Data Contracts by Andrew Jones(6341)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6104)
Learning SQL by Alan Beaulieu(5997)
Weapons of Math Destruction by Cathy O'Neil(5781)
Big Data Analysis with Python by Ivan Marin(5371)
Data Engineering with dbt by Roberto Zagni(4370)
Solidity Programming Essentials by Ritesh Modi(4020)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3878)
Pandas Cookbook by Theodore Petrou(3586)
Blockchain Basics by Daniel Drescher(3298)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2909)
Feature Store for Machine Learning by Jayanth Kumar M J(2816)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2798)
Mastering Python for Finance by Unknown(2745)
