~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/transaction_log/data_dictionary_schema.h

  • Committer: Joe Daly
  • Date: 2010-02-11 04:18:03 UTC
  • mto: (1273.13.56 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: skinny.moey@gmail.com-20100211041803-kp7zqdnc3y898kav
port transaction_log to use data_dictionary

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 "config.h"
 
29
 
 
30
#include "drizzled/plugin/table_function.h"
 
31
#include "drizzled/field.h"
 
32
 
 
33
#include "transaction_log.h"
 
34
 
 
35
class TransactionLogTool : public drizzled::plugin::TableFunction
 
36
{
 
37
public:
 
38
 
 
39
  TransactionLogTool();
 
40
 
 
41
  class Generator : public drizzled::plugin::TableFunction::Generator
 
42
  {
 
43
  public:
 
44
    Generator(drizzled::Field **arg);
 
45
 
 
46
    bool populate();
 
47
  private:
 
48
    bool is_done;
 
49
  };
 
50
 
 
51
  Generator *generator(drizzled::Field **arg)
 
52
  {
 
53
    return new Generator(arg);
 
54
  }
 
55
};
 
56
 
 
57
class TransactionLogEntriesTool : public drizzled::plugin::TableFunction
 
58
{
 
59
public:
 
60
 
 
61
  TransactionLogEntriesTool();
 
62
 
 
63
  class Generator : public drizzled::plugin::TableFunction::Generator
 
64
  {
 
65
  public:
 
66
    Generator(drizzled::Field **arg);
 
67
 
 
68
    bool populate();
 
69
  private:
 
70
    TransactionLog::Entries::iterator it;
 
71
    TransactionLog::Entries::iterator end;
 
72
  };
 
73
 
 
74
  Generator *generator(drizzled::Field **arg)
 
75
  {
 
76
    return new Generator(arg);
 
77
  }
 
78
};
 
79
 
 
80
class TransactionLogTransactionsTool : public drizzled::plugin::TableFunction
 
81
{
 
82
public:
 
83
 
 
84
  TransactionLogTransactionsTool();
 
85
 
 
86
  class Generator : public drizzled::plugin::TableFunction::Generator
 
87
  {
 
88
  public:
 
89
    Generator(drizzled::Field **arg);
 
90
 
 
91
    bool populate();
 
92
  private:
 
93
    TransactionLog::TransactionEntries::iterator it;
 
94
    TransactionLog::TransactionEntries::iterator end;
 
95
  };
 
96
 
 
97
  Generator *generator(drizzled::Field **arg)
 
98
  {
 
99
    return new Generator(arg);
 
100
  }
 
101
};
 
102
 
 
103
#endif /* PLUGIN_TRANSACTION_LOG_DATA_DICTIONARY_H */