drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
information_schema_dictionary/dictionary.cc
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
21#include <config.h>
22#include <plugin/information_schema_dictionary/dictionary.h>
23
24using namespace drizzled;
25
26static CheckConstraints *check_constraints;
27static ColumnDomainUsage *column_domain_usage;
28static ColumnPrivileges *column_privileges;
29static Columns *columns;
30static ConstraintColumnUsage *constraint_column_usage;
31static ConstraintTableUsage *constraint_table_usage;
32static DomainConstraints *domain_constraints;
33static Domains *domains;
34static KeyColumnUsage *key_column_usage;
35static Parameters *parameters;
36static ReferentialConstraints *referential_constraints;
37static Routines *routines;
38static RoutineColumns *routine_columns;
39static Schemata *schemata;
40static TableConstraints *table_constraints;
41static TablePriviledges *table_privileges;
42static Tables *tables;
43static ViewColumnUsage *view_column_usage;
44static ViewTableUsage *view_table_usage;
45static Views *views;
46
47static int init(drizzled::module::Context &context)
48{
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;
69
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);
90
91 return 0;
92}
93
94DRIZZLE_DECLARE_PLUGIN
95{
96 DRIZZLE_VERSION_ID,
97 "information_schema_dictionary",
98 "1.0",
99 "Brian Aker",
100 N_("The INFORMATION_SCHEMA"),
101 PLUGIN_LICENSE_GPL,
102 init,
103 NULL,
104 NULL
105}
106DRIZZLE_DECLARE_PLUGIN_END;
Definition views.h:24
TODO: Rename this file - func.h is stupid.