Qore SqlUtil Module Reference 1.9
Loading...
Searching...
No Matches
SqlUtil::ForeignConstraints Class Reference

foreign constraint container class that throws an exception if an unknown constraint is accessed More...

#include <SqlUtil.qm.dox.h>

Inheritance diagram for SqlUtil::ForeignConstraints:
[legend]

Public Member Methods

 add (string k, AbstractForeignConstraint val)
 adds the given value to the hash with the given key name
 
*hash< auto > findConstraintOn (string table, softlist< auto > cols)
 returns either a hash of AbstractColumn information or NOTHING if no foreign constraint can be found that matches the arguments
 
*AbstractForeignConstraint findEqual (AbstractForeignConstraint fk)
 find an index with columns equal to the index passed
 
string getElementName ()
 returns "foreign constraint" for the type of object encapsulated
 
AbstractForeignConstraint memberGate (string k)
 returns the AbstractForeignConstraint object corresponding to the key given or throws a KEY-ERROR exception More...
 
AbstractForeignConstraint take (string k)
 removes the given key from the contained hash and returns the value
 
- Public Member Methods inherited from SqlUtil::AbstractHashContainer
 clear ()
 purges the contained data More...
 
 constructor (*hash nh)
 creates the object with the hash argument passed
 
 constructor (AbstractHashContainer old)
 creates a copy of the object
 
 copy (AbstractHashContainer old)
 creates a "deep copy" of the object
 
bool empty ()
 returns True if the container is empty, False if not
 
*string firstKey ()
 Returns the first key name in the contained hash or NOTHING if the contained hash has no keys. More...
 
abstract string getElementName ()
 must return the name of the contained element
 
*hash< auto > getHash ()
 returns the hash contained by this object
 
bool hasKey (string k)
 Returns True if the key exists in the contained hash (may or may not be assigned a value), False if not. More...
 
bool hasKeyValue (string k)
 Returns True if the key exists in the contained hash and is assigned a value, False if not. More...
 
Qore::AbstractIterator iterator ()
 Returns a HashIterator object for the contained hash. More...
 
Qore::AbstractIterator keyIterator ()
 Returns a HashKeyIterator object for the contained hash. More...
 
list< string > keys ()
 Returns a list of key names of the contained hash. More...
 
*string lastKey ()
 Returns the last key name in the contained hash or NOTHING if the contained hash has no keys. More...
 
bool matchKeys (AbstractHashContainer c)
 returns True if the container argument has the same keys (in any order), False if not More...
 
bool matchKeys (hash h1)
 returns True if the hash argument has the same keys (in any order), False if not More...
 
bool matchKeys (list< auto > l)
 returns True if the list<auto> argument has the same list of key strings as the keys in the object (in any order), False if not More...
 
auto memberGate (string k)
 returns the value of the given key in the contained hash if it exists, otherwise throws a KEY-ERROR exception More...
 
Qore::AbstractIterator pairIterator ()
 Returns a HashPairIterator object for the contained hash. More...
 
bool partialMatchKeys (AbstractHashContainer c)
 returns True if the container argument has at least the same keys (in any order, can have more keys), False if not More...
 
bool partialMatchKeys (hash h1)
 returns True if the hash argument has at least the same keys (in any order, can have more keys), False if not More...
 
bool partialMatchKeys (list< auto > l)
 returns True if the list<auto> argument has at least the same keys (in any order, can have more keys), False if not More...
 
 renameKey (string old_name, string new_name)
 renames the given key; maintains the key order
 
int size ()
 Returns the number of keys in the contained hash. More...
 
abstract auto take (string k)
 removes the given key from the contained hash and returns the value
 
bool val ()
 Returns False if the contained hash has no keys, True if it does. More...
 
list< auto > values ()
 Returns a list of values of the contained hash. More...
 

Additional Inherited Members

- Private Attributes inherited from SqlUtil::AbstractHashContainer
*hash h
 the data to be contained
 

Detailed Description

foreign constraint container class that throws an exception if an unknown constraint is accessed

Member Function Documentation

◆ memberGate()

AbstractForeignConstraint SqlUtil::ForeignConstraints::memberGate ( string  k)

returns the AbstractForeignConstraint object corresponding to the key given or throws a KEY-ERROR exception

Example:
AbstractForeignConstraint ix = fcs.fk_jobs_job_defs;
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