Couchbase C++ SDK 1.0.2 (rev. 51f4775)
|
The cluster
is the main entry point when connecting to a Couchbase cluster.
More...
#include <couchbase/cluster.hxx>
Public Member Functions | |
cluster ()=default | |
cluster (const cluster &other)=default | |
cluster (cluster &&other)=default | |
~cluster ()=default | |
auto | operator= (const cluster &other) -> cluster &=default |
auto | operator= (cluster &&other) -> cluster &=default |
void | notify_fork (fork_event event) |
void | close (std::function< void()> &&handler) |
auto | close () -> std::future< void > |
auto | bucket (std::string_view bucket_name) const -> bucket |
Opens a bucket with the given name. | |
void | query (std::string statement, const query_options &options, query_handler &&handler) const |
Performs a query against the query (N1QL) services. | |
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. | |
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 | 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. | |
void | analytics_query (std::string statement, const analytics_options &options, analytics_handler &&handler) const |
Performs a query against the analytics 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 | ping (const ping_options &options, ping_handler &&handler) const |
Performs application-level ping requests against services in the Couchbase cluster. | |
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. | |
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. | |
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. | |
auto | query_indexes () const -> query_index_manager |
Provides access to the N1QL index management services. | |
auto | analytics_indexes () const -> analytics_index_manager |
Provides access ot the Analytics index management services. | |
auto | buckets () const -> bucket_manager |
Provides access to the bucket management services. | |
auto | search_indexes () const -> search_index_manager |
Provides access to search index management services. | |
auto | transactions () const -> std::shared_ptr< couchbase::transactions::transactions > |
Provides access to transaction services. | |
Static Public Member Functions | |
static void | connect (const std::string &connection_string, const cluster_options &options, cluster_connect_handler &&handler) |
Connect to a Couchbase cluster. | |
static auto | connect (const std::string &connection_string, const cluster_options &options) -> std::future< std::pair< error, cluster > > |
Connect to a Couchbase cluster. | |
The cluster
is the main entry point when connecting to a Couchbase cluster.
|
default |
|
default |
|
nodiscard |
Provides access ot the Analytics index management services.
void analytics_query | ( | std::string | statement, |
const analytics_options & | options, | ||
analytics_handler && | handler ) const |
Performs a query against the analytics services.
statement | the query statement. |
options | options to customize the query request. |
handler | the handler that implements query_handler |
|
nodiscard |
Performs a query against the analytics services.
statement | the query statement. |
options | options to customize the query request. |
Opens a bucket
with the given name.
bucket_name | the name of the bucket to open. |
bucket
once opened.
|
nodiscard |
Provides access to the bucket management services.
|
nodiscard |
void close | ( | std::function< void()> && | handler | ) |
|
staticnodiscard |
Connect to a Couchbase cluster.
connection_string | connection string used to locate the Couchbase cluster object. |
options | options to customize connection (note, that connection_string takes precedence over this options). |
|
static |
Connect to a Couchbase cluster.
connection_string | connection string used to locate the Couchbase cluster object. |
options | options to customize connection (note, that connection_string takes precedence over this options). |
handler | the handler |
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.
options | custom options to change the default behavior. |
handler | the handler that implements diagnostics_handler. |
|
nodiscard |
Assembles a diagnostics report on the current state of the cluster from the SDK's point of view.
options | custom options to change the default behavior. |
void notify_fork | ( | fork_event | event | ) |
void ping | ( | const ping_options & | options, |
ping_handler && | handler ) const |
Performs application-level ping requests against services in the Couchbase cluster.
options | custom options to change the default behavior. |
handler | the handler that implements ping_handler. |
|
nodiscard |
Performs application-level ping requests against services in the Couchbase cluster.
options | custom options to change the default behavior. |
|
nodiscard |
Performs a query against the query (N1QL) services.
statement | the N1QL query statement. |
options | options to customize the query request. |
void query | ( | std::string | statement, |
const query_options & | options, | ||
query_handler && | handler ) const |
Performs a query against the query (N1QL) services.
statement | the N1QL query statement. |
options | options to customize the query request. |
handler | the handler that implements query_handler |
|
nodiscard |
Provides access to the N1QL index management services.
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.
This can be used to perform a traditional FTS query, and/or a vector search.
index_name | name of the search index |
request | request object, see search_request for more details. |
options | options to customize the query request. |
handler | the handler that implements search_handler |
|
nodiscard |
Performs a request against the full text search services.
This can be used to perform a traditional FTS query, and/or a vector search.
index_name | name of the search index |
request | request object, see search_request for more details. |
options | options to customize the query request. |
|
nodiscard |
Provides access to search index management services.
|
nodiscard |
Provides access to transaction services.
See transactions
for details on using the transactions object.
transactions
object