preprocess

package
v0.0.0-...-fe13e1c Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Preprocessing Stuff. DEPRECATED: github.com/src-d/go-mysql-server now supports updates and deletes.

Index

Constants

This section is empty.

Variables

View Source
var (
	ECantUpdatePK        = parse.ErrUnsupportedFeature.New("Can't update primary key")
	EUpdateTooManyTables = parse.ErrUnsupportedFeature.New("Update: too many tables")

	EUpdateSubquery = parse.ErrUnsupportedSyntax.New("Update on Subquery")
)

Functions

func InsertKey

func InsertKey() interface{}

func InsertValue

func InsertValue(ctx *sql.Context) string

func Preprocess

func Preprocess(ctx *sql.Context, cat *sql.Catalog, query sqlparser.Statement) (nc *sql.Context, nq sqlparser.Statement, err error)

Finds unsupported Queries and replaces them with a safe replacement.

func PreprocessSimple

func PreprocessSimple(ctx *sql.Context, cat *sql.Catalog, query string) (nc *sql.Context, nq string, err error)

Types

type PrimaryKeyTable

type PrimaryKeyTable interface {
	// Returns true, if the column is a primary key.
	IsPrimaryKey(column string) bool
}

An sql.Table with a primary key.

Jump to

Keyboard shortcuts

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