All Classes Namespaces Functions Variables Groups Pages
OracleSqlUtil::OracleColumn Class Reference

represents an Oracle column More...

Inheritance diagram for OracleSqlUtil::OracleColumn:
[legend]

## Public Member Functions

bool | equalImpl (AbstractColumn c)
| returns True if the argument is equal to the current object, False if not
list | getCreateSql (AbstractTable t)
| returns a list of sql strings that can be used to add the column to an existing table More...
list | 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 | getNativeTypeString ()
| returns the string describing the native type that can be used in SQL (for example to add the colunn to a table or when creating the table)
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
bool | char_used
| the column uses character semantics

## Detailed Description

represents an Oracle column

## Member Function Documentation

list OracleSqlUtil::OracleColumn::getCreateSql | ( | 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.getCreateSql($t);

Parameters

  t | the AbstractTable object to modify

list OracleSqlUtil::OracleColumn::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

string OracleSqlUtil::OracleColumn::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