00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <config.h>
00022 #include <plugin/information_schema_dictionary/dictionary.h>
00023
00024 using namespace drizzled;
00025
00026 static CheckConstraints *check_constraints;
00027 static ColumnDomainUsage *column_domain_usage;
00028 static ColumnPrivileges *column_privileges;
00029 static Columns *columns;
00030 static ConstraintColumnUsage *constraint_column_usage;
00031 static ConstraintTableUsage *constraint_table_usage;
00032 static DomainConstraints *domain_constraints;
00033 static Domains *domains;
00034 static KeyColumnUsage *key_column_usage;
00035 static Parameters *parameters;
00036 static ReferentialConstraints *referential_constraints;
00037 static Routines *routines;
00038 static RoutineColumns *routine_columns;
00039 static Schemata *schemata;
00040 static TableConstraints *table_constraints;
00041 static TablePriviledges *table_privileges;
00042 static Tables *tables;
00043 static ViewColumnUsage *view_column_usage;
00044 static ViewTableUsage *view_table_usage;
00045 static Views *views;
00046
00047 static int init(drizzled::module::Context &context)
00048 {
00049 check_constraints = new(std::nothrow)CheckConstraints;
00050 column_domain_usage = new(std::nothrow)ColumnDomainUsage;
00051 column_privileges = new(std::nothrow)ColumnPrivileges;
00052 columns = new(std::nothrow)Columns;
00053 constraint_column_usage = new(std::nothrow)ConstraintColumnUsage;
00054 constraint_table_usage = new(std::nothrow)ConstraintTableUsage;
00055 domain_constraints = new(std::nothrow)DomainConstraints;
00056 domains = new(std::nothrow)Domains;
00057 key_column_usage = new(std::nothrow)KeyColumnUsage;
00058 parameters = new(std::nothrow)Parameters;
00059 referential_constraints = new(std::nothrow)ReferentialConstraints;
00060 routines = new(std::nothrow)Routines;
00061 routine_columns = new(std::nothrow)RoutineColumns;
00062 schemata = new(std::nothrow)Schemata;
00063 table_constraints = new(std::nothrow)TableConstraints;
00064 table_privileges = new(std::nothrow)TablePriviledges;
00065 tables = new(std::nothrow)Tables;
00066 view_column_usage = new(std::nothrow)ViewColumnUsage;
00067 view_table_usage = new(std::nothrow)ViewTableUsage;
00068 views = new(std::nothrow)Views;
00069
00070 context.add(check_constraints);
00071 context.add(column_domain_usage);
00072 context.add(column_privileges);
00073 context.add(columns);
00074 context.add(constraint_column_usage);
00075 context.add(constraint_table_usage);
00076 context.add(domain_constraints);
00077 context.add(domains);
00078 context.add(key_column_usage);
00079 context.add(parameters);
00080 context.add(referential_constraints);
00081 context.add(routines);
00082 context.add(routine_columns);
00083 context.add(schemata);
00084 context.add(table_constraints);
00085 context.add(table_privileges);
00086 context.add(tables);
00087 context.add(view_column_usage);
00088 context.add(view_table_usage);
00089 context.add(views);
00090
00091 return 0;
00092 }
00093
00094 DRIZZLE_DECLARE_PLUGIN
00095 {
00096 DRIZZLE_VERSION_ID,
00097 "information_schema_dictionary",
00098 "1.0",
00099 "Brian Aker",
00100 "Data Dictionary for ANSI information schema, etc",
00101 PLUGIN_LICENSE_GPL,
00102 init,
00103 NULL,
00104 NULL
00105 }
00106 DRIZZLE_DECLARE_PLUGIN_END;