41
35
class DRIZZLED_API QueryCache : public Plugin
46
QueryCache(const QueryCache &);
47
QueryCache& operator=(const QueryCache &);
51
explicit QueryCache(std::string name_arg)
52
: Plugin(name_arg, "QueryCache")
38
explicit QueryCache(const std::string& name)
39
: Plugin(name, "QueryCache")
55
virtual ~QueryCache() {}
57
42
/* these are the Query Cache interface functions */
59
44
/* Lookup the cache and transmit the data back to the client */
60
virtual bool doIsCached(Session* session)= 0;
45
virtual bool doIsCached(Session*)= 0;
61
46
/* Lookup the cache and transmit the data back to the client */
62
virtual bool doSendCachedResultset(Session *session)= 0;
47
virtual bool doSendCachedResultset(Session*)= 0;
63
48
/* Send the current Resultset to the cache */
64
virtual bool doSetResultset(Session *session)= 0;
49
virtual bool doSetResultset(Session*)= 0;
65
50
/* initiate a new Resultset (header) */
66
virtual bool doPrepareResultset(Session *session)= 0;
51
virtual bool doPrepareResultset(Session*)= 0;
67
52
/* push a record to the current Resultset */
68
virtual bool doInsertRecord(Session *session, List<Item> &item)= 0;
53
virtual bool doInsertRecord(Session*, List<Item>&)= 0;
70
static bool addPlugin(QueryCache *handler);
71
static void removePlugin(QueryCache *handler);
55
static bool addPlugin(QueryCache*);
56
static void removePlugin(QueryCache*);
73
58
/* These are the functions called by the rest of the Drizzle server */
74
static bool isCached(Session *session);
75
static bool sendCachedResultset(Session *session);
76
static bool prepareResultset(Session *session);
77
static bool setResultset(Session *session);
78
static bool insertRecord(Session *session, List<Item> &item);
59
static bool isCached(Session*);
60
static bool sendCachedResultset(Session*);
61
static bool prepareResultset(Session*);
62
static bool setResultset(Session*);
63
static bool insertRecord(Session*, List<Item>&);
81
66
} /* namespace plugin */
82
67
} /* namespace drizzled */