~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/information_schema_dictionary/dictionary.cc

Merge Monty.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
static ViewTableUsage *view_table_usage;
45
45
static Views *views;
46
46
 
47
 
static int init(drizzled::plugin::Registry &registry)
 
47
static int init(drizzled::plugin::Context &context)
48
48
{
49
49
  check_constraints = new(std::nothrow)CheckConstraints;
50
50
  column_domain_usage = new(std::nothrow)ColumnDomainUsage;
67
67
  view_table_usage = new(std::nothrow)ViewTableUsage;
68
68
  views = new(std::nothrow)Views;
69
69
 
70
 
  registry.add(check_constraints);
71
 
  registry.add(column_domain_usage);
72
 
  registry.add(column_privileges);
73
 
  registry.add(columns);
74
 
  registry.add(constraint_column_usage);
75
 
  registry.add(constraint_table_usage);
76
 
  registry.add(domain_constraints);
77
 
  registry.add(domains);
78
 
  registry.add(key_column_usage);
79
 
  registry.add(parameters);
80
 
  registry.add(referential_constraints);
81
 
  registry.add(routines);
82
 
  registry.add(routine_columns);
83
 
  registry.add(schemata);
84
 
  registry.add(table_constraints);
85
 
  registry.add(table_privileges);
86
 
  registry.add(tables);
87
 
  registry.add(view_column_usage);
88
 
  registry.add(view_table_usage);
89
 
  registry.add(views);
90
 
 
91
 
  return 0;
92
 
}
93
 
 
94
 
static int finalize(drizzled::plugin::Registry &registry)
95
 
{
96
 
  registry.remove(check_constraints);
97
 
  registry.remove(column_domain_usage);
98
 
  registry.remove(column_privileges);
99
 
  registry.remove(columns);
100
 
  registry.remove(constraint_column_usage);
101
 
  registry.remove(constraint_table_usage);
102
 
  registry.remove(domain_constraints);
103
 
  registry.remove(domains);
104
 
  registry.remove(key_column_usage);
105
 
  registry.remove(parameters);
106
 
  registry.remove(referential_constraints);
107
 
  registry.remove(routines);
108
 
  registry.remove(routine_columns);
109
 
  registry.remove(schemata);
110
 
  registry.remove(table_constraints);
111
 
  registry.remove(table_privileges);
112
 
  registry.remove(tables);
113
 
  registry.remove(view_column_usage);
114
 
  registry.remove(view_table_usage);
115
 
  registry.remove(views);
116
 
 
117
 
  delete check_constraints;
118
 
  delete column_domain_usage;
119
 
  delete column_privileges;
120
 
  delete columns;
121
 
  delete constraint_column_usage;
122
 
  delete constraint_table_usage;
123
 
  delete domain_constraints;
124
 
  delete domains;
125
 
  delete key_column_usage;
126
 
  delete parameters;
127
 
  delete referential_constraints;
128
 
  delete routines;
129
 
  delete routine_columns;
130
 
  delete schemata;
131
 
  delete table_constraints;
132
 
  delete table_privileges;
133
 
  delete tables;
134
 
  delete view_column_usage;
135
 
  delete view_table_usage;
136
 
  delete views;
 
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);
137
90
 
138
91
  return 0;
139
92
}
147
100
  "Data Dictionary for ANSI information schema, etc",
148
101
  PLUGIN_LICENSE_GPL,
149
102
  init,
150
 
  finalize,
151
103
  NULL,
152
104
  NULL
153
105
}