parse

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedSyntax is thrown when a specific syntax is not already supported
	ErrUnsupportedSyntax = errors.NewKind("unsupported syntax: %s")

	// ErrUnsupportedFeature is thrown when a feature is not already supported
	ErrUnsupportedFeature = errors.NewKind("unsupported feature: %s")

	// ErrInvalidSQLValType is returned when a SQLVal type is not valid.
	ErrInvalidSQLValType = errors.NewKind("invalid SQLVal of type: %d")

	// ErrInvalidSortOrder is returned when a sort order is not valid.
	ErrInvalidSortOrder = errors.NewKind("invalid sort order: %s")

	ErrInvalidIndexPrefix = errors.NewKind("invalid index prefix: %v")

	ErrUnknownIndexColumn = errors.NewKind("unknown column: '%s' in %s index '%s'")

	ErrUnknownConstraintDefinition = errors.NewKind("unknown constraint definition: %s, %T")
)

Functions

func Parse

func Parse(ctx *sql.Context, query string) (sql.Node, error)

Parse parses the given SQL sentence and returns the corresponding node.

func TableSpecToSchema

func TableSpecToSchema(ctx *sql.Context, tableSpec *sqlparser.TableSpec) (sql.Schema, error)

TableSpecToSchema creates a sql.Schema from a parsed TableSpec

Types

This section is empty.

Jump to

Keyboard shortcuts

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