SQL Relay C++ API
sqlrcrud.h
1// Copyright (c) 1999-2018 David Muse
2// See the file COPYING for more information.
3
4#ifndef SQLRCRUD_H
5#define SQLRCRUD_H
6
7#include <sqlrelay/private/sqlrcrudincludes.h>
8
68class SQLRCLIENT_DLLSPEC sqlrcrud : public mvccrud {
69 public:
72
75
76
80
83
84
91 void setTable(const char *table);
92
95 void setIdSequence(const char *idsequence);
96
98 const char *getTable();
99
107 const char *getIdSequence();
108
109
116
117
131 void setPrimaryKeyColumn(const char *primarykey);
132
146 void setAutoIncrementColumn(const char *autoinc);
147
161 const char *getPrimaryKeyColumn();
162
177
192 void setCreateQuery(const char *createquery);
193
209 void setReadQuery(const char *readquery);
210
226 void setUpdateQuery(const char *updatequery);
227
242 void setDeleteQuery(const char *deletequery);
243
246 const char *getCreateQuery();
247
250 const char *getReadQuery();
251
254 const char *getUpdateQuery();
255
258 const char *getDeleteQuery();
259
260
265 bool containspartial);
266
271 bool containspartial);
272
277 bool containspartial);
278
283 bool containspartial);
284
288
292
296
300
301
340 bool doCreate(const char * const *columns,
341 const char * const *values,
342 const char * const *types);
343
373 bool doCreate(dictionary<const char *, const char *> *kvp);
374
405 bool doCreate(jsondom *j);
406
424 bool doRead(const char *criteria,
425 const char *sort,
426 uint64_t skip);
427
447 bool doRead(jsondom *j);
448
489 bool doUpdate(const char * const * columns,
490 const char * const *values,
491 const char * const *types,
492 const char *criteria);
493
527 bool doUpdate(dictionary<const char *, const char *> *kvp,
528 const char *criteria);
529
564 bool doUpdate(jsondom *j);
565
576 bool doDelete(const char *criteria);
577
590 bool doDelete(jsondom *j);
591
594 const char *getErrorMessage();
595
598 int64_t getErrorCode();
599
603 uint64_t getAffectedRows();
604
609 scalarcollection<uint64_t> *getAffectedRowsScalar();
610
615 listcollection<uint64_t> *getAffectedRowsList();
616
621 dictionarycollection<const char *, uint64_t>
623
628 tablecollection<uint64_t> *getAffectedRowsTable();
629
634 scalarcollection<const char *> *getFirstFieldScalar();
635
640 listcollection<const char *> *getFirstRowList();
641
646 dictionarycollection<const char *, const char *>
648
654 listcollection<const char *> *getFirstColumnList();
655
660 tablecollection<const char *> *getResultSetTable();
661
662 #include <sqlrelay/private/sqlrcrud.h>
663};
664
665#endif
Definition sqlrclient.h:9
Definition sqlrcrud.h:68
void setSqlrCursor(sqlrcursor *cur)
const char * getUpdateQuery()
uint64_t getAffectedRows()
bool doCreate(dictionary< const char *, const char * > *kvp)
bool getReadQueryContainsPartialWhere()
void setIdSequence(const char *idsequence)
bool doCreate(jsondom *j)
bool doDelete(jsondom *j)
void setUpdateQueryContainsPartialWhere(bool containspartial)
void setReadQuery(const char *readquery)
bool doUpdate(dictionary< const char *, const char * > *kvp, const char *criteria)
void setTable(const char *table)
int64_t getErrorCode()
void setUpdateQuery(const char *updatequery)
bool buildQueries()
bool doUpdate(const char *const *columns, const char *const *values, const char *const *types, const char *criteria)
void setReadQueryContainsPartialOrderBy(bool containspartial)
scalarcollection< const char * > * getFirstFieldScalar()
void setAutoIncrementColumn(const char *autoinc)
listcollection< uint64_t > * getAffectedRowsList()
bool doUpdate(jsondom *j)
void setReadQueryContainsPartialWhere(bool containspartial)
bool doCreate(const char *const *columns, const char *const *values, const char *const *types)
scalarcollection< uint64_t > * getAffectedRowsScalar()
bool getDeleteQueryContainsPartialWhere()
tablecollection< uint64_t > * getAffectedRowsTable()
const char * getDeleteQuery()
void setSqlrConnection(sqlrconnection *con)
void setCreateQuery(const char *createquery)
dictionarycollection< const char *, const char * > * getFirstRowDictionary()
const char * getReadQuery()
bool getUpdateQueryContainsPartialWhere()
bool doRead(jsondom *j)
void setPrimaryKeyColumn(const char *primarykey)
listcollection< const char * > * getFirstRowList()
tablecollection< const char * > * getResultSetTable()
bool doDelete(const char *criteria)
const char * getCreateQuery()
bool doRead(const char *criteria, const char *sort, uint64_t skip)
const char * getTable()
dictionarycollection< const char *, uint64_t > * getAffectedRowsDictionary()
listcollection< const char * > * getFirstColumnList()
void setDeleteQuery(const char *deletequery)
const char * getErrorMessage()
bool getReadQueryContainsPartialOrderBy()
const char * getAutoIncrementColumn()
void setDeleteQueryContainsPartialWhere(bool containspartial)
const char * getIdSequence()
const char * getPrimaryKeyColumn()
Definition sqlrclient.h:391