24
24
using namespace drizzled;
26
static int init(drizzled::module::Context &context)
26
static ColumnsTool *columns;
27
static IndexPartsTool *index_parts;
28
static IndexesTool *indexes;
29
static ReferentialConstraintsTool *referential_constraints;
30
static SchemasTool *schemas;
31
static SchemaNames *schema_names;
32
static TableConstraintsTool *table_constraints;
33
static TablesTool *tables;
34
static TableNames *local_tables;
35
static TableStatus *table_status;
38
static int init(drizzled::plugin::Registry ®istry)
28
context.add(new ColumnsTool());
29
context.add(new IndexPartsTool());
30
context.add(new IndexesTool());
31
context.add(new ForeignKeysTool());
32
context.add(new SchemasTool());
33
context.add(new TableConstraintsTool());
34
context.add(new TablesTool());
40
columns= new(std::nothrow)ColumnsTool;
41
index_parts= new(std::nothrow)IndexPartsTool;
42
indexes= new(std::nothrow)IndexesTool;
43
referential_constraints= new(std::nothrow)ReferentialConstraintsTool;
44
schemas= new(std::nothrow)SchemasTool;
45
local_tables= new(std::nothrow)TableNames;
46
schema_names= new(std::nothrow)SchemaNames;
47
table_constraints= new(std::nothrow)TableConstraintsTool;
48
table_status= new(std::nothrow)TableStatus;
49
tables= new(std::nothrow)TablesTool;
51
registry.add(columns);
52
registry.add(index_parts);
53
registry.add(indexes);
54
registry.add(local_tables);
55
registry.add(referential_constraints);
56
registry.add(schema_names);
57
registry.add(schemas);
58
registry.add(table_constraints);
59
registry.add(table_status);
65
static int finalize(drizzled::plugin::Registry ®istry)
67
registry.remove(columns);
68
registry.remove(index_parts);
69
registry.remove(indexes);
70
registry.remove(local_tables);
71
registry.remove(referential_constraints);
72
registry.remove(schema_names);
73
registry.remove(schemas);
74
registry.remove(table_constraints);
75
registry.remove(table_status);
76
registry.remove(tables);
81
delete referential_constraints;
84
delete table_constraints;
39
91
DRIZZLE_DECLARE_PLUGIN
41
93
DRIZZLE_VERSION_ID,