28
28
#include <drizzled/message/table.pb.h>
29
29
#include "drizzled/plugin/plugin.h"
30
30
#include "drizzled/sql_string.h"
31
#include "drizzled/schema_identifier.h"
31
32
#include "drizzled/table_identifier.h"
32
33
#include "drizzled/cached_directory.h"
33
34
#include "drizzled/plugin/monitored_in_transaction.h"
325
327
static int dropTable(Session& session,
326
328
StorageEngine &engine,
327
329
TableIdentifier &identifier);
328
static void getTableNames(Session &session, const std::string& db_name, TableNameList &set_of_names);
330
static void getTableNames(Session &session, drizzled::SchemaIdentifier& schema_identifier, TableNameList &set_of_names);
330
332
// Check to see if any SE objects to creation.
331
333
static bool canCreateTable(drizzled::TableIdentifier &identifier);
332
virtual bool doCanCreateTable(const drizzled::TableIdentifier &identifier)
334
virtual bool doCanCreateTable(drizzled::TableIdentifier &identifier)
333
335
{ (void)identifier; return true; }
335
337
// @note All schema methods defined here
336
static void getSchemaNames(Session &session, SchemaNameList &set_of_names);
338
static void getSchemaIdentifiers(Session &session, SchemaIdentifierList &schemas);
337
339
static bool getSchemaDefinition(TableIdentifier &identifier, message::Schema &proto);
338
static bool getSchemaDefinition(const std::string &schema_name, message::Schema &proto);
339
static bool doesSchemaExist(const std::string &schema_name);
340
static bool doesSchemaExist(TableIdentifier &identifier);
341
static const CHARSET_INFO *getSchemaCollation(const std::string &schema_name);
340
static bool getSchemaDefinition(drizzled::SchemaIdentifier &identifier, message::Schema &proto);
341
static bool doesSchemaExist(drizzled::SchemaIdentifier &identifier);
342
static const CHARSET_INFO *getSchemaCollation(drizzled::SchemaIdentifier &identifier);
342
343
static bool createSchema(const drizzled::message::Schema &schema_message);
343
static bool dropSchema(const std::string &schema_name);
344
static bool dropSchema(drizzled::SchemaIdentifier &identifier);
344
345
static bool alterSchema(const drizzled::message::Schema &schema_message);
346
347
// @note make private/protected
347
virtual void doGetSchemaNames(SchemaNameList &set_of_names)
348
{ (void)set_of_names; }
348
virtual void doGetSchemaIdentifiers(SchemaIdentifierList&)
350
virtual bool doGetSchemaDefinition(const std::string &schema_name, drizzled::message::Schema &proto)
351
virtual bool doGetSchemaDefinition(drizzled::SchemaIdentifier&, drizzled::message::Schema&)
358
virtual bool doCreateSchema(const drizzled::message::Schema &schema_message)
359
{ (void)schema_message; return false; }
361
virtual bool doAlterSchema(const drizzled::message::Schema &schema_message)
362
{ (void)schema_message; return false; }
364
virtual bool doDropSchema(const std::string &schema_name)
365
{ (void)schema_name; return false; }
356
virtual bool doCreateSchema(const drizzled::message::Schema&)
359
virtual bool doAlterSchema(const drizzled::message::Schema&)
362
virtual bool doDropSchema(drizzled::SchemaIdentifier&)
367
365
static inline const std::string &resolveName(const StorageEngine *engine)