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:
SQL Command | Couchbase 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. |