Public Types | |
typedef std::map< std::string, drizzled::message::Resultset > | CacheEntries |
typedef std::pair< const std::string, drizzled::message::Resultset > | CacheEntry |
typedef std::map< std::string, std::vector< std::string > > | CachedTablesEntries |
typedef std::pair< const std::string, std::vector < std::string > > | CachedTablesEntry |
Public Member Functions | |
drizzled::message::Resultset * | setCurrentResultsetMessage (drizzled::Session *in_session) |
void | setResultsetHeader (drizzled::message::Resultset &resultset, drizzled::Session *in_session, drizzled::TableList *in_table) |
bool | addRecord (drizzled::Session *in_session, drizzled::List< drizzled::Item > &list) |
Static Public Member Functions | |
static QueryCacheService & | singleton () |
static bool | isCached (std::string query) |
Static Public Attributes | |
static const size_t | DEFAULT_RECORD_SIZE = 100 |
static CacheEntries | cache |
static CachedTablesEntries | cachedTables |
Definition at line 46 of file query_cache_service.h.
bool drizzled::QueryCacheService::addRecord | ( | drizzled::Session * | in_session, |
drizzled::List< drizzled::Item > & | list | ||
) |
Creates a new SelectRecord GPB message and pushes it to currrent Resultset.
Pointer | to the Session which has inserted a record |
Pointer | to the List<Items> to add |
Definition at line 104 of file query_cache_service.cc.
References drizzled::Session::getResultsetMessage(), drizzled::Item::is_null(), and drizzled::Item::val_str().
message::Resultset * drizzled::QueryCacheService::setCurrentResultsetMessage | ( | drizzled::Session * | in_session | ) |
Method which returns the active Resultset message for the supplied Session. If one is not found, a new Resultset message is allocated, initialized, and returned.
The | session processing the Select |
Definition at line 43 of file query_cache_service.cc.
References drizzled::Session::getResultsetMessage(), and drizzled::Session::setResultsetMessage().
void drizzled::QueryCacheService::setResultsetHeader | ( | drizzled::message::Resultset & | resultset, |
drizzled::Session * | in_session, | ||
drizzled::TableList * | in_table | ||
) |
Helper method which initializes the header message for a Resultset.
inout] | Resultset message container to modify | |
[in] | Pointer | to the Session doing the processing |
[in] | Pointer | to the Table being inserted into |
Definition at line 63 of file query_cache_service.cc.
References drizzled::TableList::next_global.
static QueryCacheService& drizzled::QueryCacheService::singleton | ( | ) | [inline, static] |
Singleton method Returns the singleton instance of QueryCacheService
Definition at line 63 of file query_cache_service.h.