OmniSciDB  085a039ca4
 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 172 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

172  {
173  if (quote_formatter.str.find_first_of(" \"") == std::string::npos) {
174  return os << quote_formatter.str;
175  } else {
176  return os << std::quoted(quote_formatter.str, '"', '"');
177  }
178 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionData const &  session_data 
)

Definition at line 180 of file QueryState.cpp.

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

180  {
181  return os << QuoteFormatter{session_data.db_name} << ' '
182  << QuoteFormatter{session_data.user_name} << ' '
183  << session_data.public_session_id;
184 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const &  formatter 
)

Definition at line 190 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().

190  {
191  return os << QuoteFormatter{formatter.session_info.getCatalog().getCurrentDB().dbName}
192  << ' '
193  << QuoteFormatter{formatter.session_info.get_currentUser().userLoggable()}
194  << ' ' << formatter.session_info.get_public_session_id();
195 }

+ Here is the call graph for this function: