|
|
@ -116,7 +116,7 @@ func (batch *freezerTableBatch) reset() { |
|
|
|
// existing data.
|
|
|
|
// existing data.
|
|
|
|
func (batch *freezerTableBatch) Append(item uint64, data interface{}) error { |
|
|
|
func (batch *freezerTableBatch) Append(item uint64, data interface{}) error { |
|
|
|
if item != batch.curItem { |
|
|
|
if item != batch.curItem { |
|
|
|
return errOutOrderInsertion |
|
|
|
return fmt.Errorf("%w: have %d want %d", errOutOrderInsertion, item, batch.curItem) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Encode the item.
|
|
|
|
// Encode the item.
|
|
|
@ -136,7 +136,7 @@ func (batch *freezerTableBatch) Append(item uint64, data interface{}) error { |
|
|
|
// existing data.
|
|
|
|
// existing data.
|
|
|
|
func (batch *freezerTableBatch) AppendRaw(item uint64, blob []byte) error { |
|
|
|
func (batch *freezerTableBatch) AppendRaw(item uint64, blob []byte) error { |
|
|
|
if item != batch.curItem { |
|
|
|
if item != batch.curItem { |
|
|
|
return errOutOrderInsertion |
|
|
|
return fmt.Errorf("%w: have %d want %d", errOutOrderInsertion, item, batch.curItem) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
encItem := blob |
|
|
|
encItem := blob |
|
|
|