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 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
25 |
#pragma once
|
1273.15.1
by Joe Daly
port transaction_log to use data_dictionary |
26 |
|
2173.2.1
by Monty Taylor
Fixes incorrect usage of include |
27 |
#include <drizzled/plugin/table_function.h> |
28 |
#include <drizzled/field.h> |
|
1273.15.1
by Joe Daly
port transaction_log to use data_dictionary |
29 |
|
30 |
#include "transaction_log.h" |
|
31 |
||
32 |
class TransactionLogTool : public drizzled::plugin::TableFunction |
|
33 |
{
|
|
34 |
public: |
|
35 |
||
36 |
TransactionLogTool(); |
|
37 |
||
38 |
class Generator : public drizzled::plugin::TableFunction::Generator |
|
39 |
{
|
|
40 |
public: |
|
41 |
Generator(drizzled::Field **arg); |
|
42 |
||
43 |
bool populate(); |
|
44 |
private: |
|
45 |
bool is_done; |
|
46 |
};
|
|
47 |
||
48 |
Generator *generator(drizzled::Field **arg) |
|
49 |
{
|
|
50 |
return new Generator(arg); |
|
51 |
}
|
|
52 |
};
|
|
53 |
||
54 |
class TransactionLogEntriesTool : public drizzled::plugin::TableFunction |
|
55 |
{
|
|
56 |
public: |
|
57 |
||
58 |
TransactionLogEntriesTool(); |
|
59 |
||
60 |
class Generator : public drizzled::plugin::TableFunction::Generator |
|
61 |
{
|
|
62 |
public: |
|
63 |
Generator(drizzled::Field **arg); |
|
64 |
||
65 |
bool populate(); |
|
66 |
private: |
|
67 |
TransactionLog::Entries::iterator it; |
|
68 |
TransactionLog::Entries::iterator end; |
|
69 |
};
|
|
70 |
||
71 |
Generator *generator(drizzled::Field **arg) |
|
72 |
{
|
|
73 |
return new Generator(arg); |
|
74 |
}
|
|
75 |
};
|
|
76 |
||
77 |
class TransactionLogTransactionsTool : public drizzled::plugin::TableFunction |
|
78 |
{
|
|
79 |
public: |
|
80 |
||
81 |
TransactionLogTransactionsTool(); |
|
82 |
||
83 |
class Generator : public drizzled::plugin::TableFunction::Generator |
|
84 |
{
|
|
85 |
public: |
|
86 |
Generator(drizzled::Field **arg); |
|
87 |
||
88 |
bool populate(); |
|
89 |
private: |
|
90 |
TransactionLog::TransactionEntries::iterator it; |
|
91 |
TransactionLog::TransactionEntries::iterator end; |
|
92 |
};
|
|
93 |
||
94 |
Generator *generator(drizzled::Field **arg) |
|
95 |
{
|
|
96 |
return new Generator(arg); |
|
97 |
}
|
|
98 |
};
|
|
99 |