~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_schema.h

  • Committer: Stewart Smith
  • Date: 2010-03-02 06:41:59 UTC
  • mto: (1309.2.13 build)
  • mto: This revision was merged to the branch mainline in revision 1318.
  • Revision ID: stewart@flamingspork.com-20100302064159-gktw6hcbs3u0fflm
move Item_result out to its own header file and out of common.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <drizzled/statement.h>
25
25
#include <drizzled/message/schema.pb.h>
26
 
#include <uuid/uuid.h>
27
26
 
28
27
namespace drizzled
29
28
{
34
33
 
35
34
class CreateSchema : public Statement
36
35
{
37
 
  bool check(const SchemaIdentifier &identifier);
38
 
 
39
36
public:
40
 
  CreateSchema(Session *in_session) :
41
 
    Statement(in_session),
42
 
    is_if_not_exists(false)
 
37
  CreateSchema(Session *in_session)
 
38
    :
 
39
      Statement(in_session),
 
40
      is_if_not_exists(false)
43
41
  {
44
 
    schema_message.set_creation_timestamp(time(NULL));
45
 
    schema_message.set_update_timestamp(time(NULL));
46
 
 
47
 
    /* 36 characters for uuid string +1 for NULL */
48
 
    uuid_t uu;
49
 
    char uuid_string[37];
50
 
    uuid_generate_random(uu);
51
 
    uuid_unparse(uu, uuid_string);
52
 
    schema_message.set_uuid(uuid_string, 36);
53
 
 
54
 
    schema_message.set_version(1);
55
42
  }
56
43
 
57
44
  bool execute();
58
45
  bool is_if_not_exists;
59
46
  message::Schema schema_message;
60
 
 
61
 
  bool validateSchemaOptions();
62
47
};
63
48
 
64
49
} /* end namespace statement */