SetEntryAt is the equivalent of Txn.SetEntry but it also allows setting version for the entry. SetEntryAt can be used only in managed mode.
(e *Entry, ts uint64)
| 113 | // SetEntryAt is the equivalent of Txn.SetEntry but it also allows setting version for the entry. |
| 114 | // SetEntryAt can be used only in managed mode. |
| 115 | func (wb *WriteBatch) SetEntryAt(e *Entry, ts uint64) error { |
| 116 | if !wb.db.opt.managedTxns { |
| 117 | return errors.New("SetEntryAt can only be used in managed mode. Use SetEntry instead") |
| 118 | } |
| 119 | e.version = ts |
| 120 | return wb.SetEntry(e) |
| 121 | } |
| 122 | |
| 123 | // Should be called with lock acquired. |
| 124 | func (wb *WriteBatch) handleEntry(e *Entry) error { |