~drizzle-trunk/drizzle/development

1273.15.1 by Joe Daly
port transaction_log to use data_dictionary
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C)
5
 *  
6
 *  Authors:
7
 *  Jay Pipes <joinfu@sun.com> 
8
 *  Joseph Daly <skinny.moey@gmail.com>
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; either version 2 of the License, or
13
 *  (at your option) any later version.
14
 *
15
 *  This program is distributed in the hope that it will be useful,
16
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 *  GNU General Public License for more details.
19
 *
20
 *  You should have received a copy of the GNU General Public License
21
 *  along with this program; if not, write to the Free Software
22
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23
 */
24
25
#ifndef PLUGIN_TRANSACTION_LOG_DATA_DICTIONARY_SCHEMA_H
26
#define PLUGIN_TRANSACTION_LOG_DATA_DICTIONARY_SCHEMA_H
27
28
#include "drizzled/plugin/table_function.h"
29
#include "drizzled/field.h"
30
31
#include "transaction_log.h"
32
33
class TransactionLogTool : public drizzled::plugin::TableFunction
34
{
35
public:
36
37
  TransactionLogTool();
38
39
  class Generator : public drizzled::plugin::TableFunction::Generator
40
  {
41
  public:
42
    Generator(drizzled::Field **arg);
43
44
    bool populate();
45
  private:
46
    bool is_done;
47
  };
48
49
  Generator *generator(drizzled::Field **arg)
50
  {
51
    return new Generator(arg);
52
  }
53
};
54
55
class TransactionLogEntriesTool : public drizzled::plugin::TableFunction
56
{
57
public:
58
59
  TransactionLogEntriesTool();
60
61
  class Generator : public drizzled::plugin::TableFunction::Generator
62
  {
63
  public:
64
    Generator(drizzled::Field **arg);
65
66
    bool populate();
67
  private:
68
    TransactionLog::Entries::iterator it;
69
    TransactionLog::Entries::iterator end;
70
  };
71
72
  Generator *generator(drizzled::Field **arg)
73
  {
74
    return new Generator(arg);
75
  }
76
};
77
78
class TransactionLogTransactionsTool : public drizzled::plugin::TableFunction
79
{
80
public:
81
82
  TransactionLogTransactionsTool();
83
84
  class Generator : public drizzled::plugin::TableFunction::Generator
85
  {
86
  public:
87
    Generator(drizzled::Field **arg);
88
89
    bool populate();
90
  private:
91
    TransactionLog::TransactionEntries::iterator it;
92
    TransactionLog::TransactionEntries::iterator end;
93
  };
94
95
  Generator *generator(drizzled::Field **arg)
96
  {
97
    return new Generator(arg);
98
  }
99
};
100
1273.13.65 by Brian Aker
Lint fixes.
101
#endif /* PLUGIN_TRANSACTION_LOG_DATA_DICTIONARY_SCHEMA_H */