pub struct ExplainResult {
pub plan: PlanNode,
pub format: ExplainFormat,
}Expand description
Result of EXPLAIN operation
Fields§
§plan: PlanNodeRoot node of the execution plan
format: ExplainFormatOutput format
Implementations§
Source§impl ExplainResult
impl ExplainResult
Sourcepub fn to_sqlite_eqp(&self) -> String
pub fn to_sqlite_eqp(&self) -> String
Format the plan as SQLite-compatible EXPLAIN QUERY PLAN output
Produces output like:
QUERY PLAN
|--SCAN t1 USING INDEX i1
`--USE TEMP B-TREE FOR LAST TERM OF ORDER BYFor compound queries:
QUERY PLAN
`--COMPOUND QUERY
|--LEFT-MOST SUBQUERY
| `--SCAN t1
`--UNION ALL
`--SCAN t2The “QUERY PLAN” header is included to match SQLite’s EQP format used in TCL tests with full format comparison (do_eqp_test with QUERY PLAN prefix).
Sourcepub fn to_sqlite_vm(&self) -> SqliteVmOutput
pub fn to_sqlite_vm(&self) -> SqliteVmOutput
Format the plan as SQLite-compatible EXPLAIN output (VM bytecode style)
This produces output mimicking SQLite’s VDBE bytecode format:
addr opcode p1 p2 p3 p4 p5 comment
---- ------------- ---- ---- ---- ------------- -- -------------
0 Init 0 8 0 0 Start at 8
1 OpenRead 0 2 0 2 0 root=2 iDb=0; t1
...Note: This is a synthetic representation since VibeSQL doesn’t use SQLite’s VM. The opcodes are generated to approximate what SQLite would produce.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExplainResult
impl RefUnwindSafe for ExplainResult
impl Send for ExplainResult
impl Sync for ExplainResult
impl Unpin for ExplainResult
impl UnwindSafe for ExplainResult
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more