Qore SqlUtil Module Reference  1.5.2
SqlUtil::AbstractIndex Class Referenceabstract

the abstract base class for index information More...

Inherits Serializable.

Public Member Methods

 constructor (string n, bool u, hash c)
 creates the object from the name, a unique flag, and a hash of column information
 
bool equal (AbstractIndex ix)
 returns True if the argument is equal to the current index, False if not
 
bool equalExceptName (AbstractIndex ix)
 returns True if the argument is equal to the current index with the exception of the name, False if not
 
abstract bool equalImpl (AbstractIndex ix)
 returns True if the argument is equal to the current index, False if not
 
abstract string getCreateSql (string table_name, *hash< auto > opt)
 returns a string that can be used to create the index in the database
 
string getDropSql (string table_name)
 returns a string that can be used to drop the index from the database
 
string getName ()
 returns the index name
 
list< auto > getRecreateSql (AbstractDatasource ds, string table_name, *hash< auto > opt)
 returns a list of strings to drop and recreate the current index; if there are dependent constraints, the list contains commands to disable the constraints before dropping the index and also contains commands to re-enable the contraints after re-creating the index
 
abstract string getRenameSql (string table_name, string new_name)
 returns a string that can be used to rename the index in the database
 
*AbstractColumnSupportingConstraint getSupportingConstraint ()
 returns the supporting constraint, if any
 
bool hasColumn (string cname)
 returns True if the constraint references the named column
 
 setSupportingConstraint (AbstractColumnSupportingConstraint c)
 tags the index with a column supporting constraint (unique or fk constraint, etc) that the index supports
 
 setSupportingConstraint ()
 clears the supporting constraint
 

Public Attributes

Columns columns
 an object of class Columns representing the columns in the index
 
string name
 the name of the index
 
bool unique
 True if the index is a unique index, False if not
 

Private Attributes

*AbstractColumnSupportingConstraint constraint
 the AbstractColumnSupportingConstraint that this index supports, if any
 

Detailed Description

the abstract base class for index information