TrinityCore
|
Class used to access individual fields of database query result. More...
#include <Field.h>
Classes | |
struct | Metadata |
Public Member Functions | |
Field () | |
~Field () | |
bool | GetBool () const |
uint8 | GetUInt8 () const |
int8 | GetInt8 () const |
uint16 | GetUInt16 () const |
int16 | GetInt16 () const |
uint32 | GetUInt32 () const |
int32 | GetInt32 () const |
uint64 | GetUInt64 () const |
int64 | GetInt64 () const |
float | GetFloat () const |
double | GetDouble () const |
char const * | GetCString () const |
std::string | GetString () const |
std::vector< uint8 > | GetBinary () const |
bool | IsNull () const |
Protected Member Functions | |
void | SetByteValue (void *newValue, enum_field_types newType, uint32 length) |
void | SetStructuredValue (char *newValue, enum_field_types newType, uint32 length) |
void | CleanUp () |
bool | IsType (enum_field_types type) const |
bool | IsNumeric () const |
Static Protected Member Functions | |
static uint32 | SizeForType (MYSQL_FIELD *field) |
Protected Attributes | |
struct { | |
uint32 length | |
void * value | |
enum_field_types type | |
bool raw | |
} | data |
Friends | |
class | ResultSet |
class | PreparedResultSet |
Class used to access individual fields of database query result.
Guideline on field type matching:
MySQL type | method to use |
---|---|
TINYINT | GetBool, GetInt8, GetUInt8 |
SMALLINT | GetInt16, GetUInt16 |
MEDIUMINT, INT | GetInt32, GetUInt32 |
BIGINT | GetInt64, GetUInt64 |
FLOAT | GetFloat |
DOUBLE, DECIMAL | GetDouble |
CHAR, VARCHAR, | GetCString, GetString |
TINYTEXT, MEDIUMTEXT, | GetCString, GetString |
TEXT, LONGTEXT | GetCString, GetString |
TINYBLOB, MEDIUMBLOB, | GetBinary, GetString |
BLOB, LONGBLOB | GetBinary, GetString |
BINARY, VARBINARY | GetBinary |
Return types of aggregate functions:
Function | Type |
---|---|
MIN, MAX | Same as the field |
SUM, AVG | DECIMAL |
COUNT | BIGINT |
Field::Field | ( | ) |
Field::~Field | ( | ) |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
protected |
|
protected |
|
inlinestaticprotected |
|
friend |
|
friend |
struct { ... } Field::data |
uint32 Field::length |
bool Field::raw |
enum_field_types Field::type |
void* Field::value |