261
266
enum TransformSqlError
262
267
transformDeleteHeaderToSql(const DeleteHeader &header,
263
std::string *destination,
268
std::string &destination,
264
269
enum TransformSqlVariant sql_variant= DRIZZLE);
272
* This function looks at a supplied DropTableStatement
273
* and constructs a correctly-formatted SQL
274
* statement to the supplied destination string.
276
* @param DropTableStatement message to transform
277
* @param Destination string to append SQL to
278
* @param Variation of SQL to generate
281
* NONE if successful transformation
283
* Error code (see enum TransformSqlError definition) if failure
285
enum TransformSqlError
286
transformDropTableStatementToSql(const DropTableStatement &statement,
287
std::string &destination,
288
enum TransformSqlVariant sql_variant= DRIZZLE);
267
291
* This function looks at a supplied TruncateTableStatement
268
292
* and constructs a correctly-formatted SQL
269
293
* statement to the supplied destination string.
280
304
enum TransformSqlError
281
305
transformTruncateTableStatementToSql(const TruncateTableStatement &statement,
282
std::string *destination,
306
std::string &destination,
283
307
enum TransformSqlVariant sql_variant= DRIZZLE);
310
* This function looks at a supplied CreateSchemaStatement
311
* and constructs a correctly-formatted SQL
312
* statement to the supplied destination string.
314
* @param CreateSchemaStatement message to transform
315
* @param Destination string to append SQL to
316
* @param Variation of SQL to generate
319
* NONE if successful transformation
321
* Error code (see enum TransformSqlError definition) if failure
323
enum TransformSqlError
324
transformCreateSchemaStatementToSql(const CreateSchemaStatement &statement,
325
std::string &destination,
326
enum TransformSqlVariant sql_variant= DRIZZLE);
329
* This function looks at a supplied DropSchemaStatement
330
* and constructs a correctly-formatted SQL
331
* statement to the supplied destination string.
333
* @param DropSchemaStatement message to transform
334
* @param Destination string to append SQL to
335
* @param Variation of SQL to generate
338
* NONE if successful transformation
340
* Error code (see enum TransformSqlError definition) if failure
342
enum TransformSqlError
343
transformDropSchemaStatementToSql(const DropSchemaStatement &statement,
344
std::string &destination,
345
enum TransformSqlVariant sql_variant= DRIZZLE);
286
348
* This function looks at a supplied SetVariableStatement
287
349
* and constructs a correctly-formatted SQL
288
350
* statement to the supplied destination string.
299
361
enum TransformSqlError
300
362
transformSetVariableStatementToSql(const SetVariableStatement &statement,
301
std::string *destination,
302
enum TransformSqlVariant sql_variant= DRIZZLE);
363
std::string &destination,
364
enum TransformSqlVariant sql_variant= DRIZZLE);
367
* Appends to supplied string an SQL expression
368
* containing the supplied CreateTableStatement's
369
* appropriate CREATE TABLE SQL statement.
371
enum TransformSqlError
372
transformCreateTableStatementToSql(const CreateTableStatement &statement,
373
std::string &destination,
374
enum TransformSqlVariant sql_variant= DRIZZLE);
377
* Appends to the supplied string an SQL expression
378
* representing the table for a CREATE TABLE expression.
380
* @param[in] Table message
381
* @param[out] String to append to
384
* NONE if successful transformation
386
* Error code (see enum TransformSqlError definition) if failure
388
enum TransformSqlError
389
transformTableDefinitionToSql(const Table &table,
390
std::string &destination,
391
enum TransformSqlVariant sql_variant= DRIZZLE);
394
* Appends to the supplied string an SQL expression
395
* representing the table's optional attributes.
399
* This function will eventually be a much simpler
400
* listing of key/value pairs.
402
* @param[in] TableOptions 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
transformTableOptionsToSql(const Table::TableOptions &table_options,
412
std::string &destination,
413
enum TransformSqlVariant sql_variant= DRIZZLE);
416
* Appends to the supplied string an SQL expression
417
* representing the index's attributes. The built string
418
* corresponds to the SQL in a CREATE INDEX statement.
420
* @param[in] Index message
421
* @param[in] Table containing this index (used to get field names...)
422
* @param[out] String to append to
425
* NONE if successful transformation
427
* Error code (see enum TransformSqlError definition) if failure
429
enum TransformSqlError
430
transformIndexDefinitionToSql(const Table::Index &index,
432
std::string &destination,
433
enum TransformSqlVariant sql_variant= DRIZZLE);
436
* Appends to the supplied string an SQL expression
437
* representing the field's attributes. The built string
438
* corresponds to the SQL in a CREATE TABLE statement.
440
* @param[in] Field message
441
* @param[out] String to append to
444
* NONE if successful transformation
446
* Error code (see enum TransformSqlError definition) if failure
448
enum TransformSqlError
449
transformFieldDefinitionToSql(const Table::Field &field,
450
std::string &destination,
451
enum TransformSqlVariant sql_variant= DRIZZLE);
306
454
* Returns true if the supplied message::Table::Field::FieldType