![]() |
Qore DataProvider Module Reference 3.3.0
|
Abstract bulk data operation class. More...
#include <AbstractDataProviderBulkOperation.qc.dox.h>
Public Member Methods | |
| commit () | |
| Commits data written to the data provider. | |
| constructor (AbstractDataProvider provider, string opname, int block_size=DefaultBlockSize) | |
| Creates the object. | |
| discard () | |
| Discards any buffered batched data. | |
| flush () | |
| Flushes any remaining batched data to the provider. | |
| int | getRecordCount () |
| Returns the record count. | |
| queueData (hash< auto > recs) | |
| Queues data in the buffer. | |
| queueData (list< hash< auto > > recs) | |
| Queues data in the buffer. | |
| rollback () | |
| Rolls back data written to the data provider. | |
Public Attributes | |
| const | DefaultBlockSize = 1000 |
| Default record block size for bulk operations. | |
Private Attributes | |
| int | block_size |
| Block size. | |
| hash< auto > | buf |
| Record buffer. | |
| hash< auto > | cval |
| "constant" record values; must be equal in all calls to queueData | |
| list< string > | cval_keys |
| "constant" record value keys | |
| string | opname |
| The operation name. | |
| AbstractDataProvider | provider |
| The data provider. | |
| int | record_count = 0 |
| record count | |
Abstract bulk data operation class.
| DataProvider::AbstractDataProviderBulkOperation::commit | ( | ) |
Commits data written to the data provider.
Has no effect if the data provider does not support transaction management
| DataProvider::AbstractDataProviderBulkOperation::discard | ( | ) |
Discards any buffered batched data.
This method should be called before destroying the object if an error occurs
| DataProvider::AbstractDataProviderBulkOperation::flush | ( | ) |
Flushes any remaining batched data to the provider.
This method should always be called before committing the transaction (for data providers that support transaction management) or destroying the object
| DataProvider::AbstractDataProviderBulkOperation::rollback | ( | ) |
Rolls back data written to the data provider.
Has no effect if the data provider does not support transaction management