Qore SqlUtil Module Reference 1.9.1
Loading...
Searching...
No Matches
SqlUtil::AbstractConstraint Class Referenceabstract

abstract base class for constraints More...

#include <SqlUtil.qm.dox.h>

Inheritance diagram for SqlUtil::AbstractConstraint:
[legend]

Public Member Methods

abstract clearIndex ()
 clears any index base for the constraint
 
 constructor (string n)
 creates the object and sets its name
 
bool equal (AbstractConstraint c)
 returns True if the argument is equal to the current object, False if not
 
abstract string getCreateSql (string table_name, *hash< auto > opt)
 returns a string that can be used to create the constraint in the database
 
string getDisableSql (string table_name)
 returns a string that can be used to temporarily disable the constraint from the database; if disabling constraints is not supported, then the constraint will be dropped
 
string getDropSql (string table_name)
 returns a string that can be used to drop the constraint from the database
 
string getEnableSql (string table_name, *hash< auto > opt)
 returns a string that can be used to enable the constraint in the database; if disabling constraints is not supported, then the constraint will be dropped
 
string getName ()
 returns the constraint name
 
abstract list< auto > getRenameSql (string table_name, string new_name)
 returns a list of SQL strings that can be used to rename the constraint in the database
 
bool hasColumn (string cname)
 returns True if the constraint references the named column
 
 rename (string n)
 renames the constraint
 
abstract bool setIndexBase (string ix)
 returns True if the object supports an index property and is set, False if not
 

Private Member Methods

abstract bool equalImpl (AbstractConstraint c)
 returns True if the argument is equal to the current object, False if not
 

Private Attributes

string name
 the name of the constraint
 

Detailed Description

abstract base class for constraints