Drizzled Public API Documentation

drizzled::QueryCacheService Class Reference

List of all members.

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::ResultsetsetCurrentResultsetMessage (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 QueryCacheServicesingleton ()
static bool isCached (std::string query)

Static Public Attributes

static const size_t DEFAULT_RECORD_SIZE = 100
static CacheEntries cache
static CachedTablesEntries cachedTables

Detailed Description

Definition at line 46 of file query_cache_service.h.


Member Function Documentation

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.

Parameters:
Pointerto the Session which has inserted a record
Pointerto 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.

Parameters:
Thesession 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.

Parameters:
inout]Resultset message container to modify
[in]Pointerto the Session doing the processing
[in]Pointerto 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.


The documentation for this class was generated from the following files: