analyzer

package
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignInsertCasts

func AssignInsertCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

AssignInsertCasts adds the appropriate assign casts for insertions.

func AssignUpdateCasts

func AssignUpdateCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

AssignUpdateCasts adds the appropriate assign casts for updates.

func Init

func Init()

Init adds additional rules to the analyzer to handle Doltgres-specific functionality.

func InsertContextRootFinalizer

func InsertContextRootFinalizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

InsertContextRootFinalizer inserts a ContextRootFinalizer node right before the transaction commits, yet after all other nodes have finished. This ensures that the ContextRootFinalizer does not overwrite any changes from its children.

func ReplaceIndexedTables added in v0.12.0

func ReplaceIndexedTables(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

ReplaceIndexedTables replaces Dolt tables with Doltgres tables that can properly handle indexed access.

func ReplaceSerial

func ReplaceSerial(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

ReplaceSerial replaces a CreateTable node containing a SERIAL type with a node that can create sequences alongside the table.

func TypeSanitizer

func TypeSanitizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)

TypeSanitizer converts all GMS types into Doltgres types. Some places, such as parameter binding, will always default to GMS types, so by taking care of all conversions here, we can ensure that Doltgres only needs to worry about its own types.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL