pub struct SqliteLotRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteLotRepository
impl SqliteLotRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqliteLotRepository
impl Debug for SqliteLotRepository
Source§impl LotRepository for SqliteLotRepository
impl LotRepository for SqliteLotRepository
Source§fn consume(&self, input: ConsumeLot) -> Result<LotTransaction>
fn consume(&self, input: ConsumeLot) -> Result<LotTransaction>
Consume from a lot
Source§fn confirm_reservation(&self, reservation_id: Uuid) -> Result<LotTransaction>
fn confirm_reservation(&self, reservation_id: Uuid) -> Result<LotTransaction>
Confirm a reservation (convert to consumption)
Source§fn transfer(&self, input: TransferLot) -> Result<LotTransaction>
fn transfer(&self, input: TransferLot) -> Result<LotTransaction>
Transfer lot between locations
Source§fn get_transactions(
&self,
lot_id: Uuid,
limit: u32,
) -> Result<Vec<LotTransaction>>
fn get_transactions( &self, lot_id: Uuid, limit: u32, ) -> Result<Vec<LotTransaction>>
Get lot transactions
Source§fn get_quantity_at_location(
&self,
lot_id: Uuid,
location_id: i32,
) -> Result<Option<Decimal>>
fn get_quantity_at_location( &self, lot_id: Uuid, location_id: i32, ) -> Result<Option<Decimal>>
Get lot quantity at a location (None if no location record exists)
Source§fn get_lot_locations(&self, lot_id: Uuid) -> Result<Vec<LotLocation>>
fn get_lot_locations(&self, lot_id: Uuid) -> Result<Vec<LotLocation>>
Get all locations for a lot
Source§fn add_certificate(&self, input: AddLotCertificate) -> Result<LotCertificate>
fn add_certificate(&self, input: AddLotCertificate) -> Result<LotCertificate>
Add certificate to lot
Source§fn get_certificates(&self, lot_id: Uuid) -> Result<Vec<LotCertificate>>
fn get_certificates(&self, lot_id: Uuid) -> Result<Vec<LotCertificate>>
Get certificates for lot
Source§fn get_available_lots_for_sku(&self, sku: &str) -> Result<Vec<Lot>>
fn get_available_lots_for_sku(&self, sku: &str) -> Result<Vec<Lot>>
Get lots with available quantity for SKU
Source§fn trace(&self, lot_id: Uuid) -> Result<TraceabilityResult>
fn trace(&self, lot_id: Uuid) -> Result<TraceabilityResult>
Trace lot (upstream and downstream)
Source§fn create_batch(&self, inputs: Vec<CreateLot>) -> Result<BatchResult<Lot>>
fn create_batch(&self, inputs: Vec<CreateLot>) -> Result<BatchResult<Lot>>
Create multiple lots
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteLotRepository
impl !UnwindSafe for SqliteLotRepository
impl Freeze for SqliteLotRepository
impl Send for SqliteLotRepository
impl Sync for SqliteLotRepository
impl Unpin for SqliteLotRepository
impl UnsafeUnpin for SqliteLotRepository
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