Qore MysqlSqlUtil Module Reference: MysqlSqlUtil::MysqlColumn Class Reference

Qore MysqlSqlUtil Module Reference 1.0

- Main Page
- Related Pages
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | Public Attributes | List of all members
MysqlSqlUtil::MysqlColumn Class Reference

represents a MySQL-specific column More...

Inheritance diagram for MysqlSqlUtil::MysqlColumn:
[legend]

## Public Member Functions
private bool | equalImpl (AbstractColumn c)
| returns True if the argument is equal to the current object, False if not
softlist | getAddColumnSql (AbstractTable t)
| returns a list of sql strings that can be used to add the column to an existing table More...
string | getCreateSql (AbstractTable t)
| returns an sql string that can be used to add the column to a table
softlist | getModifySqlImpl (AbstractTable t, AbstractColumn col, *hash opt)
| returns a list of sql strings that can be used to modify the column to the new definition; if the column definitions are identical then an empty list is returned More...
string | getRenameSql (AbstractTable t, string new_name)
| returns a string that can be used to rename the column More...

## Public Attributes
int | byte_size
| byte size of the column

## Detailed Description

represents a MySQL-specific column

## Member Function Documentation

softlist MysqlSqlUtil::MysqlColumn::getAddColumnSql | ( | AbstractTable | t | ) |

returns a list of sql strings that can be used to add the column to an existing table

Example:
  my list $l = $col.getAddColumnSql($t);

Parameters

  t | the AbstractTable object to modify

softlist MysqlSqlUtil::MysqlColumn::getModifySqlImpl | ( | AbstractTable | t,
|  | AbstractColumn | col,
|  | *hash | opt
| ) |  |

returns a list of sql strings that can be used to modify the column to the new definition; if the column definitions are identical then an empty list is returned

Example:
  my list $l = $col.getModifySql($t, $newcol);

The column names are assumed to be equal.

Parameters

  t | the AbstractTable object to modify
  col | the new column definition

Returns
  a list of sql strings that can be used to modify the column to the new definition; if the column definitions are identical then an empty list is returned

string MysqlSqlUtil::MysqlColumn::getRenameSql | ( | AbstractTable | t,
|  | string | new_name
| ) |  |

returns a string that can be used to rename the column

Example:
  my string $str = $col.getRenameSql($t, "new_name");

Parameters

  t | the AbstractTable object to modify
  new_name | the new name for the column

Returns
  a string that can be used to rename the column