diff --git a/src/query_operations/mod.rs b/src/query_operations/mod.rs index 4074cc9..ac00e06 100644 --- a/src/query_operations/mod.rs +++ b/src/query_operations/mod.rs @@ -22,3 +22,13 @@ pub struct Query { pub update_data: Option, pub row_data: Option, } + + +#[derive(Debug, PartialEq, Serialize, Deserialize, Clone)] +pub struct ForeignKeyConstraint { + pub table_name: String, + pub column_name: String, + pub foreign_table_name: String, + pub foreign_column_name: String, +} + diff --git a/src/query_operations/query.rs b/src/query_operations/query.rs index 4face82..3fba06c 100644 --- a/src/query_operations/query.rs +++ b/src/query_operations/query.rs @@ -69,10 +69,10 @@ impl Query { let mut db = Database::load_from_file(&self.db_file_name) .await .map_err(DatabaseError::LoadError)?; - self.handle_execute_add_sync(&mut db).await // Shared logic + self.handle_execute_add(&mut db).await // Shared logic } - async fn handle_execute_add_sync(&self, db: &mut Database) -> Result<(), DatabaseError> { + async fn handle_execute_add(&self, db: &mut Database) -> Result<(), DatabaseError> { let table_name = self .table_name .clone()