Skip to content

Functions: Document operations

Dannes Wessels edited this page Nov 2, 2015 · 6 revisions

get

the functions on this page can use the bucket password when this password is set on the connect function.

couchbase:get($clusterId as xs:string, $bucket as xs:string?, 
$documentName as xs:string) as map(*)?

Retrieve document from bucket.

insert

couchbase:insert($clusterId as xs:string, $bucket as xs:string?, 
$documentName as xs:string, $payload as map(*)) as map(*)

Insert JSON formatted document into bucket.

remove

couchbase:remove($clusterId as xs:string, $bucket as xs:string?, 
$documentName as xs:string) as map(*)?

Remove document from bucket.

upsert

couchbase:upsert($clusterId as xs:string, $bucket as xs:string?, 
$documentName as xs:string, $payload as map(*)) as map(*)

Update existing document or insert as new document when not existent yet in bucket.

Example

For some examples see the unit tests

Clone this wiki locally