pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open (or create) the database at path and enable foreign keys.
Sourcepub fn ensure_schema(&self) -> Result<()>
pub fn ensure_schema(&self) -> Result<()>
Create tables and indexes if they do not yet exist, and apply any additive migrations needed for older databases.
Sourcepub fn seed_projects(&self) -> Result<()>
pub fn seed_projects(&self) -> Result<()>
Insert the Bitcoin Core project row if not already present.
Sourcepub fn get_bitcoin_core_project_id(&self) -> Result<i64>
pub fn get_bitcoin_core_project_id(&self) -> Result<i64>
Return the id of the Bitcoin Core project row.
Sourcepub fn create_run(
&self,
project_id: i64,
commit_hash: &str,
tool_version: &str,
pr_number: Option<u32>,
config_json: Option<&str>,
) -> Result<i64>
pub fn create_run( &self, project_id: i64, commit_hash: &str, tool_version: &str, pr_number: Option<u32>, config_json: Option<&str>, ) -> Result<i64>
Create a new run row and return its id.
Sourcepub fn insert_mutant_batch(
&mut self,
run_id: i64,
mutants: &[MutantData],
) -> Result<()>
pub fn insert_mutant_batch( &mut self, run_id: i64, mutants: &[MutantData], ) -> Result<()>
Batch-insert mutants under run_id using a single transaction.
Duplicates (same run_id + patch_hash) are silently ignored.
Auto Trait Implementations§
impl !Freeze for Database
impl !RefUnwindSafe for Database
impl Send for Database
impl !Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl !UnwindSafe for Database
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