OmniSciDB  a47db9e897
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 141 of file QueryState.cpp.

References query_state::QuoteFormatter::str.

141  {
142  if (quote_formatter.str.find_first_of(" \"") == std::string::npos) {
143  return os << quote_formatter.str;
144  } else {
145  return os << std::quoted(quote_formatter.str, '"', '"');
146  }
147 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionData const &  session_data 
)

Definition at line 149 of file QueryState.cpp.

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

149  {
150  return os << QuoteFormatter{session_data.db_name} << ' '
151  << QuoteFormatter{session_data.user_name} << ' '
152  << session_data.public_session_id;
153 }
std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const &  formatter 
)

Definition at line 159 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.

159  {
160  return os << QuoteFormatter{formatter.session_info.getCatalog().getCurrentDB().dbName}
161  << ' ' << QuoteFormatter{formatter.session_info.get_currentUser().userName}
162  << ' ' << formatter.session_info.get_public_session_id();
163 }

+ Here is the call graph for this function: