userver: storages::Query Class Reference
Loading...
Searching...
No Matches
storages::Query Class Reference

#include <userver/storages/query.hpp>

Detailed Description

Holds a query, its name and logging mode.

Examples
postgresql/functional_tests/basic_chaos/postgres_service.cpp, and samples/postgres_service/postgres_service.cpp.

Definition at line 20 of file query.hpp.

Public Types

enum class  LogMode {
  kFull ,
  kNameOnly
}
 
using Name
 

Public Member Functions

 Query (const char *statement, std::optional< Name > name=std::nullopt, LogMode log_mode=LogMode::kFull)
 
 Query (std::string statement, std::optional< Name > name=std::nullopt, LogMode log_mode=LogMode::kFull)
 
const std::optional< Name > & GetName () const
 
const std::string & Statement () const
 
void FillSpanTags (tracing::Span &) const
 Fills provided span with connection info.
 

Member Typedef Documentation

◆ Name

Member Enumeration Documentation

◆ LogMode

enum class storages::Query::LogMode
strong

Definition at line 25 of file query.hpp.


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