#include <SQL.h>
Definition at line 219 of file SQL.h.
◆ SQLFields()
◆ ~SQLFields()
| SQLFields::~SQLFields |
( |
| ) |
|
|
protectedvirtual |
◆ at()
Definition at line 41 of file SQL.inl.
42{
45 return __fields[_index];
46}
#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 42 of file SQLQuery.cpp.
43{
44 if (__fields) {
46 delete[] __fields;
48 __count = 0;
49 }
50 __fieldMap.clear();
51}
◆ count()
| size_t SQLFields::count |
( |
| ) |
const |
|
inline |
Definition at line 55 of file SQL.inl.
56{
57 return __count;
58}
◆ initialize()
| void SQLFields::initialize |
( |
SQLQuery * | _query | ) |
|
|
protected |
Definition at line 53 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,
NULL);
72 }
73 }
74}
SQL::Query * handle() const
◆ isEmpty()
| bool SQLFields::isEmpty |
( |
| ) |
const |
|
inline |
Definition at line 60 of file SQL.inl.
61{
62 return __count == 0;
63}
◆ operator[]()
Definition at line 48 of file SQL.inl.
49{
52 return __fields[_index];
53}
◆ SQLQuery
The documentation for this class was generated from the following files: