go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/vtgate/planbuilder Index | Files

package planbuilder

import "gopkg.in/src-d/go-vitess.v1/vt/vtgate/planbuilder"

Package planbuilder allows you to build execution plans that describe how to fulfill a query that may span multiple keyspaces or shards. The main entry points for this package are Build and BuildFromStmt.

Index

Package Files

builder.go delete.go doc.go expr.go from.go insert.go join.go jointab.go limit.go merge_sort.go ordered_aggregate.go postprocess.go primitive_builder.go pullout_subquery.go route.go route_option.go select.go subquery.go symtab.go union.go update.go vindex_func.go

func Build Uses

func Build(query string, vschema ContextVSchema) (*engine.Plan, error)

Build builds a plan for a query based on the specified vschema. It's the main entry point for this package.

func BuildFromStmt Uses

func BuildFromStmt(query string, stmt sqlparser.Statement, vschema ContextVSchema) (*engine.Plan, error)

BuildFromStmt builds a plan based on the AST provided. TODO(sougou): The query input is trusted as the source of the AST. Maybe this function just returns instructions and engine.Plan can be built by the caller.

func ResultFromNumber Uses

func ResultFromNumber(rcs []*resultColumn, val *sqlparser.SQLVal) (int, error)

ResultFromNumber returns the result column index based on the column order expression.

type ContextVSchema Uses

type ContextVSchema interface {
    FindTable(tablename sqlparser.TableName) (*vindexes.Table, string, topodatapb.TabletType, key.Destination, error)
    FindTablesOrVindex(tablename sqlparser.TableName) ([]*vindexes.Table, vindexes.Vindex, string, topodatapb.TabletType, key.Destination, error)
    DefaultKeyspace() (*vindexes.Keyspace, error)
    TargetString() string
}

ContextVSchema defines the interface for this package to fetch info about tables.

Package planbuilder imports 14 packages (graph) and is imported by 2 packages. Updated 2019-06-13. Refresh now. Tools for package owners.