Qore XdbcFirebirdSqlUtilBase Module Reference 0.1
Loading...
Searching...
No Matches
XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn Class Reference

represents a XdbcFirebird-specific column More...

#include <XdbcFirebirdSqlUtilBase.qm.dox.h>

Inheritance diagram for XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn:
[legend]

Public Member Methods

 constructor (string name, string native_type, *string qore_type, int size, bool nullable, *string default_value, *string comment, *int scale)
 Creates the column.
 
softlist< string > getAddColumnSql (AbstractTable t)
 returns a list of sql strings that can be used to add the column to an existing table More...
 
string getDdlName (string name)
 returns the column name with quoting in case the column name is a reserved word More...
 
string getDropSql (string table_name)
 returns a string that can be used to drop the column from the table
 
softlist< string > getModifySqlImpl (AbstractTable t, AbstractColumn col, *hash< auto > opt)
 returns a list of sql strings that can be used to modify the column to the new definition More...
 
string getRenameSql (AbstractTable t, string new_name)
 returns a string that can be used to rename the column More...
 

Private Member Methods

 constructor ()
 empty constructor for subclasses
 
bool equalImpl (AbstractColumn c)
 returns True if the argument is equal to the current object, False if not
 

Detailed Description

represents a XdbcFirebird-specific column

Member Function Documentation

◆ getAddColumnSql()

softlist< string > XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn::getAddColumnSql ( AbstractTable  t)

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

Example:
list<string> l = col.getAddColumnSql(t);
Parameters
tthe AbstractTable object to modify

◆ getDdlName()

string XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn::getDdlName ( string  name)
virtual

returns the column name with quoting in case the column name is a reserved word

the name returned here will be used when executing DDL

Implements SqlUtil::AbstractDdlObject.

◆ getModifySqlImpl()

softlist< string > XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn::getModifySqlImpl ( AbstractTable  t,
AbstractColumn  col,
*hash< auto >  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

list<string> l = col.getModifySql(t, newcol);

The column names are assumed to be equal.

Parameters
tthe AbstractTable object to modify
colthe new column definition
optcolumn modification options (none are supported in this class)
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

◆ getRenameSql()

string XdbcFirebirdSqlUtilBase::XdbcFirebirdColumn::getRenameSql ( AbstractTable  t,
string  new_name 
)

returns a string that can be used to rename the column

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