OmniSciDB  a5dc49c757
 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 92 of file QueryState.h.

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

Definition at line 115 of file QueryState.h.

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

Definition at line 95 of file QueryState.h.

Function Documentation

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

Definition at line 163 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

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

Definition at line 171 of file QueryState.cpp.

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

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

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

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

+ Here is the call graph for this function: