Couchbase C++ SDK 1.0.4 (rev. 5355b0f)
|
Allows to perform certain operations on non-JSON documents. More...
#include <couchbase/binary_collection.hxx>
Public Member Functions | |
auto | bucket_name () const -> const std::string & |
Returns name of the bucket where the collection is defined. | |
auto | scope_name () const -> const std::string & |
Returns name of the scope where the collection is defined. | |
auto | name () const -> const std::string & |
Returns name of the collection. | |
void | append (std::string document_id, std::vector< std::byte > data, const append_options &options, append_handler &&handler) const |
Appends binary content to the document. | |
auto | append (std::string document_id, std::vector< std::byte > data, const append_options &options) const -> std::future< std::pair< error, mutation_result > > |
Appends binary content to the document. | |
void | prepend (std::string document_id, std::vector< std::byte > data, const prepend_options &options, prepend_handler &&handler) const |
Prepends binary content to the document. | |
auto | prepend (std::string document_id, std::vector< std::byte > data, const prepend_options &options) const -> std::future< std::pair< error, mutation_result > > |
Prepends binary content to the document. | |
void | increment (std::string document_id, const increment_options &options, increment_handler &&handler) const |
Increments the counter document by one or the number defined in the options. | |
auto | increment (std::string document_id, const increment_options &options) const -> std::future< std::pair< error, counter_result > > |
Increments the counter document by one or the number defined in the options. | |
void | decrement (std::string document_id, const decrement_options &options, decrement_handler &&handler) const |
Decrements the counter document by one or the number defined in the options. | |
auto | decrement (std::string document_id, const decrement_options &options) const -> std::future< std::pair< error, counter_result > > |
Decrements the counter document by one or the number defined in the options. | |
Friends | |
class | collection |
Allows to perform certain operations on non-JSON documents.
|
nodiscard |
Appends binary content to the document.
document_id | the document id which is used to uniquely identify it. |
data | the document content to append. |
options | custom options to customize the append behavior. |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::cas_mismatch | if the document has been concurrently modified on the server. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
void append | ( | std::string | document_id, |
std::vector< std::byte > | data, | ||
const append_options & | options, | ||
append_handler && | handler ) const |
Appends binary content to the document.
document_id | the document id which is used to uniquely identify it. |
data | the document content to append. |
options | custom options to customize the append behavior. |
handler | callable that implements append_handler |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::cas_mismatch | if the document has been concurrently modified on the server. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
|
nodiscard |
Returns name of the bucket where the collection is defined.
|
nodiscard |
Decrements the counter document by one or the number defined in the options.
document_id | the document id which is used to uniquely identify it. |
options | custom options to customize the decrement behavior. |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
void decrement | ( | std::string | document_id, |
const decrement_options & | options, | ||
decrement_handler && | handler ) const |
Decrements the counter document by one or the number defined in the options.
Handler | type of the handler that implements decrement_handler |
document_id | the document id which is used to uniquely identify it. |
options | custom options to customize the decrement behavior. |
handler | callable that implements decrement_handler |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
|
nodiscard |
Increments the counter document by one or the number defined in the options.
document_id | the document id which is used to uniquely identify it. |
options | custom options to customize the increment behavior. |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
void increment | ( | std::string | document_id, |
const increment_options & | options, | ||
increment_handler && | handler ) const |
Increments the counter document by one or the number defined in the options.
Handler | type of the handler that implements increment_handler |
document_id | the document id which is used to uniquely identify it. |
options | custom options to customize the increment behavior. |
handler | callable that implements increment_handler |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
|
nodiscard |
Returns name of the collection.
|
nodiscard |
Prepends binary content to the document.
document_id | the document id which is used to uniquely identify it. |
data | the document content to prepend. |
options | custom options to customize the prepend behavior. |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::cas_mismatch | if the document has been concurrently modified on the server. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
void prepend | ( | std::string | document_id, |
std::vector< std::byte > | data, | ||
const prepend_options & | options, | ||
prepend_handler && | handler ) const |
Prepends binary content to the document.
Handler | type of the handler that implements prepend_handler |
document_id | the document id which is used to uniquely identify it. |
data | the document content to prepend. |
options | custom options to customize the prepend behavior. |
handler | callable that implements prepend_handler |
errc::key_value::document_not_found | the given document id is not found in the collection. |
errc::common::cas_mismatch | if the document has been concurrently modified on the server. |
errc::common::ambiguous_timeout | |
errc::common::unambiguous_timeout |
|
nodiscard |
Returns name of the scope where the collection is defined.
|
friend |