OmniSciDB  21ac014ffc
 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 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

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

Definition at line 82 of file QueryState.h.

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

Definition at line 106 of file QueryState.h.

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

Definition at line 86 of file QueryState.h.

using query_state::Id = typedef uint64_t

Definition at line 83 of file QueryState.h.

Function Documentation

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

Definition at line 159 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

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

Definition at line 167 of file QueryState.cpp.

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

167  {
168  return os << QuoteFormatter{session_data.db_name} << ' '
169  << QuoteFormatter{session_data.user_name} << ' '
170  << session_data.public_session_id;
171 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const formatter 
)

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

177  {
178  return os << QuoteFormatter{formatter.session_info.getCatalog().getCurrentDB().dbName}
179  << ' '
180  << QuoteFormatter{formatter.session_info.get_currentUser().userLoggable()}
181  << ' ' << formatter.session_info.get_public_session_id();
182 }

+ Here is the call graph for this function: