~drizzle-trunk/drizzle/development

1340.1.5 by Brian Aker
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
4
 *  Copyright (C) 2010 Brian Aker
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 */
20
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
21
#include <config.h>
22
#include <plugin/information_schema_dictionary/dictionary.h>
1340.1.5 by Brian Aker
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.
23
24
using namespace drizzled;
25
26
static CheckConstraints *check_constraints;
27
static ColumnDomainUsage *column_domain_usage;
28
static ColumnPrivileges *column_privileges;
29
static Columns *columns;
30
static ConstraintColumnUsage *constraint_column_usage;
31
static ConstraintTableUsage *constraint_table_usage;
32
static DomainConstraints *domain_constraints;
33
static Domains *domains;
34
static KeyColumnUsage *key_column_usage;
35
static Parameters *parameters;
36
static ReferentialConstraints *referential_constraints;
37
static Routines *routines;
38
static RoutineColumns *routine_columns;
39
static Schemata *schemata;
40
static TableConstraints *table_constraints;
41
static TablePriviledges *table_privileges;
42
static Tables *tables;
43
static ViewColumnUsage *view_column_usage;
44
static ViewTableUsage *view_table_usage;
45
static Views *views;
46
1530.2.6 by Monty Taylor
Moved plugin::Context to module::Context.
47
static int init(drizzled::module::Context &context)
1340.1.5 by Brian Aker
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.
48
{
2246.3.1 by Olaf van der Spek
Remove std::nothrow from new()
49
  check_constraints = new CheckConstraints;
50
  column_domain_usage = new ColumnDomainUsage;
51
  column_privileges = new ColumnPrivileges;
52
  columns = new Columns;
53
  constraint_column_usage = new ConstraintColumnUsage;
54
  constraint_table_usage = new ConstraintTableUsage;
55
  domain_constraints = new DomainConstraints;
56
  domains = new Domains;
57
  key_column_usage = new KeyColumnUsage;
58
  parameters = new Parameters;
59
  referential_constraints = new ReferentialConstraints;
60
  routines = new Routines;
61
  routine_columns = new RoutineColumns;
62
  schemata = new Schemata;
63
  table_constraints = new TableConstraints;
64
  table_privileges = new TablePriviledges;
65
  tables = new Tables;
66
  view_column_usage = new ViewColumnUsage;
67
  view_table_usage = new ViewTableUsage;
68
  views = new Views;
1340.1.5 by Brian Aker
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.
69
1324.2.20 by Monty Taylor
Updated Stewart's new plugins.
70
  context.add(check_constraints);
71
  context.add(column_domain_usage);
72
  context.add(column_privileges);
73
  context.add(columns);
74
  context.add(constraint_column_usage);
75
  context.add(constraint_table_usage);
76
  context.add(domain_constraints);
77
  context.add(domains);
78
  context.add(key_column_usage);
79
  context.add(parameters);
80
  context.add(referential_constraints);
81
  context.add(routines);
82
  context.add(routine_columns);
83
  context.add(schemata);
84
  context.add(table_constraints);
85
  context.add(table_privileges);
86
  context.add(tables);
87
  context.add(view_column_usage);
88
  context.add(view_table_usage);
89
  context.add(views);
1340.1.5 by Brian Aker
Update, we now have all of the ANSI INFORMATION_SCHEMA listed.
90
91
  return 0;
92
}
93
94
DRIZZLE_DECLARE_PLUGIN
95
{
96
  DRIZZLE_VERSION_ID,
97
  "information_schema_dictionary",
98
  "1.0",
99
  "Brian Aker",
100
  "Data Dictionary for ANSI information schema, etc",
101
  PLUGIN_LICENSE_GPL,
102
  init,
103
  NULL,
104
  NULL
105
}
106
DRIZZLE_DECLARE_PLUGIN_END;