40#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
73 static void connect(
const std::string& connection_string,
89 [[nodiscard]]
static auto connect(
const std::string& connection_string,
91 -> std::future<std::pair<error, cluster>>;
102 void close(std::function<
void()>&& handler);
103 [[nodiscard]]
auto close() -> std::future<void>;
114 [[nodiscard]]
auto bucket(std::string_view bucket_name)
const ->
bucket;
142 -> std::future<std::pair<error, query_result>>;
185 [[nodiscard]]
auto search(std::string index_name,
188 -> std::future<std::pair<error, search_result>>;
222 const -> std::future<std::pair<error, analytics_result>>;
251 -> std::future<std::pair<error, ping_result>>;
288 -> std::future<std::pair<error, diagnostics_result>>;
343#ifndef COUCHBASE_CXX_CLIENT_DOXYGEN
344 friend class cluster_impl;
345 explicit cluster(std::shared_ptr<cluster_impl> impl);
348 std::shared_ptr<cluster_impl> impl_{};
Definition analytics_index_manager.hxx:54
Definition bucket_manager.hxx:47
Definition cluster_options.hxx:44
The cluster is the main entry point when connecting to a Couchbase cluster.
Definition cluster.hxx:60
cluster(cluster &&other)=default
auto ping(const ping_options &options={}) const -> std::future< std::pair< error, ping_result > >
Performs application-level ping requests against services in the Couchbase cluster.
auto analytics_indexes() const -> analytics_index_manager
Provides access ot the Analytics index management services.
auto query_indexes() const -> query_index_manager
Provides access to the N1QL index management services.
auto search(std::string index_name, search_request request, const search_options &options={}) const -> std::future< std::pair< error, search_result > >
Performs a request against the full text search services.
static void connect(const std::string &connection_string, const cluster_options &options, cluster_connect_handler &&handler)
Connect to a Couchbase cluster.
auto query(std::string statement, const query_options &options) const -> std::future< std::pair< error, query_result > >
Performs a query against the query (N1QL) services.
auto analytics_query(std::string statement, const analytics_options &options={}) const -> std::future< std::pair< error, analytics_result > >
Performs a query against the analytics services.
void close(std::function< void()> &&handler)
auto bucket(std::string_view bucket_name) const -> bucket
Opens a bucket with the given name.
auto close() -> std::future< void >
void search(std::string index_name, search_request request, const search_options &options, search_handler &&handler) const
Performs a request against the full text search services.
auto diagnostics(const diagnostics_options &options={}) const -> std::future< std::pair< error, diagnostics_result > >
Assembles a diagnostics report on the current state of the cluster from the SDK's point of view.
void ping(const ping_options &options, ping_handler &&handler) const
Performs application-level ping requests against services in the Couchbase cluster.
cluster(const cluster &other)=default
void notify_fork(fork_event event)
auto operator=(const cluster &other) -> cluster &=default
void query(std::string statement, const query_options &options, query_handler &&handler) const
Performs a query against the query (N1QL) services.
auto search_indexes() const -> search_index_manager
Provides access to search index management services.
void diagnostics(const diagnostics_options &options, diagnostics_handler &&handler) const
Assembles a diagnostics report on the current state of the cluster from the SDK's point of view.
void analytics_query(std::string statement, const analytics_options &options, analytics_handler &&handler) const
Performs a query against the analytics services.
auto transactions() const -> std::shared_ptr< couchbase::transactions::transactions >
Provides access to transaction services.
auto buckets() const -> bucket_manager
Provides access to the bucket management services.
auto operator=(cluster &&other) -> cluster &=default
static auto connect(const std::string &connection_string, const cluster_options &options) -> std::future< std::pair< error, cluster > >
Connect to a Couchbase cluster.
The Query Index Manager interface contains the means for managing indexes used for queries.
Definition query_index_manager.hxx:49
Definition search_index_manager.hxx:52
A search_request is used to perform operations against the Full Text Search (FTS) Couchbase service.
Definition search_request.hxx:46
Represents a single item from the result of collection::scan()
Definition allow_querying_search_index_options.hxx:28
std::function< void(error, cluster)> cluster_connect_handler
The signature for the handler of the cluster::connect()
Definition cluster_options.hxx:309
std::function< void(error, search_result)> search_handler
The signature for the handler of the cluster::search() and scope::search() operations.
Definition search_options.hxx:528
fork_event
Definition fork_event.hxx:22
std::function< void(error, diagnostics_result)> diagnostics_handler
Definition diagnostics_options.hxx:75
std::function< void(error, query_result)> query_handler
The signature for the handler of the cluster::query() and scope::query() operations.
Definition query_options.hxx:613
std::function< void(error, ping_result)> ping_handler
Definition ping_options.hxx:93
std::function< void(error, analytics_result)> analytics_handler
The signature for the handler of the cluster::analytics_query() and scope::analytics_query() operatio...
Definition analytics_options.hxx:401
Options for cluster::analytics_query() and scope::analytics_query().
Definition analytics_options.hxx:45
Definition diagnostics_options.hxx:28
Definition ping_options.hxx:32
Options for cluster::query() and scope::query().
Definition query_options.hxx:46
Options for cluster::search() and scope::search().
Definition search_options.hxx:47