91 namespace TableMapper {
string getTableName()
returns the table name
int commitLimit()
returns the commit_limit value set in the constructor()
nothing commit()
commits the transaction
string getTableName()
returns the table name
provides a hash iterator based on a InboundTableMapper object and an iterator input source; for each ...
Definition: TableMapper.qm.dox.h:240
private bool hasMapping(hash fh)
returns True if the field has a mapping, False if not
int commit_limit
row commit limit (<= 0 for no commits)
Definition: TableMapper.qm.dox.h:252
hash validKeys()
returns a list of valid field keys for this class (can be overridden in subclasses) ...
bool next()
Moves the current position of the input iterator to the next element; returns False if there are no m...
hash optionKeys()
returns a list of valid constructor options for this class (can be overridden in subclasses) ...
hash insertRowNoCommit(hash rec)
inserts a row into the target table based on a mapped input record; does not commit the transaction ...
private checkMap()
verifies the input map in the constructor
nothing rollback()
rolls back the transaction
hash val
a copy of the last hash value mapped
Definition: TableMapper.qm.dox.h:258
constructor(Qore::AbstractIterator i, SqlUtil::Table table, hash map, *hash opts, int commit_limit=0)
creates the iterator from the arguments passed
resetCount()
resets the internal record count
private checkMapField(string k, reference fh, hash th)
perform per-field pre-processing on the passed map in the constructor
SqlUtil::AbstractTable getTable()
returns the underlying SqlUtil::AbstractTable object
nothing rollback()
rolls back the transaction
int getCount()
returns the internal record count
nothing commit()
commits the transaction
int cnt
row count for commit
Definition: TableMapper.qm.dox.h:255
SqlUtil::AbstractDatabase db
the target Database object in case sequence value need to be acquired
Definition: TableMapper.qm.dox.h:107
TableMapper::InboundTableMapper map
data mapper
Definition: TableMapper.qm.dox.h:249
hash getValue()
returns the current row transformed with the mapper
provides an inbound data mapper to a Table target
Definition: TableMapper.qm.dox.h:94
hash insertRow(hash rec)
inserts a row into the target table based on a mapped input record; commits the transaction ...
SqlUtil::AbstractTable table
the target table object
Definition: TableMapper.qm.dox.h:104
private mapFieldType(string key, hash m, reference v, hash rec)
performs type handling