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