![]() |
Qore SqlUtil Module Reference 1.9.2
|
abstract container class that throws an exception if an unknown key is accessed More...
#include <SqlUtil.qm.dox.h>
Public Member Functions | |
| clear () | |
| purges the contained data | |
| 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. | |
| 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. | |
| bool | hasKeyValue (string k) |
| Returns True if the key exists in the contained hash and is assigned a value, False if not. | |
| Qore::AbstractIterator | iterator () |
| Returns a HashIterator object for the contained hash. | |
| Qore::AbstractIterator | keyIterator () |
| Returns a HashKeyIterator object for the contained hash. | |
| list< string > | keys () |
| Returns a list of key names of the contained hash. | |
| *string | lastKey () |
| Returns the last key name in the contained hash or nothing if the contained hash has no keys. | |
| bool | matchKeys (AbstractHashContainer c) |
| returns True if the container argument has the same keys (in any order), False if not | |
| bool | matchKeys (hash h1) |
| returns True if the hash argument has the same keys (in any order), False if not | |
| 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 | |
| auto | memberGate (string k) |
returns the value of the given key in the contained hash if it exists, otherwise throws a KEY-ERROR exception | |
| Qore::AbstractIterator | pairIterator () |
| Returns a HashPairIterator object for the contained hash. | |
| 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 | |
| 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 | |
| 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 | |
| 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. | |
| 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. | |
| list< auto > | values () |
| Returns a list of values of the contained hash. | |
Protected Attributes | |
| *hash | h |
| the data to be contained | |
abstract container class that throws an exception if an unknown key is accessed
| SqlUtil::AbstractHashContainer::clear | ( | ) |
purges the contained data
| *string SqlUtil::AbstractHashContainer::firstKey | ( | ) |
Returns the first key name in the contained hash or nothing if the contained hash has no keys.
| bool SqlUtil::AbstractHashContainer::hasKey | ( | string | k | ) |
Returns True if the key exists in the contained hash (may or may not be assigned a value), False if not.
| k | the key name to check |
| bool SqlUtil::AbstractHashContainer::hasKeyValue | ( | string | k | ) |
Returns True if the key exists in the contained hash and is assigned a value, False if not.
| k | the key name to check |
| Qore::AbstractIterator SqlUtil::AbstractHashContainer::iterator | ( | ) |
Returns a HashIterator object for the contained hash.
| Qore::AbstractIterator SqlUtil::AbstractHashContainer::keyIterator | ( | ) |
Returns a HashKeyIterator object for the contained hash.
| list< string > SqlUtil::AbstractHashContainer::keys | ( | ) |
Returns a list of key names of the contained hash.
| *string SqlUtil::AbstractHashContainer::lastKey | ( | ) |
Returns the last key name in the contained hash or nothing if the contained hash has no keys.
| bool SqlUtil::AbstractHashContainer::matchKeys | ( | AbstractHashContainer | c | ) |
returns True if the container argument has the same keys (in any order), False if not
| c | the container to compare |
| bool SqlUtil::AbstractHashContainer::matchKeys | ( | hash | h1 | ) |
returns True if the hash argument has the same keys (in any order), False if not
| h1 | the hash to compare |
| bool SqlUtil::AbstractHashContainer::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
| l | the hash to compare |
| auto SqlUtil::AbstractHashContainer::memberGate | ( | string | k | ) |
returns the value of the given key in the contained hash if it exists, otherwise throws a KEY-ERROR exception
| k | the name of the key to access |
| KEY-ERROR | the given key does not exist in the contained hash |
| Qore::AbstractIterator SqlUtil::AbstractHashContainer::pairIterator | ( | ) |
Returns a HashPairIterator object for the contained hash.
| bool SqlUtil::AbstractHashContainer::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
| c | the container to compare |
| bool SqlUtil::AbstractHashContainer::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
| h1 | the hash to compare |
| bool SqlUtil::AbstractHashContainer::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
| l | the list of strings to compare |
| int SqlUtil::AbstractHashContainer::size | ( | ) |
Returns the number of keys in the contained hash.
| bool SqlUtil::AbstractHashContainer::val | ( | ) |
Returns False if the contained hash has no keys, True if it does.
The opposite of empty()
| list< auto > SqlUtil::AbstractHashContainer::values | ( | ) |
Returns a list of values of the contained hash.