#include <SQL.h>
Definition at line 235 of file SQL.h.
◆ SQLParams()
◆ ~SQLParams()
SQLParams::~SQLParams |
( |
| ) |
|
|
protectedvirtual |
◆ at()
SQLParam & SQLParams::at |
( |
size_t | _index | ) |
const |
|
inline |
Definition at line 104 of file SQL.inl.
105{
108 return __params[_index];
109}
#define __DCL_ASSERT_PARAM(expr)
◆ byName()
SQLParam & SQLParams::byName |
( |
const wchar_t * | _name | ) |
|
Definition at line 157 of file SQLQuery.cpp.
159{
162
164
165 if (__count >= 7) {
166 if (__paramMap.isEmpty()) {
167 __paramMap.initBuckets(__count);
168 for (size_t i = 0; i < __count; i++) {
169 SQLParam* p = &__params[i];
170 __paramMap[p->name()] = p;
171 }
172 }
173 r = (SQLParam*)(__paramMap[_name]);
174 }
175 else {
176 for(size_t i = 0; i < __count; i++) {
177 if (String::compare(__params[i].name(), _name) == 0) {
179 break;
180 }
181 }
182 }
183
185 throw new InvalidIndexException(_name);
186 }
187
189}
#define __DCL_ASSERT(expr)
◆ clear()
void SQLParams::clear |
( |
| ) |
|
|
protected |
Definition at line 124 of file SQLQuery.cpp.
125{
126 if (__params) {
128 delete[] __params;
130 __count = 0;
131 }
132 __paramMap.clear();
133}
◆ count()
size_t SQLParams::count |
( |
| ) |
const |
|
inline |
Definition at line 118 of file SQL.inl.
119{
120 return __count;
121}
◆ initialize()
void SQLParams::initialize |
( |
SQLQuery * | _query, |
|
|
const StringArray | _names ) |
|
protected |
Definition at line 135 of file SQLQuery.cpp.
136{
137 SQL::Query* hQuery = _query->
handle();
138
141
142 __count = hQuery->paramCount();
143 __params = new SQLParam[__count];
145
146 for(size_t i = 0; i < hQuery->paramCount(); i++) {
147 SQLParam* _param = &__params[i];
149 if (!hQuery->getParam(i, (SQL::Param**)&(_param->
__handle))) {
150 throw new SQLException(_query);
151 }
152 ((SQL::Param*)(_param->
__handle))->setName(_names[i]);
153 }
154}
SQL::Query * handle() const
◆ isEmpty()
bool SQLParams::isEmpty |
( |
| ) |
const |
|
inline |
Definition at line 123 of file SQL.inl.
124{
125 return __count == 0;
126}
◆ operator[]()
SQLParam & SQLParams::operator[] |
( |
size_t | _index | ) |
const |
|
inline |
Definition at line 111 of file SQL.inl.
112{
115 return __params[_index];
116}
◆ SQLQuery
The documentation for this class was generated from the following files: