OmniSciDB  ab4938a6a3
query_state Namespace Reference

Classes

struct  Event
 
class  QueryState
 
class  QueryStateProxy
 
class  QueryStates
 
struct  QuoteFormatter
 
struct  SessionData
 
struct  SessionInfoFormatter
 
class  StdLog
 
class  StdLogData
 
class  Timer
 

Typedefs

using Clock = std::chrono::steady_clock
 
using Id = uint64_t
 
using Events = std::list< Event >
 
using EventFunction = std::function< void(Event const &)>
 

Functions

std::ostream & operator<< (std::ostream &os, QuoteFormatter const &quote_formatter)
 
std::ostream & operator<< (std::ostream &os, SessionData const &session_data)
 
std::ostream & operator<< (std::ostream &os, SessionInfoFormatter const &formatter)
 

Typedef Documentation

◆ Clock

using query_state::Clock = typedef std::chrono::steady_clock

Definition at line 82 of file QueryState.h.

◆ EventFunction

using query_state::EventFunction = typedef std::function<void(Event const&)>

Definition at line 106 of file QueryState.h.

◆ Events

using query_state::Events = typedef std::list<Event>

Definition at line 86 of file QueryState.h.

◆ Id

using query_state::Id = typedef uint64_t

Definition at line 83 of file QueryState.h.

Function Documentation

◆ operator<<() [1/3]

std::ostream& query_state::operator<< ( std::ostream &  os,
QuoteFormatter const &  quote_formatter 
)

Definition at line 143 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

143  {
144  if (quote_formatter.str.find_first_of(" \"") == std::string::npos) {
145  return os << quote_formatter.str;
146  } else {
147  return os << std::quoted(quote_formatter.str, '"', '"');
148  }
149 }

◆ operator<<() [2/3]

std::ostream& query_state::operator<< ( std::ostream &  os,
SessionData const &  session_data 
)

Definition at line 151 of file QueryState.cpp.

References query_state::SessionData::db_name, query_state::SessionData::public_session_id, and query_state::SessionData::user_name.

151  {
152  return os << QuoteFormatter{session_data.db_name} << ' '
153  << QuoteFormatter{session_data.user_name} << ' '
154  << session_data.public_session_id;
155 }

◆ operator<<() [3/3]

std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const &  formatter 
)

Definition at line 161 of file QueryState.cpp.

References Catalog_Namespace::DBMetadata::dbName, Catalog_Namespace::SessionInfo::get_currentUser(), Catalog_Namespace::SessionInfo::get_public_session_id(), Catalog_Namespace::SessionInfo::getCatalog(), Catalog_Namespace::Catalog::getCurrentDB(), query_state::SessionInfoFormatter::session_info, and Catalog_Namespace::UserMetadata::userName.

161  {
162  return os << QuoteFormatter{formatter.session_info.getCatalog().getCurrentDB().dbName}
163  << ' ' << QuoteFormatter{formatter.session_info.get_currentUser().userName}
164  << ' ' << formatter.session_info.get_public_session_id();
165 }
+ Here is the call graph for this function: