Qore MysqlSqlUtil Module Reference  1.0
 All Classes Namespaces Functions Variables Groups Pages
MysqlSqlUtil::MysqlPrimaryKey Class Reference

represents a MySQL-specific primary key constraint More...

Inheritance diagram for MysqlSqlUtil::MysqlPrimaryKey:

Public Member Functions

string getDropSql (string table_name)
 returns a string that can be used to drop the constraint from the database
 
softlist getRenameSql (string table_name, string new_name)
 primary keys have no name in MySQL so this method returns an empty list
 
MysqlColumn memberGate (string k)
 returns the MysqlColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception More...
 
bool supportsName ()
 returns False since primary key constraints in MySQL have no name
 
- Public Member Functions inherited from MysqlSqlUtil::MysqlUniqueConstraintCommon
 clearIndex ()
 clears any index base for the constraint
 
 getIndexSql (reference sql, string name, *hash opts)
 adds index options onto the sql creation string
 

Detailed Description

represents a MySQL-specific primary key constraint

Member Function Documentation

MysqlColumn MysqlSqlUtil::MysqlPrimaryKey::memberGate ( string  k)

returns the MysqlColumn value of the given key if it exists, otherwise throws a KEY-ERROR exception

Example:
my any $v = $c.name;
Parameters
kthe name of the key to access
Returns
the value of the given key in the contained hash if it exists
Exceptions
KEY-ERRORthe given key does not exist in the contained hash
Note
this method is called automatically when an unknown or inaccessible member name is accessed from outside the class
See Also
memberGate_methods