SQL Relay C++ API
sqlrcollections.h
1// Copyright (c) 1999-2018 David Muse
2// See the COPYING file for more information.
3
4#ifndef SQLRRESULTSETCOLLECTIONS_H
5#define SQLRRESULTSETCOLLECTIONS_H
6
7#include <sqlrelay/private/sqlrcollectionsincludes.h>
8
18class SQLRCLIENT_DLLSPEC sqlrscalar : public scalarcollection<const char *> {
19 public:
22
26
31 sqlrscalar(sqlrcursor *cursor, uint64_t row, uint64_t column);
32
35
37 bool isReadOnly();
38
40 void setCursor(sqlrcursor *cursor);
41
44 void setRow(uint64_t row);
45
48 void setColumn(uint32_t col);
49
52 const char *getValue();
53
55 const char * &getReference();
56
57 #include <sqlrelay/private/sqlrscalar.h>
58};
59
69class SQLRCLIENT_DLLSPEC sqlrlistnode : public listnode<const char *> {
70 public:
72 const char *getValue();
73
76 const char * &getReference();
77
80 listnode<const char *> *getPrevious();
81
84 listnode<const char *> *getNext();
85
86 #include <sqlrelay/private/sqlrlistnode.h>
87};
88
99class SQLRCLIENT_DLLSPEC sqlrrowlist : public listcollection<const char *> {
100 public:
103
107
111 sqlrrowlist(sqlrcursor *cursor, uint64_t row);
112
115
117 void setCursor(sqlrcursor *cursor);
118
121 void setRow(uint64_t row);
122
125
128
130 uint64_t getBlockSize();
131
133 uint64_t getCount();
134
136 listnode<const char *> *getFirst();
137
141 listnode<const char *> *getNext(
142 listnode<const char *> *node);
143
146 listnode<const char *> *find(const char *value);
147
151 listnode<const char *> *find(listnode<const char *> *startnode,
152 const char *value);
153
154 #include <sqlrelay/private/sqlrrowlist.h>
155};
156
167class SQLRCLIENT_DLLSPEC sqlrrowdictionary :
168 public dictionarycollection<const char *, const char *> {
169 public:
172
176
180 sqlrrowdictionary(sqlrcursor *cursor, uint64_t row);
181
184
186 void setCursor(sqlrcursor *cursor);
187
190 void setRow(uint64_t row);
191
194
200 bool getValue(const char *key, const char **value);
201
207 const char *getValue(const char *key);
208
212 bool getKey(const char *key, const char **k);
213
220 const char *getKey(const char *key);
221
224 linkedlist<const char *> *getKeys();
225
228 uint64_t getCount();
229
230 #include <sqlrelay/private/sqlrrowdictionary.h>
231};
232
243class SQLRCLIENT_DLLSPEC sqlrresultsetlist :
244 public listcollection<const char *> {
245 public:
249
253
257 sqlrresultsetlist(sqlrcursor *cursor, uint64_t col);
258
262
264 void setCursor(sqlrcursor *cursor);
265
268 void setColumn(uint32_t col);
269
272
275
279 uint64_t getBlockSize();
280
282 uint64_t getCount();
283
285 listnode<const char *> *getFirst();
286
290 listnode<const char *> *getNext(
291 listnode<const char *> *node);
292
295 listnode<const char *> *find(const char *value);
296
300 listnode<const char *> *find(listnode<const char *> *startnode,
301 const char *value);
302
303 #include <sqlrelay/private/sqlrresultsetlist.h>
304};
305
316class SQLRCLIENT_DLLSPEC sqlrresultsettable :
317 public tablecollection<const char *> {
318 public:
321
325
328
330 void setCursor(sqlrcursor *cursor);
331
334
337
341 uint64_t getBlockSize();
342
345
347 const char *getColumnName(uint64_t col);
348
350 uint64_t getColumnCount();
351
354 const char *getValue(uint64_t row, uint64_t col);
355
357 const char * &getReference(uint64_t row, uint64_t col);
358
361 const char *getValue(uint64_t row,
362 const char *colname);
363
366 uint64_t getRowCount();
367
371
372 #include <sqlrelay/private/sqlrresultsettable.h>
373};
374
375#endif
Definition sqlrclient.h:391
Definition sqlrcollections.h:69
listnode< const char * > * getNext()
const char * getValue()
listnode< const char * > * getPrevious()
const char *& getReference()
Definition sqlrcollections.h:244
sqlrresultsetlist(sqlrcursor *cursor, uint64_t col)
sqlrresultsetlist(sqlrcursor *cursor)
void setColumn(uint32_t col)
listnode< const char * > * find(const char *value)
uint64_t getCount()
listnode< const char * > * find(listnode< const char * > *startnode, const char *value)
uint64_t getBlockSize()
listnode< const char * > * getNext(listnode< const char * > *node)
void setCursor(sqlrcursor *cursor)
listnode< const char * > * getFirst()
Definition sqlrcollections.h:317
uint64_t getBlockSize()
const char * getValue(uint64_t row, const char *colname)
const char * getColumnName(uint64_t col)
const char * getValue(uint64_t row, uint64_t col)
sqlrresultsettable(sqlrcursor *cursor)
uint64_t getColumnCount()
const char *& getReference(uint64_t row, uint64_t col)
uint64_t getRowCount()
void setCursor(sqlrcursor *cursor)
bool getAllRowsAvailable()
Definition sqlrcollections.h:168
bool getKey(const char *key, const char **k)
sqlrrowdictionary(sqlrcursor *cursor, uint64_t row)
linkedlist< const char * > * getKeys()
void setRow(uint64_t row)
uint64_t getCount()
const char * getValue(const char *key)
const char * getKey(const char *key)
void setCursor(sqlrcursor *cursor)
sqlrrowdictionary(sqlrcursor *cursor)
bool getValue(const char *key, const char **value)
Definition sqlrcollections.h:99
sqlrrowlist(sqlrcursor *cursor)
void setCursor(sqlrcursor *cursor)
listnode< const char * > * find(const char *value)
listnode< const char * > * getFirst()
uint64_t getBlockSize()
bool isReadOnly()
listnode< const char * > * getNext(listnode< const char * > *node)
bool isBlockBased()
uint64_t getCount()
void setRow(uint64_t row)
sqlrrowlist(sqlrcursor *cursor, uint64_t row)
listnode< const char * > * find(listnode< const char * > *startnode, const char *value)
Definition sqlrcollections.h:18
sqlrscalar(sqlrcursor *cursor)
sqlrscalar(sqlrcursor *cursor, uint64_t row, uint64_t column)
void setRow(uint64_t row)
const char * getValue()
void setColumn(uint32_t col)
bool isReadOnly()
const char *& getReference()
void setCursor(sqlrcursor *cursor)