Hypertable Client Library / Exports / HypBatch
Class: HypBatch
A batch applies a number of record edits at once, rolling them all back if any fail.
Table of contents
Methods
Methods
createRecord
▸ createRecord(collection
): HypRecord
Create a new record in the given collection. The returned record can be edited before
executing the batch without needing to be passed to updateRecord(...)
Parameters
Name | Type |
---|---|
collection |
HypCollection |
Returns
deleteRecord
▸ deleteRecord(record
): void
Delete the given record as part of this batch
Parameters
Name | Type |
---|---|
record |
HypRecord |
Returns
void
deleteRecords
▸ deleteRecords(records
): void
Delete all the given records as part of this batch
Parameters
Name | Type |
---|---|
records |
HypRecord [] |
Returns
void
save
▸ save(): Promise
<boolean
>
Perform all the edits added to the batch in one operation
Returns
Promise
<boolean
>
updateRecord
▸ updateRecord(record
): void
Update the field values of the given record as part of this batch
Parameters
Name | Type |
---|---|
record |
HypRecord |
Returns
void
updateRecords
▸ updateRecords(records
): void
Update the field values of the all given records as part of this batch
Parameters
Name | Type |
---|---|
records |
HypRecord [] |
Returns
void