#include <SQL.h>
Definition at line 208 of file SQL.h.
◆ SQLFields()
◆ ~SQLFields()
SQLFields::~SQLFields |
( |
| ) |
|
|
protectedvirtual |
◆ at()
Definition at line 79 of file SQL.inl.
80{
83 return __fields[_index];
84}
#define __DCL_ASSERT_PARAM(expr)
◆ byName()
Definition at line 77 of file SQLQuery.cpp.
79{
82
83 SQLField* _field =
NULL;
84
85 if (__count >= 7) {
86 if (__fieldMap.isEmpty()) {
87 __fieldMap.initBuckets(__count);
88 for(size_t i = 0; i < __count; i++)
89 __fieldMap[__fields[i].name()] = &__fields[i];
90 }
91 _field = (SQLField*)(__fieldMap[_name]);
92 }
93 else {
94 for(size_t i = 0; i < __count; i++) {
95
96 if (String::compare(__fields[i].name(), _name) == 0) {
97 _field = &__fields[i];
98 break;
99 }
100 }
101 }
102
103 if (_field ==
NULL) {
104 throw new InvalidIndexException(_name);
105 }
106
107 return *_field;
108}
#define __DCL_ASSERT(expr)
◆ clear()
void SQLFields::clear |
( |
| ) |
|
|
protected |
Definition at line 41 of file SQLQuery.cpp.
42{
43 if (__fields) {
45 delete[] __fields;
47 __count = 0;
48 }
49 __fieldMap.clear();
50}
◆ count()
size_t SQLFields::count |
( |
| ) |
const |
|
inline |
Definition at line 93 of file SQL.inl.
94{
95 return __count;
96}
◆ initialize()
void SQLFields::initialize |
( |
SQLQuery * | _query | ) |
|
|
protected |
Definition at line 52 of file SQLQuery.cpp.
54{
55 SQL::Query* hQuery = _query->
handle();
56
59
61
62 __count = hQuery->fieldCount();
63 __fields = new SQLField[__count];
65
66 SQLField* _field =
NULL;
67 for(size_t i = 0; i < hQuery->fieldCount(); i++) {
68 _field = &(__fields[i]);
70 if (!hQuery->getField(i, &(_field->
__handle))) {
71 throw new SQLException(_query);
72 }
73 }
74}
SQL::Query * handle() const
◆ isEmpty()
bool SQLFields::isEmpty |
( |
| ) |
const |
|
inline |
Definition at line 98 of file SQL.inl.
99{
100 return __count == 0;
101}
◆ operator[]()
Definition at line 86 of file SQL.inl.
87{
90 return __fields[_index];
91}
◆ SQLQuery
The documentation for this class was generated from the following files: