Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
2 Using Couchbase SDKs
Chapter Sections
Chapters

2.1. Comparing Couchbase SDKs and SQL Commands

All Couchbase SDKs support all of the four standard functionality used for traditional persistent storage. These functions in Couchbase have different method names, but they are the functional equivalents of the following SQL commands:

Table 2.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 item.

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.