OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
query_state Namespace Reference

Classes

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

Typedefs

using Clock = std::chrono::steady_clock
 
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

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

Definition at line 87 of file QueryState.h.

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

Definition at line 110 of file QueryState.h.

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

Definition at line 90 of file QueryState.h.

Function Documentation

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

Definition at line 165 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

165  {
166  if (quote_formatter.str.find_first_of(" \"") == std::string::npos) {
167  return os << quote_formatter.str;
168  } else {
169  return os << std::quoted(quote_formatter.str, '"', '"');
170  }
171 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionData const session_data 
)

Definition at line 173 of file QueryState.cpp.

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

173  {
174  return os << QuoteFormatter{session_data.db_name} << ' '
175  << QuoteFormatter{session_data.user_name} << ' '
176  << session_data.public_session_id;
177 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const formatter 
)

Definition at line 183 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::userLoggable().

183  {
184  return os << QuoteFormatter{formatter.session_info.getCatalog().getCurrentDB().dbName}
185  << ' '
186  << QuoteFormatter{formatter.session_info.get_currentUser().userLoggable()}
187  << ' ' << formatter.session_info.get_public_session_id();
188 }

+ Here is the call graph for this function: