pub struct SqliteBomRepository { /* private fields */ }Available on crate feature
sqlite only.Expand description
SQLite implementation of BomRepository
Implementations§
Source§impl SqliteBomRepository
impl SqliteBomRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl BomRepository for SqliteBomRepository
impl BomRepository for SqliteBomRepository
Source§fn get_by_number(&self, bom_number: &str) -> Result<Option<BillOfMaterials>>
fn get_by_number(&self, bom_number: &str) -> Result<Option<BillOfMaterials>>
Get BOM by BOM number
Source§fn add_component(
&self,
bom_id: Uuid,
component: CreateBomComponent,
) -> Result<BomComponent>
fn add_component( &self, bom_id: Uuid, component: CreateBomComponent, ) -> Result<BomComponent>
Add component to BOM
Source§fn update_component(
&self,
component_id: Uuid,
component: CreateBomComponent,
) -> Result<BomComponent>
fn update_component( &self, component_id: Uuid, component: CreateBomComponent, ) -> Result<BomComponent>
Update a BOM component
Source§fn get_components(&self, bom_id: Uuid) -> Result<Vec<BomComponent>>
fn get_components(&self, bom_id: Uuid) -> Result<Vec<BomComponent>>
Get all components for a BOM
Source§fn activate(&self, id: Uuid) -> Result<BillOfMaterials>
fn activate(&self, id: Uuid) -> Result<BillOfMaterials>
Activate a BOM (make it ready for production use)
Source§fn create_batch(
&self,
inputs: Vec<CreateBom>,
) -> Result<BatchResult<BillOfMaterials>>
fn create_batch( &self, inputs: Vec<CreateBom>, ) -> Result<BatchResult<BillOfMaterials>>
Create multiple BOMs - partial success allowed
Source§fn create_batch_atomic(
&self,
inputs: Vec<CreateBom>,
) -> Result<Vec<BillOfMaterials>>
fn create_batch_atomic( &self, inputs: Vec<CreateBom>, ) -> Result<Vec<BillOfMaterials>>
Create multiple BOMs - atomic (all-or-nothing)
Source§fn update_batch(
&self,
updates: Vec<(Uuid, UpdateBom)>,
) -> Result<BatchResult<BillOfMaterials>>
fn update_batch( &self, updates: Vec<(Uuid, UpdateBom)>, ) -> Result<BatchResult<BillOfMaterials>>
Update multiple BOMs - partial success allowed
Source§fn update_batch_atomic(
&self,
updates: Vec<(Uuid, UpdateBom)>,
) -> Result<Vec<BillOfMaterials>>
fn update_batch_atomic( &self, updates: Vec<(Uuid, UpdateBom)>, ) -> Result<Vec<BillOfMaterials>>
Update multiple BOMs - atomic (all-or-nothing)
Source§fn delete_batch(&self, ids: Vec<Uuid>) -> Result<BatchResult<Uuid>>
fn delete_batch(&self, ids: Vec<Uuid>) -> Result<BatchResult<Uuid>>
Delete multiple BOMs - partial success allowed
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteBomRepository
impl !UnwindSafe for SqliteBomRepository
impl Freeze for SqliteBomRepository
impl Send for SqliteBomRepository
impl Sync for SqliteBomRepository
impl Unpin for SqliteBomRepository
impl UnsafeUnpin for SqliteBomRepository
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