~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/plugin/query_cache.h

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/plugin.h>
24
24
#include <drizzled/plugin/plugin.h>
25
25
#include <drizzled/sql_list.h>
26
 
 
27
26
#include <drizzled/visibility.h>
28
27
 
29
 
namespace drizzled
30
 
{
31
 
class Session;
32
 
class select_result;
33
 
 
34
 
namespace plugin
35
 
{
 
28
namespace drizzled {
 
29
namespace plugin {
36
30
 
37
31
/* 
38
32
  This is the API that a qcache plugin must implement.
40
34
 
41
35
class DRIZZLED_API QueryCache : public Plugin
42
36
{
43
 
private:  
44
 
  
45
 
  QueryCache();
46
 
  QueryCache(const QueryCache &);
47
 
  QueryCache& operator=(const QueryCache &);
48
 
 
49
37
public:  
50
 
 
51
 
  explicit QueryCache(std::string name_arg)
52
 
    : Plugin(name_arg, "QueryCache")
 
38
  explicit QueryCache(const std::string& name)
 
39
    : Plugin(name, "QueryCache")
53
40
  {}
54
41
 
55
 
  virtual ~QueryCache() {}
56
 
 
57
42
  /* these are the Query Cache interface functions */
58
43
 
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;
69
54
 
70
 
  static bool addPlugin(QueryCache *handler);
71
 
  static void removePlugin(QueryCache *handler);
 
55
  static bool addPlugin(QueryCache*);
 
56
  static void removePlugin(QueryCache*);
72
57
 
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>&);
79
64
};
80
65
 
81
66
} /* namespace plugin */
82
67
} /* namespace drizzled */
83