pub struct SqlitePriceScheduleRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqlitePriceScheduleRepository
impl SqlitePriceScheduleRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl PriceScheduleRepository for SqlitePriceScheduleRepository
impl PriceScheduleRepository for SqlitePriceScheduleRepository
Source§fn create(&self, input: CreatePriceSchedule) -> Result<PriceSchedule>
fn create(&self, input: CreatePriceSchedule) -> Result<PriceSchedule>
Create a new price schedule.
Source§fn get(&self, id: PriceScheduleId) -> Result<Option<PriceSchedule>>
fn get(&self, id: PriceScheduleId) -> Result<Option<PriceSchedule>>
Get a price schedule by ID.
Source§fn update(
&self,
id: PriceScheduleId,
input: UpdatePriceSchedule,
) -> Result<PriceSchedule>
fn update( &self, id: PriceScheduleId, input: UpdatePriceSchedule, ) -> Result<PriceSchedule>
Update a price schedule (partial).
Source§fn list(&self, filter: PriceScheduleFilter) -> Result<Vec<PriceSchedule>>
fn list(&self, filter: PriceScheduleFilter) -> Result<Vec<PriceSchedule>>
List price schedules with filter.
Source§fn delete(&self, id: PriceScheduleId) -> Result<()>
fn delete(&self, id: PriceScheduleId) -> Result<()>
Delete a price schedule (and its entries).
Source§fn set_entry(
&self,
id: PriceScheduleId,
product_id: ProductId,
price: Decimal,
) -> Result<PriceScheduleEntry>
fn set_entry( &self, id: PriceScheduleId, product_id: ProductId, price: Decimal, ) -> Result<PriceScheduleEntry>
Upsert a per-product scheduled price.
Source§fn delete_entry(&self, id: PriceScheduleId, product_id: ProductId) -> Result<()>
fn delete_entry(&self, id: PriceScheduleId, product_id: ProductId) -> Result<()>
Remove a per-product entry.
Source§fn list_entries(&self, id: PriceScheduleId) -> Result<Vec<PriceScheduleEntry>>
fn list_entries(&self, id: PriceScheduleId) -> Result<Vec<PriceScheduleEntry>>
List per-product entries for a schedule.
Auto Trait Implementations§
impl !RefUnwindSafe for SqlitePriceScheduleRepository
impl !UnwindSafe for SqlitePriceScheduleRepository
impl Freeze for SqlitePriceScheduleRepository
impl Send for SqlitePriceScheduleRepository
impl Sync for SqlitePriceScheduleRepository
impl Unpin for SqlitePriceScheduleRepository
impl UnsafeUnpin for SqlitePriceScheduleRepository
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