Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Server 2.0 Manual
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
3 Accessing Data with Couchbase SDKs
Chapter Sections
Chapters

3.1. Couchbase SDKs and SQL Commands

Couchbase SDKs support all of the four standard SQL commands used for reading and writing data. These functions in Couchbase have different method names, but they are the functional equivalents of the following SQL commands:

Table 3.1. SQL Commands/Couchbase Commands

SQL CommandCouchbase SDK Method
INSERT, to create.

set and

add

SELECT, to retrieve/read data.

get,

multiple-retrieves, and

get-and-touch (get and update expiration).

UPDATE, to modify data.

set with a given key, or

add with a new key, or

replace with a key, or

cas, also known as Check-and-Set. Used to update a value by providing the matching CAS value for the document.

There are also methods for incrementing and decrementing numeric values, changing the expiration for a value, as well as pre-pending or appending to stored objects.

DELETE, to remove data.

delete,

deletes information associated with a given key.