SQL Relay C++ API
sqlrimport.h
1// Copyright (c) 1999-2018 David Muse
2// See the file COPYING for more information
3
4#ifndef SQLRIMPORT_H
5#define SQLRIMPORT_H
6
7#include <sqlrelay/private/sqlrimportincludes.h>
8
13class SQLRCLIENT_DLLSPEC sqlrimport {
14 public:
17
19 virtual ~sqlrimport();
20
24
27 void setSqlrCursor(sqlrcursor *sqlrcur);
28
32
36
48 void insertPrimaryKey(const char *primarykeycolumnname,
49 uint32_t primarykeycolumnindex,
50 const char *primarykeysequence);
51
55
59
64
69
73 const char *getPrimaryKeySequence();
74
81 void insertStaticValue(const char *columnname,
82 uint32_t columnindex,
83 const char *value);
84
87 void removeStaticValue(uint32_t columnindex);
88
93 const char *getStaticValueColumnName(uint32_t index);
94
99 const char *getStaticValue(uint32_t index);
100
106
112 void setDbType(const char *dbtype);
113
115 const char *getDbType();
116
122 void setObjectName(const char *objectname);
123
125 const char *getObjectName();
126
142 void setIgnoreColumns(bool ignorecolumns);
143
147
157 bool ignorecolumnswithemptynames);
158
162
164 void setIgnoreEmptyRows(bool ignoreemptyrows);
165
168
171 void mapColumnName(const char *from, const char *to);
172
175 const char *getMappedColumnName(const char *from);
176
179
183
186
190
193
197
200 void mapFieldValue(const char *from, const char *to);
201
204 const char *getMappedFieldValue(const char *from);
205
216 void setReformatDateTime(bool reformatdatetime);
217
221
236 void setDdMm(bool ddmm);
237
240 bool getDdMm();
241
256 void setYyyyDdMm(bool yyyyddmm);
257
261
271 void setDateDelimiters(const char *datedelimiters);
272
276 const char *getDateDelimiters();
277
301 void setNoCenturyThreshold(uint16_t nocenturythreshold);
302
307
335 void setLastCenturyThreshold(uint16_t lastcenturythreshold);
336
341
351 void setDateTimeFormat(const char *datetimeformat);
352
356 const char *getDateTimeFormat();
357
362 void setCommitCount(uint64_t commitcount);
363
365 uint64_t getCommitCount();
366
370 void setLogger(logger *lg);
371
374 logger *getLogger();
375
381 void setCoarseLogLevel(uint8_t coarseloglevel);
382
385
391 void setFineLogLevel(uint8_t fineloglevel);
392
395
397 void setLogIndent(uint32_t logindent);
398
400 uint32_t getLogIndent();
401
405 void setLogErrors(bool logerrors);
406
410
422 virtual bool importData();
423
429
430 protected:
451 virtual bool importStart();
452
473 virtual bool columnsStart();
474
514 virtual bool columnStart();
515
547 virtual bool columnEnd();
548
572 virtual bool columnsEnd();
573
596 virtual bool rowsStart();
597
631 virtual bool rowStart();
632
681 virtual bool fieldStart();
682
722 virtual bool fieldEnd();
723
754 virtual bool rowEnd();
755
780 virtual bool rowsEnd();
781
790 virtual bool beginStart();
791
800 virtual bool beginEnd();
801
810 virtual bool commitStart();
811
820 virtual bool commitEnd();
821
830 virtual bool error(int64_t errornumber,
831 const char *errormessage);
832
859 virtual bool importEnd();
860
866 void setExcludeRow(bool excluderow);
867
874
879 void setCurrentRow(uint64_t currentrow);
880
885 uint64_t getCurrentRow();
886
892 void setCurrentColumn(uint32_t currentcol);
893
900
910 void setCurrentColumnName(char *currentcolname);
911
918
929 void setCurrentField(char *currentfield);
930
937
946 void setIsNumericColumn(uint64_t index, bool numeric);
947
953 bool getIsNumericColumn(uint64_t index);
954
961
970 void setIsDateTimeColumn(uint64_t index, bool datetime);
971
977 bool getIsDateTimeColumn(uint64_t index);
978
985
990 void setImportedRowCount(uint64_t importedrowcount);
991
992 #include <sqlrelay/private/sqlrimport.h>
993};
994
995#endif
Definition sqlrclient.h:9
Definition sqlrclient.h:391
Definition sqlrimport.h:13
void setCoarseLogLevel(uint8_t coarseloglevel)
virtual bool rowEnd()
void insertStaticValue(const char *columnname, uint32_t columnindex, const char *value)
bool getIgnoreColumns()
bool getReformatDateTime()
const char * getMappedColumnName(const char *from)
char * getCurrentField()
virtual bool rowsEnd()
void clearAreNumericColumns()
void setSqlrConnection(sqlrconnection *sqlrcon)
void setDbType(const char *dbtype)
void setLastCenturyThreshold(uint16_t lastcenturythreshold)
void removeStaticValue(uint32_t columnindex)
virtual bool fieldEnd()
void setLogErrors(bool logerrors)
char * getCurrentColumnName()
uint32_t getCurrentColumn()
virtual bool commitEnd()
virtual bool columnStart()
bool getUpperCaseColumnNames()
bool getIgnoreColumnsWithEmptyNames()
void setDateTimeFormat(const char *datetimeformat)
void setReformatDateTime(bool reformatdatetime)
sqlrcursor * getSqlrCursor()
uint32_t getStaticValueCount()
void insertPrimaryKey(const char *primarykeycolumnname, uint32_t primarykeycolumnindex, const char *primarykeysequence)
const char * getPrimaryKeyColumnName()
uint8_t getCoarseLogLevel()
virtual bool beginStart()
const char * getStaticValue(uint32_t index)
void setIgnoreEmptyRows(bool ignoreemptyrows)
logger * getLogger()
void setNoCenturyThreshold(uint16_t nocenturythreshold)
void setCurrentColumn(uint32_t currentcol)
virtual bool columnsEnd()
const char * getDateDelimiters()
uint16_t getLastCenturyThreshold()
bool getIsNumericColumn(uint64_t index)
virtual bool beginEnd()
virtual bool importData()
void mapFieldValue(const char *from, const char *to)
sqlrconnection * getSqlrConnection()
const char * getStaticValueColumnName(uint32_t index)
virtual bool fieldStart()
void setExcludeRow(bool excluderow)
bool getLowerCaseColumnNames()
void clearAreDateTimeColumns()
uint64_t getCurrentRow()
void setLogger(logger *lg)
virtual bool importEnd()
const char * getMappedFieldValue(const char *from)
void setYyyyDdMm(bool yyyyddmm)
void setCurrentRow(uint64_t currentrow)
bool getYyyyDdMm()
void setIgnoreColumns(bool ignorecolumns)
virtual bool rowsStart()
virtual bool importStart()
const char * getPrimaryKeySequence()
virtual bool rowStart()
void setLowerCaseColumnNames()
void setLogIndent(uint32_t logindent)
bool getIgnoreEmptyRows()
void setCurrentField(char *currentfield)
virtual bool commitStart()
void setImportedRowCount(uint64_t importedrowcount)
void removePrimaryKey()
bool getIsDateTimeColumn(uint64_t index)
virtual bool columnsStart()
bool getLogErrors()
void setFineLogLevel(uint8_t fineloglevel)
void setCommitCount(uint64_t commitcount)
const char * getObjectName()
void setUpperCaseColumnNames()
const char * getDbType()
void setCurrentColumnName(char *currentcolname)
void setIsDateTimeColumn(uint64_t index, bool datetime)
void setIsNumericColumn(uint64_t index, bool numeric)
uint16_t getNoCenturyThreshold()
const char * getDateTimeFormat()
uint64_t getImportedRowCount()
void setSqlrCursor(sqlrcursor *sqlrcur)
void setMixedCaseColumnNames()
void mapColumnName(const char *from, const char *to)
bool getInsertPrimaryKey()
void setObjectName(const char *objectname)
uint32_t getPrimaryKeyColumnIndex()
bool getExcludeRow()
virtual bool columnEnd()
virtual bool error(int64_t errornumber, const char *errormessage)
bool getMixedCaseColumnNames()
virtual ~sqlrimport()
void setDdMm(bool ddmm)
uint32_t getLogIndent()
void setIgnoreColumnsWithEmptyNames(bool ignorecolumnswithemptynames)
bool getDdMm()
uint8_t getFineLogLevel()
void setDateDelimiters(const char *datedelimiters)
uint64_t getCommitCount()