A Class which represents ODBC SQLStates. More...
Public Member Functions
|const simba_char *||c_str () const|
|Get The C-String representation of this SQLState. |
|Clears the 'set' status of this SQLState. |
|bool||IsSet () const|
|Check whether this object is 'set'. |
|bool||operator< (const SQLState &in_other) const|
|Less-Than Operator. |
|SQLState &||operator= (const SQLState &in_other)|
|Assignment Operator. |
|bool||operator== (const SQLState &in_other) const|
|Equality Operator. |
|simba_char||operator (simba_size_t in_index) const|
|Subscripting Operator. |
|simba_size_t||size () const|
|Get the size of this SQLState as a string (always 5). |
|SQLState (const SQLState &in_sqlState)|
|Copy Constructor. |
|SQLState (DiagState in_diagState)|
|SQLState (const simba_string &in_sqlState)|
|SQLState (const simba_char *in_sqlState)|
Static Public Member Functions
|static SQLState||FromString (simba_string in_string)|
|'Lossy' factory function. |
A Class which represents ODBC SQLStates.
|in_sqlState||The 5-character SQLState this object will represent. (NOT OWN)|
|in_sqlState||The 5-character SQLState this object will represent.|
Convert a DiagState into an ODBC 3.X SQLState.
|in_diagState||The DiagState to convert.|
|in_sqlState||The SQLState to copy from.|
|const simba_char* c_str||(||)||const|
'Lossy' factory function.
This function creates a SQLState from a string which is allowed to be of any length. The algorithm it uses is to trim any whitespace from the beginning and end, then, with the remainder: 1) If there is less than 5 characters remaining, right-pad with '0'. 2) If there is more than 5 characters remaining, truncate and use the first 5. 3) If there is exactly 5 characters remaining, use them as is.
|in_string||The string to initialize the SQLState with.|
Check whether this object is 'set'.
A SQLState is considered set when constructed with a SQLState string or from another 'set' SQLState. If Clear() is called on a SQLState, it will be considered to not have been set, until a 'set' SQLState is assigned to it.
|bool operator<||(||const SQLState &||in_other||)|| const
|in_other||The SQLState to copy from.|
|bool operator==||(||const SQLState &||in_other||)|| const
Returns the character located at index in_index for this SQLState. Note: in_index MUST be between 0 and 4 inclusive.
Pre-Condition: IsSet() returns true. Otherwise the behaviour of this function is undefined.
|in_index||The index of the character of this SQLState to retrieve.|