pub struct DbBuilder {
migrations_folder: Option<PathBuf>,
tokens: Option<Vec<ApiTokenData>>,
proposals: Option<Vec<FullProposalInfo>>,
funds: Option<Vec<Fund>>,
challenges: Option<Vec<Challenge>>,
advisor_reviews: Option<Vec<AdvisorReview>>,
}
Fields§
§migrations_folder: Option<PathBuf>
§tokens: Option<Vec<ApiTokenData>>
§proposals: Option<Vec<FullProposalInfo>>
§funds: Option<Vec<Fund>>
§challenges: Option<Vec<Challenge>>
§advisor_reviews: Option<Vec<AdvisorReview>>
Implementations§
source§impl DbBuilder
impl DbBuilder
pub fn new() -> Self
pub fn with_tokens(&mut self, tokens: Vec<ApiTokenData>) -> &mut Self
pub fn with_token(&mut self, token: ApiTokenData) -> &mut Self
pub fn with_proposals(&mut self, proposals: Vec<FullProposalInfo>) -> &mut Self
pub fn with_challenges(&mut self, challenges: Vec<Challenge>) -> &mut Self
pub fn with_snapshot(&mut self, snapshot: &Snapshot) -> &mut Self
pub fn with_funds(&mut self, funds: Vec<Fund>) -> &mut Self
pub fn with_advisor_reviews(&mut self, reviews: Vec<AdvisorReview>) -> &mut Self
pub fn disable_migrations(&mut self) -> &mut Self
pub fn with_migrations_from<P: AsRef<Path>>( &mut self, migrations_folder: P ) -> &mut Self
fn do_migration( &self, connection: &SqliteConnection, migration_folder: &Path ) -> Result<(), DbBuilderError>
fn try_do_migration( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
fn try_insert_tokens( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
fn try_insert_funds( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
fn try_insert_proposals( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
fn try_insert_challenges( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
fn try_insert_reviews( &self, connection: &SqliteConnection ) -> Result<(), DbBuilderError>
pub fn build(&self, temp_dir: &TempDir) -> Result<PathBuf, DbBuilderError>
pub fn build_into_path<P: AsRef<Path>>( &self, path: P ) -> Result<PathBuf, DbBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DbBuilder
impl Send for DbBuilder
impl Sync for DbBuilder
impl Unpin for DbBuilder
impl UnwindSafe for DbBuilder
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