This adds Model.batch_save() and Model.batch_delete() to the ORM, so that implementers can reduce the number of network calls required when operating on many records at once. A few quirks:
Model.batch_save() will call both Table.batch_create() and Table.batch_update(), depending on the record.
Model.batch_delete() will raise ValueError if given a record that doesn't have an ID.
Both methods will raise TypeError if given a record that is not an instance of the class.
This adds
Model.batch_save()
andModel.batch_delete()
to the ORM, so that implementers can reduce the number of network calls required when operating on many records at once. A few quirks:Model.batch_save()
will call bothTable.batch_create()
andTable.batch_update()
, depending on the record.Model.batch_delete()
will raiseValueError
if given a record that doesn't have an ID.TypeError
if given a record that is not an instance of the class.