public class BinaryCollection extends Object
| Modifier and Type | Method and Description |
|---|---|
MutationResult |
append(String id,
byte[] content)
Appends binary content to the document.
|
MutationResult |
append(String id,
byte[] content,
AppendOptions options)
Appends binary content to the document with custom options.
|
CounterResult |
decrement(String id)
Decrements the counter document by one.
|
CounterResult |
decrement(String id,
DecrementOptions options)
Decrements the counter document by one or the number defined in the options.
|
CounterResult |
increment(String id)
Increments the counter document by one.
|
CounterResult |
increment(String id,
IncrementOptions options)
Increments the counter document by one or the number defined in the options.
|
MutationResult |
prepend(String id,
byte[] content)
Prepends binary content to the document.
|
MutationResult |
prepend(String id,
byte[] content,
PrependOptions options)
Prepends binary content to the document with custom options.
|
public MutationResult append(String id, byte[] content)
id - the document id which is used to uniquely identify it.content - the binary content to append to the document.MutationResult once completed.DocumentNotFoundException - the given document id is not found in the collection.CasMismatchException - if the document has been concurrently modified on the server.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public MutationResult append(String id, byte[] content, AppendOptions options)
id - the document id which is used to uniquely identify it.content - the binary content to append to the document.options - custom options to customize the append behavior.MutationResult once completed.DocumentNotFoundException - the given document id is not found in the collection.CasMismatchException - if the document has been concurrently modified on the server.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public MutationResult prepend(String id, byte[] content)
id - the document id which is used to uniquely identify it.content - the binary content to append to the document.MutationResult once completed.DocumentNotFoundException - the given document id is not found in the collection.CasMismatchException - if the document has been concurrently modified on the server.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public MutationResult prepend(String id, byte[] content, PrependOptions options)
id - the document id which is used to uniquely identify it.content - the binary content to append to the document.options - custom options to customize the prepend behavior.MutationResult once completed.DocumentNotFoundException - the given document id is not found in the collection.CasMismatchException - if the document has been concurrently modified on the server.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public CounterResult increment(String id)
id - the document id which is used to uniquely identify it.CounterResult once completed.DocumentNotFoundException - the given document id is not found in the collection.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public CounterResult increment(String id, IncrementOptions options)
id - the document id which is used to uniquely identify it.options - custom options to customize the increment behavior.CounterResult once completed.DocumentNotFoundException - the given document id is not found in the collection.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public CounterResult decrement(String id)
id - the document id which is used to uniquely identify it.CounterResult once completed.DocumentNotFoundException - the given document id is not found in the collection.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).public CounterResult decrement(String id, DecrementOptions options)
id - the document id which is used to uniquely identify it.options - custom options to customize the decrement behavior.CounterResult once completed.DocumentNotFoundException - the given document id is not found in the collection.TimeoutException - if the operation times out before getting a result.CouchbaseException - for all other error reasons (acts as a base type and catch-all).Copyright © 2021 Couchbase, Inc.. All rights reserved.