Couchbase C++ SDK 1.0.2 (rev. 51f4775)
Loading...
Searching...
No Matches
query_warning Class Reference

Represents a single warning returned from the query engine. More...

#include <couchbase/query_warning.hxx>

Public Member Functions

 query_warning ()=default
 
 query_warning (std::uint64_t code, std::string message, std::optional< std::uint64_t > reason, std::optional< bool > retry)
 
auto code () const -> std::uint64_t
 Error code.
 
auto message () const -> const std::string &
 Error message.
 
auto reason () const -> const std::optional< std::uint64_t > &
 Optional reason code that clarifies the error code.
 
auto retry () const -> const std::optional< bool > &
 Optional flag that indicates whether the request should be retried.
 

Detailed Description

Represents a single warning returned from the query engine.

Note
warnings are not terminal errors but hints from the engine that something was not as expected.
Since
1.0.0
Committed
Generally available API and should be preferred in production

Constructor & Destructor Documentation

◆ query_warning() [1/2]

query_warning ( )
default
Since
1.0.0
Internal
Internal interface

◆ query_warning() [2/2]

query_warning ( std::uint64_t code,
std::string message,
std::optional< std::uint64_t > reason,
std::optional< bool > retry )
inline
Since
1.0.0
Volatile
Should not be used in production

Member Function Documentation

◆ code()

auto code ( ) const -> std::uint64_t
inlinenodiscard

Error code.

Returns
error code
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ message()

auto message ( ) const -> const std::string&
inlinenodiscard

Error message.

Returns
human readable explanation
Since
1.0.0
Committed
Generally available API and should be preferred in production

◆ reason()

auto reason ( ) const -> const std::optional<std::uint64_t>&
inlinenodiscard

Optional reason code that clarifies the error code.

Returns
clarification of the error code
Since
1.0.0
Internal
Internal interface

◆ retry()

auto retry ( ) const -> const std::optional<bool>&
inlinenodiscard

Optional flag that indicates whether the request should be retried.

Returns
non empty optional with true if the server requested retry.
Since
1.0.0
Internal
Internal interface

The documentation for this class was generated from the following file: