Improve the interface for DB column retrieval (rdbms)
Currently retrieval of row from the DB is represented by an Rset
wrapper from which values are being recalled specifying the column name and column type, e.g. jobid = rset.columnUint64("JOB_ID")
. This means that any row we try to represent in the code currently requires:
- lengthy listing of all column names as variables e.g. in the
ArchiveJobQueueRow
(or any other similar object) - another lengthy listing assigning values to the variables above using the appropriate
Rset
function for recall with the specific type and column name string matching the DB table create statement - all these listings and recalls are row specific (archive, retrieve, repack, ...) it might be better to refactor all of these and create a common representation of the underlying values, then if necessary, populate values of other member objects from this structure (e.g.
ArchiveFile
) - the above could be improved for better maintenance
- in addition
NullDbValue
exception is not being caught and crashes the assignment (incompatible type) without printing which value failed to get assigned
Suggestion to improve the maintainability with tools like : std::any
, std::vector
and Enum
types, the idea draft is here (does not compile for the moment, just a sketch of the idea I had in mind): 1540a275
Related to #641 (closed)