Allows to perform certain operations on non-JSON documents.
More...
#include <couchbase/binary_collection.hxx>
|
| 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.
|
Allows to perform certain operations on non-JSON documents.
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ append() [1/2]
Appends binary content to the document.
- Parameters
-
| 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. |
- Returns
- future object that carries result of the operation
- Exceptions
-
| 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 | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ append() [2/2]
Appends binary content to the document.
- Parameters
-
| 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 |
- Exceptions
-
| 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 | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ bucket_name()
| auto bucket_name |
( |
| ) |
const -> const std::string & |
|
nodiscard |
Returns name of the bucket where the collection is defined.
- Returns
- name of the bucket
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ decrement() [1/2]
Decrements the counter document by one or the number defined in the options.
- Parameters
-
| document_id | the document id which is used to uniquely identify it. |
| options | custom options to customize the decrement behavior. |
- Returns
- future object that carries result of the operation
- Exceptions
-
| errc::key_value::document_not_found | the given document id is not found in the collection. |
| errc::common::ambiguous_timeout | |
| errc::common::unambiguous_timeout | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ decrement() [2/2]
Decrements the counter document by one or the number defined in the options.
- Template Parameters
-
- Parameters
-
| 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 |
- Exceptions
-
| errc::key_value::document_not_found | the given document id is not found in the collection. |
| errc::common::ambiguous_timeout | |
| errc::common::unambiguous_timeout | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ increment() [1/2]
Increments the counter document by one or the number defined in the options.
- Parameters
-
| document_id | the document id which is used to uniquely identify it. |
| options | custom options to customize the increment behavior. |
- Returns
- future object that carries result of the operation
- Exceptions
-
| errc::key_value::document_not_found | the given document id is not found in the collection. |
| errc::common::ambiguous_timeout | |
| errc::common::unambiguous_timeout | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ increment() [2/2]
Increments the counter document by one or the number defined in the options.
- Template Parameters
-
- Parameters
-
| 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 |
- Exceptions
-
| errc::key_value::document_not_found | the given document id is not found in the collection. |
| errc::common::ambiguous_timeout | |
| errc::common::unambiguous_timeout | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ name()
| auto name |
( |
| ) |
const -> const std::string & |
|
nodiscard |
Returns name of the collection.
- Returns
- name of the collection
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ prepend() [1/2]
Prepends binary content to the document.
- Parameters
-
| 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. |
- Returns
- future object that carries result of the operation
- Exceptions
-
| 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 | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ prepend() [2/2]
Prepends binary content to the document.
- Template Parameters
-
- Parameters
-
| 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 |
- Exceptions
-
| 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 | |
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ scope_name()
| auto scope_name |
( |
| ) |
const -> const std::string & |
|
nodiscard |
Returns name of the scope where the collection is defined.
- Returns
- name of the scope
- Since
- 1.0.0
- Committed
- Generally available API and should be preferred in production
◆ collection
The documentation for this class was generated from the following file: