pub struct SqliteQualityRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteQualityRepository
impl SqliteQualityRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl Debug for SqliteQualityRepository
impl Debug for SqliteQualityRepository
Source§impl QualityRepository for SqliteQualityRepository
impl QualityRepository for SqliteQualityRepository
Source§fn create_inspection(&self, input: CreateInspection) -> Result<Inspection>
fn create_inspection(&self, input: CreateInspection) -> Result<Inspection>
Create a new inspection
Source§fn get_inspection(&self, id: Uuid) -> Result<Option<Inspection>>
fn get_inspection(&self, id: Uuid) -> Result<Option<Inspection>>
Get inspection by ID
Source§fn get_inspection_by_number(&self, number: &str) -> Result<Option<Inspection>>
fn get_inspection_by_number(&self, number: &str) -> Result<Option<Inspection>>
Get inspection by number
Source§fn update_inspection(
&self,
id: Uuid,
input: UpdateInspection,
) -> Result<Inspection>
fn update_inspection( &self, id: Uuid, input: UpdateInspection, ) -> Result<Inspection>
Update an inspection
Source§fn list_inspections(&self, filter: InspectionFilter) -> Result<Vec<Inspection>>
fn list_inspections(&self, filter: InspectionFilter) -> Result<Vec<Inspection>>
List inspections with filter
Source§fn start_inspection(&self, id: Uuid) -> Result<Inspection>
fn start_inspection(&self, id: Uuid) -> Result<Inspection>
Start an inspection
Source§fn complete_inspection(&self, id: Uuid) -> Result<Inspection>
fn complete_inspection(&self, id: Uuid) -> Result<Inspection>
Complete an inspection
Source§fn record_inspection_result(
&self,
input: RecordInspectionResult,
) -> Result<InspectionItem>
fn record_inspection_result( &self, input: RecordInspectionResult, ) -> Result<InspectionItem>
Record inspection result for an item
Source§fn get_inspection_items(
&self,
inspection_id: Uuid,
) -> Result<Vec<InspectionItem>>
fn get_inspection_items( &self, inspection_id: Uuid, ) -> Result<Vec<InspectionItem>>
Get inspection items
Source§fn count_inspections(&self, filter: InspectionFilter) -> Result<u64>
fn count_inspections(&self, filter: InspectionFilter) -> Result<u64>
Count inspections
Source§fn create_ncr(&self, input: CreateNonConformance) -> Result<NonConformance>
fn create_ncr(&self, input: CreateNonConformance) -> Result<NonConformance>
Create a non-conformance report
Source§fn get_ncr_by_number(&self, number: &str) -> Result<Option<NonConformance>>
fn get_ncr_by_number(&self, number: &str) -> Result<Option<NonConformance>>
Get NCR by number
Source§fn update_ncr(
&self,
id: Uuid,
input: UpdateNonConformance,
) -> Result<NonConformance>
fn update_ncr( &self, id: Uuid, input: UpdateNonConformance, ) -> Result<NonConformance>
Update an NCR
Source§fn list_ncrs(&self, filter: NonConformanceFilter) -> Result<Vec<NonConformance>>
fn list_ncrs(&self, filter: NonConformanceFilter) -> Result<Vec<NonConformance>>
List NCRs with filter
Source§fn cancel_ncr(&self, id: Uuid) -> Result<NonConformance>
fn cancel_ncr(&self, id: Uuid) -> Result<NonConformance>
Cancel an NCR
Source§fn count_ncrs(&self, filter: NonConformanceFilter) -> Result<u64>
fn count_ncrs(&self, filter: NonConformanceFilter) -> Result<u64>
Count NCRs
Source§fn create_hold(&self, input: CreateQualityHold) -> Result<QualityHold>
fn create_hold(&self, input: CreateQualityHold) -> Result<QualityHold>
Create a quality hold
Source§fn list_holds(&self, filter: QualityHoldFilter) -> Result<Vec<QualityHold>>
fn list_holds(&self, filter: QualityHoldFilter) -> Result<Vec<QualityHold>>
List holds with filter
Source§fn release_hold(
&self,
id: Uuid,
input: ReleaseQualityHold,
) -> Result<QualityHold>
fn release_hold( &self, id: Uuid, input: ReleaseQualityHold, ) -> Result<QualityHold>
Release a hold
Source§fn get_active_holds_for_sku(&self, sku: &str) -> Result<Vec<QualityHold>>
fn get_active_holds_for_sku(&self, sku: &str) -> Result<Vec<QualityHold>>
Get active holds for SKU
Source§fn get_active_holds_for_lot(&self, lot_number: &str) -> Result<Vec<QualityHold>>
fn get_active_holds_for_lot(&self, lot_number: &str) -> Result<Vec<QualityHold>>
Get active holds for lot
Source§fn count_active_holds(&self) -> Result<u64>
fn count_active_holds(&self) -> Result<u64>
Count active holds
Source§fn create_defect_code(&self, input: CreateDefectCode) -> Result<DefectCode>
fn create_defect_code(&self, input: CreateDefectCode) -> Result<DefectCode>
Create a defect code
Source§fn get_defect_code(&self, code: &str) -> Result<Option<DefectCode>>
fn get_defect_code(&self, code: &str) -> Result<Option<DefectCode>>
Get defect code by code
Source§fn list_defect_codes(&self, category: Option<&str>) -> Result<Vec<DefectCode>>
fn list_defect_codes(&self, category: Option<&str>) -> Result<Vec<DefectCode>>
List defect codes
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteQualityRepository
impl !UnwindSafe for SqliteQualityRepository
impl Freeze for SqliteQualityRepository
impl Send for SqliteQualityRepository
impl Sync for SqliteQualityRepository
impl Unpin for SqliteQualityRepository
impl UnsafeUnpin for SqliteQualityRepository
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