pub struct SqliteShipmentRepository { /* private fields */ }Available on crate feature
sqlite only.Expand description
SQLite implementation of ShipmentRepository
Implementations§
Source§impl SqliteShipmentRepository
impl SqliteShipmentRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqliteShipmentRepository
impl Debug for SqliteShipmentRepository
Source§impl ShipmentRepository for SqliteShipmentRepository
impl ShipmentRepository for SqliteShipmentRepository
Source§fn get_by_number(&self, shipment_number: &str) -> Result<Option<Shipment>>
fn get_by_number(&self, shipment_number: &str) -> Result<Option<Shipment>>
Get shipment by shipment number
Source§fn get_by_tracking(&self, tracking_number: &str) -> Result<Option<Shipment>>
fn get_by_tracking(&self, tracking_number: &str) -> Result<Option<Shipment>>
Get shipment by tracking number
Source§fn update(&self, id: ShipmentId, input: UpdateShipment) -> Result<Shipment>
fn update(&self, id: ShipmentId, input: UpdateShipment) -> Result<Shipment>
Update a shipment
Source§fn mark_processing(&self, id: ShipmentId) -> Result<Shipment>
fn mark_processing(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as processing
Source§fn mark_ready(&self, id: ShipmentId) -> Result<Shipment>
fn mark_ready(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as ready to ship
Source§fn ship(
&self,
id: ShipmentId,
tracking_number: Option<String>,
) -> Result<Shipment>
fn ship( &self, id: ShipmentId, tracking_number: Option<String>, ) -> Result<Shipment>
Mark shipment as shipped with tracking number
Source§fn mark_in_transit(&self, id: ShipmentId) -> Result<Shipment>
fn mark_in_transit(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as in transit
Source§fn mark_out_for_delivery(&self, id: ShipmentId) -> Result<Shipment>
fn mark_out_for_delivery(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as out for delivery
Source§fn mark_delivered(&self, id: ShipmentId) -> Result<Shipment>
fn mark_delivered(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as delivered
Source§fn mark_failed(&self, id: ShipmentId) -> Result<Shipment>
fn mark_failed(&self, id: ShipmentId) -> Result<Shipment>
Mark shipment as failed delivery
Source§fn add_item(
&self,
shipment_id: ShipmentId,
item: CreateShipmentItem,
) -> Result<ShipmentItem>
fn add_item( &self, shipment_id: ShipmentId, item: CreateShipmentItem, ) -> Result<ShipmentItem>
Add item to shipment
Source§fn get_items(&self, shipment_id: ShipmentId) -> Result<Vec<ShipmentItem>>
fn get_items(&self, shipment_id: ShipmentId) -> Result<Vec<ShipmentItem>>
Get items in shipment
Source§fn add_event(
&self,
shipment_id: ShipmentId,
event: AddShipmentEvent,
) -> Result<ShipmentEvent>
fn add_event( &self, shipment_id: ShipmentId, event: AddShipmentEvent, ) -> Result<ShipmentEvent>
Add tracking event
Source§fn get_events(&self, shipment_id: ShipmentId) -> Result<Vec<ShipmentEvent>>
fn get_events(&self, shipment_id: ShipmentId) -> Result<Vec<ShipmentEvent>>
Get tracking events for shipment
Source§fn create_batch(
&self,
inputs: Vec<CreateShipment>,
) -> Result<BatchResult<Shipment>>
fn create_batch( &self, inputs: Vec<CreateShipment>, ) -> Result<BatchResult<Shipment>>
Create multiple shipments - partial success allowed
Source§fn create_batch_atomic(
&self,
inputs: Vec<CreateShipment>,
) -> Result<Vec<Shipment>>
fn create_batch_atomic( &self, inputs: Vec<CreateShipment>, ) -> Result<Vec<Shipment>>
Create multiple shipments - atomic (all-or-nothing)
Source§fn update_batch(
&self,
updates: Vec<(ShipmentId, UpdateShipment)>,
) -> Result<BatchResult<Shipment>>
fn update_batch( &self, updates: Vec<(ShipmentId, UpdateShipment)>, ) -> Result<BatchResult<Shipment>>
Update multiple shipments - partial success allowed
Source§fn update_batch_atomic(
&self,
updates: Vec<(ShipmentId, UpdateShipment)>,
) -> Result<Vec<Shipment>>
fn update_batch_atomic( &self, updates: Vec<(ShipmentId, UpdateShipment)>, ) -> Result<Vec<Shipment>>
Update multiple shipments - atomic (all-or-nothing)
Source§fn delete_batch(&self, ids: Vec<ShipmentId>) -> Result<BatchResult<Uuid>>
fn delete_batch(&self, ids: Vec<ShipmentId>) -> Result<BatchResult<Uuid>>
Delete multiple shipments - partial success allowed
Source§fn delete_batch_atomic(&self, ids: Vec<ShipmentId>) -> Result<()>
fn delete_batch_atomic(&self, ids: Vec<ShipmentId>) -> Result<()>
Delete multiple shipments - atomic (all-or-nothing)
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteShipmentRepository
impl !UnwindSafe for SqliteShipmentRepository
impl Freeze for SqliteShipmentRepository
impl Send for SqliteShipmentRepository
impl Sync for SqliteShipmentRepository
impl Unpin for SqliteShipmentRepository
impl UnsafeUnpin for SqliteShipmentRepository
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