fix: Use incremental ID
This commit is contained in:
@@ -32,8 +32,9 @@ where
|
||||
/// Get an object from its ID. This does not use an index lookup
|
||||
fn get_by_id(&self, id: u32) -> Result<Option<V>, Error<Self::Error>>;
|
||||
|
||||
/// Store an item in the DB.
|
||||
fn set(&self, value: &V) -> Result<(), Error<Self::Error>>;
|
||||
/// Store an item in the DB and return the assigned ID.
|
||||
/// This method does not modify the original model.
|
||||
fn set(&self, value: &V) -> Result<u32, Error<Self::Error>>;
|
||||
|
||||
/// Delete all items from the db with a given index.
|
||||
fn delete<I, Q>(&self, key: &Q) -> Result<(), Error<Self::Error>>
|
||||
|
Reference in New Issue
Block a user