Qore FreetdsSqlUtil Module Reference  1.1
FreetdsSqlUtil::FreetdsColumn Class Reference

represents a FreeTDS-specific column More...

Inheritance diagram for FreetdsSqlUtil::FreetdsColumn:

Public Member Functions

 constructor (string n, string nt, *string qt, int sz, bool nul, *string dv, *string cm, softint bs)
 creates the column from the supplied arguments
 
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...
 
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 a string giving the native type of the column
 
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 FreeTDS-specific column

Member Function Documentation

softlist FreetdsSqlUtil::FreetdsColumn::getAddColumnSql ( AbstractTable  t)

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

Example:
1 my list $l = $col.getAddColumnSql($t);
Parameters
tthe SqlUtil::AbstractTable object to modify
list FreetdsSqlUtil::FreetdsColumn::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:
1 my list $l = $col.getModifySql($t, $newcol);

The column names are assumed to be equal.

Parameters
tthe SqlUtil::AbstractTable object to modify
colthe 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 FreetdsSqlUtil::FreetdsColumn::getRenameSql ( AbstractTable  t,
string  new_name 
)

returns a string that can be used to rename the column

Example:
1 my string $str = $col.getRenameSql($t, "new_name");
Parameters
tthe SqlUtil::AbstractTable object to modify
new_namethe new name for the column
Returns
a string that can be used to rename the column