~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.h

  • Committer: Andrew Hutchings
  • Date: 2011-02-01 10:23:22 UTC
  • mto: (2136.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2137.
  • Revision ID: andrew@linuxjedi.co.uk-20110201102322-oxztcyrjzg3c7yta
Fix counters cleanup

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
 
#pragma once
 
21
#ifndef DRIZZLED_STATEMENT_CREATE_SCHEMA_H
 
22
#define DRIZZLED_STATEMENT_CREATE_SCHEMA_H
22
23
 
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
 
namespace statement {
 
28
namespace drizzled
 
29
{
 
30
class Session;
 
31
 
 
32
namespace statement
 
33
{
30
34
 
31
35
class CreateSchema : public Statement
32
36
{
 
37
  bool check(const identifier::Schema &identifier);
 
38
 
33
39
public:
34
40
  CreateSchema(Session *in_session) :
35
41
    Statement(in_session),
36
42
    is_if_not_exists(false)
37
43
  {
38
 
    set_command(SQLCOM_CREATE_DB);
 
44
    getSession()->getLex()->sql_command=SQLCOM_CREATE_DB;
39
45
  }
40
46
 
41
47
  bool execute();
43
49
  message::Schema schema_message;
44
50
 
45
51
  bool validateSchemaOptions();
46
 
private:
47
 
  bool check(const identifier::Schema &identifier);
48
52
};
49
53
 
50
54
} /* end namespace statement */
 
55
 
51
56
} /* end namespace drizzled */
52
57
 
 
58
#endif /* DRIZZLED_STATEMENT_CREATE_SCHEMA_H */