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

Classes

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, SessionInfoFormatter const &formatter)
 

Typedef Documentation

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

Definition at line 80 of file QueryState.h.

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

Definition at line 104 of file QueryState.h.

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

Definition at line 84 of file QueryState.h.

using query_state::Id = typedef uint64_t

Definition at line 81 of file QueryState.h.

Function Documentation

std::ostream& query_state::operator<< ( std::ostream &  os,
SessionInfoFormatter const &  formatter 
)

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

146  {
147  auto const& db_name = formatter.session_info.getCatalog().getCurrentDB().dbName;
148  if (db_name.find_first_of(" \"") == std::string::npos) {
149  os << db_name;
150  } else {
151  os << std::quoted(db_name, '"', '"');
152  }
153  auto const& userName = formatter.session_info.get_currentUser().userName;
154  if (userName.find_first_of(" \"") == std::string::npos) {
155  os << ' ' << userName;
156  } else {
157  os << ' ' << std::quoted(userName, '"', '"');
158  }
159  return os << ' ' << formatter.session_info.get_public_session_id();
160 }

+ Here is the call graph for this function: