MCPcopy Create free account
hub / github.com/douglance/devsql / load_tables_for_query

Method load_tables_for_query

crates/vcsql/src/sql/engine.rs:128–134  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 ///

Callers 4

execute_queryFunction · 0.80
test_query_commitsFunction · 0.80
test_query_branchesFunction · 0.80

Calls 1

load_tableMethod · 0.80

Tested by 3

test_query_commitsFunction · 0.64
test_query_branchesFunction · 0.64