pub struct SqliteSubmoduleRepository { /* private fields */ }Expand description
SQLite-backed submodule repository.
Implementations§
Source§impl SqliteSubmoduleRepository
impl SqliteSubmoduleRepository
Sourcepub fn new(conn: Arc<Mutex<Connection>>) -> Self
pub fn new(conn: Arc<Mutex<Connection>>) -> Self
Create a new repository backed by the given connection.
Trait Implementations§
Source§impl Clone for SqliteSubmoduleRepository
impl Clone for SqliteSubmoduleRepository
Source§fn clone(&self) -> SqliteSubmoduleRepository
fn clone(&self) -> SqliteSubmoduleRepository
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SqliteSubmoduleRepository
impl Debug for SqliteSubmoduleRepository
Source§impl SubmoduleRepository for SqliteSubmoduleRepository
impl SubmoduleRepository for SqliteSubmoduleRepository
Source§fn insert(&self, input: &SubmoduleInput) -> Result<SubmoduleRow, StorageError>
fn insert(&self, input: &SubmoduleInput) -> Result<SubmoduleRow, StorageError>
Insert a new submodule record. Returns the full row (with generated
id
and timestamps).Source§fn update(&self, input: &SubmoduleInput) -> Result<(), StorageError>
fn update(&self, input: &SubmoduleInput) -> Result<(), StorageError>
Update an existing submodule by its
relative_path.Source§fn upsert(&self, input: &SubmoduleInput) -> Result<(), StorageError>
fn upsert(&self, input: &SubmoduleInput) -> Result<(), StorageError>
Insert or update a submodule record atomically. Read more
Source§fn delete(&self, relative_path: &str) -> Result<(), StorageError>
fn delete(&self, relative_path: &str) -> Result<(), StorageError>
Delete a submodule record by its
relative_path.Source§fn list(&self) -> Result<Vec<SubmoduleRow>, StorageError>
fn list(&self) -> Result<Vec<SubmoduleRow>, StorageError>
List all submodules, sorted by
relative_path.Source§fn find_by_path(
&self,
relative_path: &str,
) -> Result<Option<SubmoduleRow>, StorageError>
fn find_by_path( &self, relative_path: &str, ) -> Result<Option<SubmoduleRow>, StorageError>
Find a submodule by its mount path relative to the repo root.
Returns
None if no record exists for this path.Auto Trait Implementations§
impl Freeze for SqliteSubmoduleRepository
impl RefUnwindSafe for SqliteSubmoduleRepository
impl Send for SqliteSubmoduleRepository
impl Sync for SqliteSubmoduleRepository
impl Unpin for SqliteSubmoduleRepository
impl UnsafeUnpin for SqliteSubmoduleRepository
impl UnwindSafe for SqliteSubmoduleRepository
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