pub struct SqlitePriceLevelRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqlitePriceLevelRepository
impl SqlitePriceLevelRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqlitePriceLevelRepository
impl Debug for SqlitePriceLevelRepository
Source§impl PriceLevelRepository for SqlitePriceLevelRepository
impl PriceLevelRepository for SqlitePriceLevelRepository
Source§fn create(&self, input: CreatePriceLevel) -> Result<PriceLevel>
fn create(&self, input: CreatePriceLevel) -> Result<PriceLevel>
Create a new price level.
Source§fn get(&self, id: PriceLevelId) -> Result<Option<PriceLevel>>
fn get(&self, id: PriceLevelId) -> Result<Option<PriceLevel>>
Get a price level by ID.
Source§fn update(
&self,
id: PriceLevelId,
input: UpdatePriceLevel,
) -> Result<PriceLevel>
fn update( &self, id: PriceLevelId, input: UpdatePriceLevel, ) -> Result<PriceLevel>
Update a price level (partial).
Source§fn list(&self, filter: PriceLevelFilter) -> Result<Vec<PriceLevel>>
fn list(&self, filter: PriceLevelFilter) -> Result<Vec<PriceLevel>>
List price levels with filter.
Source§fn set_entry(
&self,
id: PriceLevelId,
product_id: ProductId,
price: Decimal,
) -> Result<PriceLevelEntry>
fn set_entry( &self, id: PriceLevelId, product_id: ProductId, price: Decimal, ) -> Result<PriceLevelEntry>
Upsert a per-product fixed price entry within a level.
Source§fn delete_entry(&self, id: PriceLevelId, product_id: ProductId) -> Result<()>
fn delete_entry(&self, id: PriceLevelId, product_id: ProductId) -> Result<()>
Remove a per-product entry from a level.
Source§fn list_entries(&self, id: PriceLevelId) -> Result<Vec<PriceLevelEntry>>
fn list_entries(&self, id: PriceLevelId) -> Result<Vec<PriceLevelEntry>>
List the per-product entries for a level.
Auto Trait Implementations§
impl !RefUnwindSafe for SqlitePriceLevelRepository
impl !UnwindSafe for SqlitePriceLevelRepository
impl Freeze for SqlitePriceLevelRepository
impl Send for SqlitePriceLevelRepository
impl Sync for SqlitePriceLevelRepository
impl Unpin for SqlitePriceLevelRepository
impl UnsafeUnpin for SqlitePriceLevelRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more