92 const std::
string&
id,
133 template<typename Transcoder =
codec::default_json_transcoder,
135 std::enable_if_t<!std::is_same_v<
codec::encoded_value, Document>,
bool> = true>
142 coll,
id, Transcoder::encode(std::forward<Document>(content)), std::move(handler));
159 std::enable_if_t<!std::is_same_v<codec::encoded_value, Document>,
bool> =
true>
163 std::move(doc), Transcoder::encode(std::forward<Document>(content)), std::move(handler));
177 std::string statement,
192 return query(std::move(statement), std::move(opts), {}, std::move(handler));
204 return query(std::move(statement), {}, std::move(handler));
209 virtual void insert_raw(
const collection& coll,
218 virtual void query(std::string statement,
220 std::optional<std::string> query_context,
The collection provides access to all collection APIs.
Definition collection.hxx:70
The scope identifies a group of collections and allows high application density as a result.
Definition scope.hxx:47
async_attempt_context(async_attempt_context &&) noexcept=default
void insert(const collection &coll, std::string id, Document &&content, async_result_handler &&handler)
Insert a document into a collection.
Definition async_attempt_context.hxx:136
void query(std::string statement, transaction_query_options opts, async_query_handler &&handler)
Perform a query.
Definition async_attempt_context.hxx:190
void query(const scope &scope, std::string statement, transaction_query_options opts, async_query_handler &&handler)
Perform a query, within a scope.
virtual void remove(transaction_get_result doc, async_err_handler &&handler)=0
Remove a document from a collection.
virtual void get_multi_replicas_from_preferred_server_group(const std::vector< transaction_get_multi_replicas_from_preferred_server_group_spec > &specs, const transaction_get_multi_replicas_from_preferred_server_group_options &options, std::function< void(error, std::optional< transaction_get_multi_replicas_from_preferred_server_group_result >)> &&cb)=0
async_attempt_context()=default
virtual ~async_attempt_context()=default
virtual void get_replica_from_preferred_server_group(const couchbase::collection &coll, const std::string &id, async_result_handler &&handler)=0
Get a document copy from the selected server group.
virtual void get_multi(const std::vector< transaction_get_multi_spec > &specs, const transaction_get_multi_options &options, std::function< void(error, std::optional< transaction_get_multi_result >)> &&cb)=0
void replace(transaction_get_result doc, Document &&content, async_result_handler &&handler)
Replace the contents of a document in a collection.
Definition async_attempt_context.hxx:160
virtual void get(const collection &coll, std::string id, async_result_handler &&handler)=0
Get document from a collection.
void query(std::string statement, async_query_handler &&handler)
Perform a query.
Definition async_attempt_context.hxx:202
Definition transaction_get_multi_options.hxx:30
Definition transaction_get_multi_replicas_from_preferred_server_group_options.hxx:30
Definition transaction_get_multi_replicas_from_preferred_server_group_result.hxx:36
Definition transaction_get_multi_replicas_from_preferred_server_group_spec.hxx:31
Definition transaction_get_multi_result.hxx:33
Definition transaction_get_multi_spec.hxx:31
The representation of the document in context of distributed transaction.
Definition transaction_get_result.hxx:57
The transaction_query_options are options specific to a query.
Definition transaction_query_options.hxx:35
Transactional queries will return a transaction_query_result.
Definition transaction_query_result.hxx:27
Definition analytics_options.hxx:35
json_transcoder< tao_json_serializer > default_json_transcoder
Definition default_json_transcoder.hxx:28
Definition transactions.hxx:28
std::function< void(error, transaction_get_result)> async_result_handler
Definition async_attempt_context.hxx:35
std::function< void(error, transaction_query_result)> async_query_handler
Definition async_attempt_context.hxx:36
std::function< void(error)> async_err_handler
Definition async_attempt_context.hxx:37
Represents a single item from the result of scan()
Definition allow_querying_search_index_options.hxx:28
@ query
The Query service (SQL++)
Definition service_type.hxx:31
Definition encoded_value.hxx:27