Skip to main content

InsertableValueSet

Trait InsertableValueSet 

Source
pub trait InsertableValueSet: ValueSet {
    // Required method
    fn insert_return_id_value<'life0, 'life1, 'async_trait>(
        &'life0 self,
        record: &'life1 Record<Self::Value>,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Id>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Append-only operations on raw storage values with automatic ID generation.

See documentation for ValueSet for implementation example.

Required Methods§

Source

fn insert_return_id_value<'life0, 'life1, 'async_trait>( &'life0 self, record: &'life1 Record<Self::Value>, ) -> Pin<Box<dyn Future<Output = Result<Self::Id>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert a value and return the generated ID (Similar to HTTP POST without ID)

The storage backend generates a unique identifier for the new record.

§Warning

This method is not idempotent - each call creates a new record with a new ID, even if the value data is identical.

Implementors§

Source§

impl<E> InsertableValueSet for ImTable<E>
where E: Entity,