~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.h

  • Committer: patrick crews
  • Date: 2011-03-15 12:12:09 UTC
  • mfrom: (1099.4.216 drizzle)
  • Revision ID: gleebix@gmail.com-20110315121209-8g2tkf31w0rx9ter
Tags: 2011.03.12
Updated translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#ifndef DRIZZLED_STATEMENT_CREATE_SCHEMA_H
22
 
#define DRIZZLED_STATEMENT_CREATE_SCHEMA_H
 
21
#pragma once
23
22
 
 
23
#include <drizzled/session.h>
24
24
#include <drizzled/statement.h>
25
25
#include <drizzled/message/schema.pb.h>
26
26
#include <uuid/uuid.h>
27
27
 
28
 
namespace drizzled
29
 
{
30
 
class Session;
31
 
 
32
 
namespace statement
33
 
{
 
28
namespace drizzled {
 
29
namespace statement {
34
30
 
35
31
class CreateSchema : public Statement
36
32
{
37
 
  bool check(const identifier::Schema &identifier);
38
 
 
39
33
public:
40
34
  CreateSchema(Session *in_session) :
41
35
    Statement(in_session),
42
36
    is_if_not_exists(false)
43
37
  {
44
 
    getSession()->getLex()->sql_command=SQLCOM_CREATE_DB;
 
38
    set_command(SQLCOM_CREATE_DB);
45
39
  }
46
40
 
47
41
  bool execute();
49
43
  message::Schema schema_message;
50
44
 
51
45
  bool validateSchemaOptions();
 
46
private:
 
47
  bool check(const identifier::Schema &identifier);
52
48
};
53
49
 
54
50
} /* end namespace statement */
55
 
 
56
51
} /* end namespace drizzled */
57
52
 
58
 
#endif /* DRIZZLED_STATEMENT_CREATE_SCHEMA_H */