12#ifndef RDBACCESSSVC_SQLITERECORD_H
13#define RDBACCESSSVC_SQLITERECORD_H
33typedef std::variant<int
39typedef std::map<std::string,SqliteInpType, std::less<>>
SqliteInpDef;
62 bool isFieldNull(std::string_view field)
const override;
67 int getInt(std::string_view field)
const override;
72 long getLong(std::string_view field)
const override;
77 double getDouble(std::string_view field)
const override;
82 float getFloat(std::string_view field)
const override;
87 virtual const std::string&
getString(std::string_view field)
const override;
96 int getInt(std::string_view field,
unsigned int index)
const override;
102 long getLong(std::string_view field,
unsigned int index)
const override;
108 double getDouble(std::string_view field,
unsigned int index)
const override;
114 float getFloat(std::string_view field,
unsigned int index)
const override;
120 virtual const std::string&
getString(std::string_view field,
unsigned int index)
const override;
128 typedef std::map<std::string,SqliteInp, std::less<>>
Record;
152 auto defIt =
m_def->find(field);
162 return std::make_tuple(checkIt,checkCode);
Definition of the abstract IRDBRecord interface.
std::shared_ptr< SqliteInpDef > SqliteInpDef_ptr
std::map< std::string, SqliteInpType, std::less<> > SqliteInpDef
std::variant< int, long, float, double, std::string > SqliteInp
IRDBRecord is one record in the IRDBRecordset object.
bool isFieldNull(std::string_view field) const override
Check if the field value is NULL.
void handleError(std::string_view field, FieldCheckCode checkCode) const
float getFloat(std::string_view field) const override
Get float field value.
FieldCheckResult checkField(std::string_view field, SqliteInpType fieldType) const
void addValue(std::string_view field, SqliteInp value)
std::tuple< RecordCIterator, FieldCheckCode > FieldCheckResult
Record::const_iterator RecordCIterator
void dump() const
Dump to cout.
SqliteRecord(const SqliteRecord &)=delete
int getInt(std::string_view field) const override
Get int field value.
virtual const std::string & getString(std::string_view field) const override
Get string field value.
std::map< std::string, SqliteInp, std::less<> > Record
double getDouble(std::string_view field) const override
Get double field value.
SqliteRecord & operator=(const SqliteRecord &)=delete
long getLong(std::string_view field) const override
Get long field value.
SqliteRecord(SqliteInpDef_ptr def)
~SqliteRecord() override
Destructor.