|
| | constructor (SqlUtil::Table target, hash mapv={}, *hash opts) |
| | builds the object based on an optional hash providing field mappings, data constraints, and optionally custom mapping logic More...
|
| |
| | constructor (SqlUtil::AbstractTable target, hash mapv={}, *hash opts) |
| | builds the object based on an optional hash providing field mappings, data constraints, and optionally custom mapping logic More...
|
| |
|
private | init (hash mapv, *hash opts) |
| | common constructor initialization
|
| |
| private | checkMapField (string k, reference fh) |
| | perform per-field pre-processing on the passed map in the constructor More...
|
| |
|
nothing | commit () |
| | flushes any queued data and commits the transaction
|
| |
| | constructor (SqlUtil::Table target, hash mapv, *hash opts) |
| | builds the object based on a hash providing field mappings, data constraints, and optionally custom mapping logic More...
|
| |
| | constructor (SqlUtil::AbstractTable target, hash mapv, *hash opts) |
| | builds the object based on a hash providing field mappings, data constraints, and optionally custom mapping logic More...
|
| |
| | destructor () |
| | throws an exception if there is data pending in the block cache More...
|
| |
| | discard () |
| | discards any buffered batched data; this method should be called after using the batch APIs (queueData()) and an error occurs More...
|
| |
|
private | error (string fmt) |
| | prepends the datasource description to the error string and calls Mapper::error()
|
| |
|
private | error2 (string ex, string fmt) |
| | prepends the datasource description to the error description and calls Mapper::error2()
|
| |
| *hash | flush () |
| | flushes any remaining batched data to the database; this method should always be called before committing the transaction or destroying the object More...
|
| |
|
private hash | flushIntern () |
| | flushes queued data to the database
|
| |
|
Qore::SQL::AbstractDatasource | getDatasource () |
| | returns the AbstractDatasource object associated with this object
|
| |
|
*list | getReturning () |
| | returns a list argument for the SqlUtil "returning" option, if applicable
|
| |
|
SqlUtil::AbstractTable | getTable () |
| | returns the underlying SqlUtil::AbstractTable object
|
| |
|
string | getTableName () |
| | returns the table name
|
| |
|
private | init (hash mapv, *hash opts) |
| | common constructor initialization
|
| |
| hash | insertRow (hash rec) |
| | inserts a row into the target table based on a mapped input record; does not commit the transaction More...
|
| |
|
deprecated hash | insertRowNoCommit (hash rec) |
| | Plain alias to insertRow(). Obsolete. Do not use.
|
| |
|
| logOutput (hash h) |
| | ignore logging from Mapper since we may have to log sequence values; output logged manually in insertRow()
|
| |
|
private | mapFieldType (string key, hash m, reference v, hash rec) |
| | performs type handling
|
| |
| hash | optionKeys () |
| | returns a list of valid constructor options for this class (can be overridden in subclasses) More...
|
| |
| *hash | queueData (hash rec, *hash crec) |
| | inserts a row (or a set of rows, in case a hash of lists is passed) into the block buffer based on a mapped input record; the block buffer is flushed to the DB if the buffer size reaches the limit defined by the "insert_block" option; does not commit the transaction More...
|
| |
| *hash | queueData (AbstractIterator iter, *hash crec) |
| | inserts a set of rows (list of hashes) into the block buffer based on a mapped input record; the block buffer is flushed to the DB if the buffer size reaches the limit defined by the "insert_block" option; does not commit the transaction More...
|
| |
| private *hash | queueDataIntern (hash rec) |
| | inserts a row into the block buffer based on a mapped input record; does not commit the transaction More...
|
| |
|
nothing | rollback () |
| | discards any queued data and rolls back the transaction
|
| |
| | setRowCode (*code rowc) |
| | sets a closure or call reference that will be called when data has been sent to the database and all output data is available; must accept a hash argument that represents the data written to the database including any output arguments. This code will be reset, once the transaction is commited. More...
|
| |
| hash | validKeys () |
| | returns a list of valid field keys for this class (can be overridden in subclasses) More...
|
| |
| hash | validTypes () |
| | returns a list of valid field types for this class (can be overridden in subclasses) More...
|
| |
maps from source to target tables with exactly the same structure