pub struct Executor<S: KVStore, C: Catalog> { /* private fields */ }Expand description
SQL statement executor.
The Executor takes a LogicalPlan and executes it against the storage layer.
It manages transactions and coordinates between DDL, DML, and Query operations.
§Type Parameters
Implementations§
Source§impl<S: KVStore, C: Catalog> Executor<S, C>
impl<S: KVStore, C: Catalog> Executor<S, C>
Sourcepub fn new(store: Arc<S>, catalog: Arc<RwLock<C>>) -> Self
pub fn new(store: Arc<S>, catalog: Arc<RwLock<C>>) -> Self
Create a new Executor with the given store and catalog.
§Arguments
store: The underlying KV storecatalog: The catalog for metadata operations
Sourcepub fn execute(&mut self, plan: LogicalPlan) -> Result<ExecutionResult>
pub fn execute(&mut self, plan: LogicalPlan) -> Result<ExecutionResult>
Execute a logical plan and return the result.
§Arguments
plan: The logical plan to execute
§Returns
Returns an ExecutionResult on success, or an ExecutorError on failure.
§DDL Operations
CreateTable: Creates a new table with optional PK indexDropTable: Drops a table and its associated indexesCreateIndex: Creates a new indexDropIndex: Drops an index
§DML Operations
Insert: Inserts rows into a tableUpdate: Updates rows in a tableDelete: Deletes rows from a table
§Query Operations
Scan,Filter,Sort,Limit: SELECT query execution
Source§impl<S: KVStore> Executor<S, PersistentCatalog<S>>
impl<S: KVStore> Executor<S, PersistentCatalog<S>>
pub fn execute_in_txn<'a, 'b, 'c>( &mut self, plan: LogicalPlan, txn: &mut BorrowedSqlTransaction<'a, 'b, 'c, S>, ) -> Result<ExecutionResult>
Auto Trait Implementations§
impl<S, C> Freeze for Executor<S, C>
impl<S, C> RefUnwindSafe for Executor<S, C>where
S: RefUnwindSafe,
impl<S, C> Send for Executor<S, C>
impl<S, C> Sync for Executor<S, C>
impl<S, C> Unpin for Executor<S, C>
impl<S, C> UnwindSafe for Executor<S, C>where
S: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more