Documentation
¶
Overview ¶
planner generates a query plan from an AST (abstract syntax tree) generated by the compiler. The query plan is a tree structure similar to relational algebra. The query plan is then converted to bytecode and fed to the vm (virtual machine) to be ran.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreate ¶
func NewCreate(catalog createCatalog, stmt *compiler.CreateStmt) *createPlanner
NewCreate creates a planner for the given create statement.
func NewInsert ¶
func NewInsert(catalog insertCatalog, stmt *compiler.InsertStmt) *insertPlanner
NewInsert returns an instance of an insert planner for the given AST.
func NewSelect ¶
func NewSelect(catalog selectCatalog, stmt *compiler.SelectStmt) *selectPlanner
NewSelect returns an instance of a select planner for the given AST.
Types ¶
type QueryPlan ¶
type QueryPlan struct { // ExplainQueryPlan is a flag indicating if the SQL asked for the query plan // to be printed as a string representation with `EXPLAIN QUERY PLAN`. ExplainQueryPlan bool // contains filtered or unexported fields }
QueryPlan contains the query plan tree. It is capable of converting the tree to a string representation for a query prefixed with `EXPLAIN QUERY PLAN`.
Click to show internal directories.
Click to hide internal directories.