Qore MysqlSqlUtil Module Reference  1.4.1
MysqlSqlUtil::MysqlPrimaryKey Class Reference

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

Inheritance diagram for MysqlSqlUtil::MysqlPrimaryKey:

Public Member Methods

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
 

Detailed Description

represents a MySQL-specific primary key constraint

Member Function Documentation

◆ memberGate()

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

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

Example:
auto 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() Method