269
259
enum TransformSqlError
270
260
transformDeleteHeaderToSql(const DeleteHeader &header,
271
std::string &destination,
261
std::string *destination,
272
262
enum TransformSqlVariant sql_variant= DRIZZLE);
275
* This function looks at a supplied DropTableStatement
276
* and constructs a correctly-formatted SQL
277
* statement to the supplied destination string.
279
* @param DropTableStatement message to transform
280
* @param Destination string to append SQL to
281
* @param Variation of SQL to generate
284
* NONE if successful transformation
286
* Error code (see enum TransformSqlError definition) if failure
288
enum TransformSqlError
289
transformDropTableStatementToSql(const DropTableStatement &statement,
290
std::string &destination,
291
enum TransformSqlVariant sql_variant= DRIZZLE);
294
265
* This function looks at a supplied TruncateTableStatement
295
266
* and constructs a correctly-formatted SQL
296
267
* statement to the supplied destination string.
307
278
enum TransformSqlError
308
279
transformTruncateTableStatementToSql(const TruncateTableStatement &statement,
309
std::string &destination,
280
std::string *destination,
310
281
enum TransformSqlVariant sql_variant= DRIZZLE);
313
* This function looks at a supplied CreateSchemaStatement
314
* and constructs a correctly-formatted SQL
315
* statement to the supplied destination string.
317
* @param CreateSchemaStatement message to transform
318
* @param Destination string to append SQL to
319
* @param Variation of SQL to generate
322
* NONE if successful transformation
324
* Error code (see enum TransformSqlError definition) if failure
326
enum TransformSqlError
327
transformCreateSchemaStatementToSql(const CreateSchemaStatement &statement,
328
std::string &destination,
329
enum TransformSqlVariant sql_variant= DRIZZLE);
332
* This function looks at a supplied DropSchemaStatement
333
* and constructs a correctly-formatted SQL
334
* statement to the supplied destination string.
336
* @param DropSchemaStatement message to transform
337
* @param Destination string to append SQL to
338
* @param Variation of SQL to generate
341
* NONE if successful transformation
343
* Error code (see enum TransformSqlError definition) if failure
345
enum TransformSqlError
346
transformDropSchemaStatementToSql(const DropSchemaStatement &statement,
347
std::string &destination,
348
enum TransformSqlVariant sql_variant= DRIZZLE);
351
* This function looks at a supplied AlterSchemaStatement
352
* and constructs a correctly-formatted SQL
353
* statement to the supplied destination string.
355
* @param AlterSchemaStatement message to transform
356
* @param Destination string to append SQL to
357
* @param Variation of SQL to generate
360
* NONE if successful transformation
362
* Error code (see enum TransformSqlError definition) if failure
364
enum TransformSqlError
365
transformAlterSchemaStatementToSql(const AlterSchemaStatement &statement,
366
std::string &destination,
367
enum TransformSqlVariant sql_variant= DRIZZLE);
370
284
* This function looks at a supplied SetVariableStatement
371
285
* and constructs a correctly-formatted SQL
372
286
* statement to the supplied destination string.
383
297
enum TransformSqlError
384
298
transformSetVariableStatementToSql(const SetVariableStatement &statement,
385
std::string &destination,
386
enum TransformSqlVariant sql_variant= DRIZZLE);
389
* Appends to supplied string an SQL expression
390
* containing the supplied CreateTableStatement's
391
* appropriate CREATE TABLE SQL statement.
393
enum TransformSqlError
394
transformCreateTableStatementToSql(const CreateTableStatement &statement,
395
std::string &destination,
396
enum TransformSqlVariant sql_variant= DRIZZLE);
399
* Appends to the supplied string an SQL expression
400
* representing the table for a CREATE TABLE expression.
402
* @param[in] Table message
403
* @param[out] String to append to
406
* NONE if successful transformation
408
* Error code (see enum TransformSqlError definition) if failure
410
enum TransformSqlError
411
transformTableDefinitionToSql(const Table &table,
412
std::string &destination,
413
enum TransformSqlVariant sql_variant= DRIZZLE,
414
bool with_schema= true);
417
* Appends to the supplied string an SQL expression
418
* representing the table's optional attributes.
422
* This function will eventually be a much simpler
423
* listing of key/value pairs.
425
* @param[in] TableOptions message
426
* @param[out] String to append to
429
* NONE if successful transformation
431
* Error code (see enum TransformSqlError definition) if failure
433
enum TransformSqlError
434
transformTableOptionsToSql(const Table::TableOptions &table_options,
435
std::string &destination,
436
enum TransformSqlVariant sql_variant= DRIZZLE);
439
* Appends to the supplied string an SQL expression
440
* representing the index's attributes. The built string
441
* corresponds to the SQL in a CREATE INDEX statement.
443
* @param[in] Index message
444
* @param[in] Table containing this index (used to get field names...)
445
* @param[out] String to append to
448
* NONE if successful transformation
450
* Error code (see enum TransformSqlError definition) if failure
452
enum TransformSqlError
453
transformIndexDefinitionToSql(const Table::Index &index,
455
std::string &destination,
456
enum TransformSqlVariant sql_variant= DRIZZLE);
459
* Appends to the supplied string an SQL expression
460
* representing the foreign key attributes. The built string
461
* corresponds to the SQL in a CREATE TABLE statement.
463
* @param[in] Foreign Key Constraint message
464
* @param[in] Table containing this foregin key (used to get field names...)
465
* @param[out] String to append to
468
* NONE if successful transformation
470
* Error code (see enum TransformSqlError definition) if failure
472
enum TransformSqlError
473
transformForeignKeyConstraintDefinitionToSql(const Table::ForeignKeyConstraint &fkey,
475
std::string &destination,
476
enum TransformSqlVariant sql_variant = DRIZZLE);
479
* Appends to the supplied string an SQL expression
480
* representing the field's attributes. The built string
481
* corresponds to the SQL in a CREATE TABLE statement.
483
* @param[in] Field message
484
* @param[out] String to append to
487
* NONE if successful transformation
489
* Error code (see enum TransformSqlError definition) if failure
491
enum TransformSqlError
492
transformFieldDefinitionToSql(const Table::Field &field,
493
std::string &destination,
494
enum TransformSqlVariant sql_variant= DRIZZLE);
299
std::string *destination,
300
enum TransformSqlVariant sql_variant= DRIZZLE);
497
304
* Returns true if the supplied message::Table::Field::FieldType