~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/statement_transform.h

  • Committer: Olaf van der Spek
  • Date: 2011-03-23 10:31:37 UTC
  • mto: (2247.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 2248.
  • Revision ID: olafvdspek@gmail.com-20110323103137-lwevis2tfchgu18u
Propogate return void

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 * Transaction messages to other formats, including SQL statements.
30
30
 */
31
31
 
32
 
#ifndef DRIZZLED_MESSAGE_STATEMENT_TRANSFORM_H
33
 
#define DRIZZLED_MESSAGE_STATEMENT_TRANSFORM_H
 
32
#pragma once
34
33
 
35
34
#include <drizzled/message/table.pb.h>
36
35
#include <string>
37
36
#include <vector>
38
37
 
39
 
#include "drizzled/common.h"
 
38
#include <drizzled/common.h>
40
39
 
41
40
namespace drizzled
42
41
{
59
58
class TruncateTableStatement;
60
59
class CreateSchemaStatement;
61
60
class DropSchemaStatement;
 
61
class AlterSchemaStatement;
62
62
class SetVariableStatement;
63
63
 
64
64
/** A Variation of SQL to be output during transformation */
75
75
{
76
76
  NONE= 0,
77
77
  MISSING_HEADER= 1, /* A data segment without a header segment was found */
78
 
  MISSING_DATA= 2 /* A header segment without a data segment was found */
 
78
  MISSING_DATA= 2,   /* A header segment without a data segment was found */
 
79
  UUID_MISMATCH= 3
79
80
};
80
81
 
81
82
/**
346
347
                                  enum TransformSqlVariant sql_variant= DRIZZLE);
347
348
 
348
349
/**
 
350
 * This function looks at a supplied AlterSchemaStatement
 
351
 * and constructs a correctly-formatted SQL
 
352
 * statement to the supplied destination string.
 
353
 *
 
354
 * @param AlterSchemaStatement message to transform
 
355
 * @param Destination string to append SQL to
 
356
 * @param Variation of SQL to generate
 
357
 *
 
358
 * @retval
 
359
 *  NONE if successful transformation
 
360
 * @retval
 
361
 *  Error code (see enum TransformSqlError definition) if failure
 
362
 */
 
363
enum TransformSqlError
 
364
transformAlterSchemaStatementToSql(const AlterSchemaStatement &statement,
 
365
                                   std::string &destination,
 
366
                                   enum TransformSqlVariant sql_variant= DRIZZLE);
 
367
 
 
368
/**
349
369
 * This function looks at a supplied SetVariableStatement
350
370
 * and constructs a correctly-formatted SQL
351
371
 * statement to the supplied destination string.
494
514
} /* namespace message */
495
515
} /* namespace drizzled */
496
516
 
497
 
#endif /* DRIZZLED_MESSAGE_STATEMENT_TRANSFORM_H */