Loads all tables referenced in a query from the repository. Analyzes the query to determine which tables are needed, then loads each one.
(&mut self, query: &str, repo: &mut GitRepo)
| 126 | /// |
| 127 | /// Analyzes the query to determine which tables are needed, then loads each one. |
| 128 | pub fn load_tables_for_query(&mut self, query: &str, repo: &mut GitRepo) -> Result<()> { |
| 129 | let tables = Self::extract_table_names(query); |
| 130 | for table in tables { |
| 131 | self.load_table(&table, repo)?; |
| 132 | } |
| 133 | Ok(()) |
| 134 | } |
| 135 | |
| 136 | /// Executes a SQL query and returns the results. |
| 137 | /// |