Skip to main content

SqliteWarehouseRepository

Struct SqliteWarehouseRepository 

Source
pub struct SqliteWarehouseRepository { /* private fields */ }
Available on crate feature sqlite only.
Expand description

SQLite warehouse repository

Implementations§

Trait Implementations§

Source§

impl Debug for SqliteWarehouseRepository

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl WarehouseRepository for SqliteWarehouseRepository

Source§

fn create_warehouse(&self, input: CreateWarehouse) -> Result<Warehouse>

Create a new warehouse
Source§

fn get_warehouse(&self, id: i32) -> Result<Option<Warehouse>>

Get warehouse by ID
Source§

fn get_warehouse_by_code(&self, code: &str) -> Result<Option<Warehouse>>

Get warehouse by code
Source§

fn update_warehouse(&self, id: i32, input: UpdateWarehouse) -> Result<Warehouse>

Update a warehouse
Source§

fn list_warehouses(&self, filter: WarehouseFilter) -> Result<Vec<Warehouse>>

List warehouses with filter
Source§

fn delete_warehouse(&self, id: i32) -> Result<()>

Delete a warehouse (only if empty)
Source§

fn count_warehouses(&self, filter: WarehouseFilter) -> Result<u64>

Count warehouses
Source§

fn create_zone(&self, input: CreateZone) -> Result<Zone>

Create a zone
Source§

fn get_zone(&self, id: i32) -> Result<Option<Zone>>

Get zone by ID
Source§

fn get_zones(&self, warehouse_id: i32) -> Result<Vec<Zone>>

Get zones for warehouse
Source§

fn update_zone(&self, id: i32, input: UpdateZone) -> Result<Zone>

Update a zone
Source§

fn delete_zone(&self, id: i32) -> Result<()>

Delete a zone
Source§

fn create_location(&self, input: CreateLocation) -> Result<Location>

Create a location
Source§

fn get_location(&self, id: i32) -> Result<Option<Location>>

Get location by ID
Source§

fn get_location_by_code( &self, warehouse_id: i32, code: &str, ) -> Result<Option<Location>>

Get location by code
Source§

fn update_location(&self, id: i32, input: UpdateLocation) -> Result<Location>

Update a location
Source§

fn list_locations(&self, filter: LocationFilter) -> Result<Vec<Location>>

List locations with filter
Source§

fn delete_location(&self, id: i32) -> Result<()>

Delete a location (only if empty)
Source§

fn count_locations(&self, filter: LocationFilter) -> Result<u64>

Count locations
Source§

fn get_locations_for_warehouse( &self, warehouse_id: i32, ) -> Result<Vec<Location>>

Get locations for warehouse
Source§

fn get_pickable_locations( &self, warehouse_id: i32, sku: &str, ) -> Result<Vec<Location>>

Get pickable locations for SKU
Source§

fn get_receivable_locations(&self, warehouse_id: i32) -> Result<Vec<Location>>

Get receivable locations
Source§

fn get_location_inventory( &self, location_id: i32, ) -> Result<Vec<LocationInventory>>

Get inventory at location
Source§

fn get_inventory_for_sku( &self, warehouse_id: i32, sku: &str, ) -> Result<Vec<LocationInventory>>

Get inventory for SKU across locations
Source§

fn adjust_inventory( &self, input: AdjustLocationInventory, ) -> Result<LocationInventory>

Adjust inventory at location
Source§

fn move_inventory(&self, input: MoveInventory) -> Result<LocationMovement>

Move inventory between locations
Source§

fn list_location_inventory( &self, filter: LocationInventoryFilter, ) -> Result<Vec<LocationInventory>>

Get location inventory by filter
Source§

fn get_movements(&self, filter: MovementFilter) -> Result<Vec<LocationMovement>>

Get inventory movements
Source§

fn count_movements(&self, filter: MovementFilter) -> Result<u64>

Count movements
Source§

fn create_locations_batch( &self, inputs: Vec<CreateLocation>, ) -> Result<BatchResult<Location>>

Create multiple locations
Source§

fn get_locations_batch(&self, ids: Vec<i32>) -> Result<Vec<Location>>

Get multiple locations by ID
Source§

fn create_cycle_count(&self, input: CreateCycleCount) -> Result<CycleCount>

Create a cycle count (draft) with its expected lines
Source§

fn get_cycle_count(&self, id: Uuid) -> Result<Option<CycleCount>>

Get a cycle count (with lines) by ID
Source§

fn list_cycle_counts(&self, filter: CycleCountFilter) -> Result<Vec<CycleCount>>

List cycle counts (with lines) matching the filter
Source§

fn start_cycle_count(&self, id: Uuid) -> Result<CycleCount>

Start a draft cycle count (draft → in_progress)
Source§

fn record_cycle_counts( &self, id: Uuid, counts: Vec<RecordCycleCountLine>, ) -> Result<CycleCount>

Record physical counts against an in-progress cycle count
Source§

fn complete_cycle_count(&self, id: Uuid) -> Result<CycleCount>

Complete an in-progress cycle count: computes variances and applies inventory adjustments (recorded as cycle_count movements)
Source§

fn cancel_cycle_count(&self, id: Uuid) -> Result<CycleCount>

Cancel a draft or in-progress cycle count

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more