MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / plan_sql

Method plan_sql

nodedb/src/control/planner/context.rs:235–243  ·  view source on GitHub ↗

Parse SQL and convert to NodeDB physical plan(s). Uses nodedb-sql for parsing and planning, then converts to PhysicalTasks. `database_id` scopes catalog lookups to a specific database namespace. Pass `DatabaseId::DEFAULT` when no explicit database scope is needed (e.g. internal queries from event triggers or scheduled jobs).

(
        &self,
        sql: &str,
        tenant_id: crate::types::TenantId,
        database_id: crate::types::DatabaseId,
    )

Source from the content-addressed store, hash-verified

233 /// Pass `DatabaseId::DEFAULT` when no explicit database scope is needed
234 /// (e.g. internal queries from event triggers or scheduled jobs).
235 pub async fn plan_sql(
236 &self,
237 sql: &str,
238 tenant_id: crate::types::TenantId,
239 database_id: crate::types::DatabaseId,
240 ) -> crate::Result<Vec<nodedb_physical::physical_task::PhysicalTask>> {
241 self.plan_with_nodedb_sql(sql, tenant_id, database_id)
242 .map(|(t, _)| t)
243 }
244
245 /// Core planning via nodedb-sql: parse → plan → optimize → convert.
246 ///

Callers 13

execute_then_actionFunction · 0.80
execute_sqlMethod · 0.80
enforce_subquery_checkFunction · 0.80
plan_and_dispatchFunction · 0.80
execute_and_collectFunction · 0.80
handle_analyzeFunction · 0.80
validate_typeguardFunction · 0.80
execute_selectFunction · 0.80
dispatch_sqlFunction · 0.80
execute_sqlFunction · 0.80
consume_remoteFunction · 0.80

Calls 1

plan_with_nodedb_sqlMethod · 0.80

Tested by

no test coverage detected