Skip to content

Commit

Permalink
rename create_all_tables to create_missing_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmicu committed Nov 27, 2023
1 parent 29a1be8 commit c6f96fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl Valve {
/// Create all configured database tables and views
/// if they do not already exist as configured.
/// Return an error on database problems.
pub async fn create_all_tables(&mut self, verbose: bool) -> Result<&mut Self, sqlx::Error> {
pub async fn create_missing_tables(&mut self, verbose: bool) -> Result<&mut Self, sqlx::Error> {
// DatabaseError
let mut tables_config = self
.global_config
Expand Down Expand Up @@ -260,7 +260,7 @@ impl Valve {
/// Return an error on invalid table name or database problem.
pub fn truncate_tables(&self, tables: Vec<&str>) -> Result<&Self, sqlx::Error> {
// ConfigOrDatabaseError
//self.create_all_tables();
//self.create_missing_tables();
todo!();
Ok(self)
}
Expand All @@ -270,8 +270,10 @@ impl Valve {
/// Return an error on database problem,
/// including database conflicts that prevent rows being inserted.
pub fn load_all_tables(&self, validate: bool) -> Result<&Self, sqlx::Error> {
// YOU ARE HERE.

// DatabaseError
//self.create_all_tables();
//self.create_missing_tables();
//self.truncate_all_tables();
todo!();
Ok(self)
Expand All @@ -283,7 +285,7 @@ impl Valve {
/// Return an error on invalid table name or database problem.
pub fn load_tables(&self, tables: Vec<&str>, validate: bool) -> Result<&Self, sqlx::Error> {
// ConfigOrDatabaseError
//self.create_all_tables();
//self.create_missing_tables();
//self.truncate_tables(tables);
todo!();
Ok(self)
Expand Down

0 comments on commit c6f96fc

Please sign in to comment.