plan

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 25 Imported by: 27

Documentation

Index

Constants

View Source
const (
	QueryTypeSelect = iota
	QueryTypeDdl
	QueryTypeUpdate
)
View Source
const (
	InsertTrigger TriggerEvent = "insert"
	UpdateTrigger              = "update"
	DeleteTrigger              = "delete"
)
View Source
const DualTableName = ""

DualTableName is empty string because no table with empty name can be created

View Source
const DynamicPrivilege_ReplicationSlaveAdmin = "replication_slave_admin"

DynamicPrivilege_ReplicationSlaveAdmin is the dynamic privilege required to execute replication commands. https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_replication-slave-admin

Variables

View Source
var (
	// ErrNoCheckConstraintSupport is returned when the table does not support CONSTRAINT CHECK operations.
	ErrNoCheckConstraintSupport = errors.NewKind("the table does not support check constraint operations: %s")

	// ErrCheckViolated is returned when the check constraint evaluates to false
	ErrCheckViolated = errors.NewKind("check constraint %s is violated.")
)
View Source
var (
	// ErrIndexActionNotImplemented is returned when the action has not been implemented
	ErrIndexActionNotImplemented = errors.NewKind("alter table index action is not implemented: %v")
	// ErrCreateIndexMissingColumns is returned when a CREATE INDEX statement does not provide any columns
	ErrCreateIndexMissingColumns = errors.NewKind("cannot create an index without columns")
	// ErrCreateIndexNonExistentColumn is returned when a key is provided in the index that isn't in the table
	ErrCreateIndexNonExistentColumn = errors.NewKind("column `%v` does not exist in the table")
	// ErrCreateIndexDuplicateColumn is returned when a CREATE INDEX statement has the same column multiple times
	ErrCreateIndexDuplicateColumn = errors.NewKind("cannot have duplicates of columns in an index: `%v`")
)
View Source
var (
	// ErrNotIndexable is returned when the table is not indexable.
	ErrNotIndexable = errors.NewKind("the table is not indexable")

	// ErrInvalidIndexDriver is returned when the index driver can't be found.
	ErrInvalidIndexDriver = errors.NewKind("invalid driver index %q")

	// ErrExprTypeNotIndexable is returned when the expression type cannot be
	// indexed, such as BLOB or JSON.
	ErrExprTypeNotIndexable = errors.NewKind("expression %q with type %s cannot be indexed")
)
View Source
var (
	// ErrIndexNotFound is returned when the index cannot be found.
	ErrIndexNotFound = errors.NewKind("unable to find index %q on table %q of database %q")
	// ErrTableNotValid is returned when the table is not valid
	ErrTableNotValid = errors.NewKind("table is not valid")
	// ErrTableNotNameable is returned when the table is not nameable.
	ErrTableNotNameable = errors.NewKind("can't get name from table")
	// ErrIndexNotAvailable is returned when trying to delete an index that is
	// still not ready for usage.
	ErrIndexNotAvailable = errors.NewKind("index %q is still not ready for usage and can't be deleted")
)
View Source
var CachedResultsGlobalCache = NewCachedResultsManager()

CachedResultsGlobalCache manages the caches created by CachedResults nodes.

View Source
var DescribeSchema = sql.Schema{
	{Name: "plan", Type: VarChar25000},
}

DescribeSchema is the schema returned by a DescribeQuery node.

View Source
var DualTableSchema = sql.NewPrimaryKeySchema(sql.Schema{
	{Name: "", Source: DualTableName, Type: types.LongText, Nullable: false},
})

DualTableSchema has a single column with empty name because no table can be created with empty string column name or no alias name can be empty string. This avoids any alias name to be considered as GetField of dual table.

View Source
var EmptyIter = &emptyCacheIter{}
View Source
var ErrAggregationMissingWindow = errors.New("aggregation missing window expression")
View Source
var ErrAutoIncrementNotSupported = errors.NewKind("table doesn't support AUTO_INCREMENT")
View Source
var ErrDeleteFromNotSupported = errors.NewKind("table doesn't support DELETE FROM")
View Source
var ErrDropViewChild = errors.NewKind("any child of DropView must be of type SingleDropView")
View Source
var ErrEmptyCachedResult = errors.New("CachedResult contains no rows")
View Source
var ErrGroupBy = errors.NewKind("group by aggregation '%v' not supported")

ErrGroupBy is returned when the aggregation is not supported.

View Source
var ErrInsertIntoDuplicateColumn = errors.NewKind("duplicate column name %v")
View Source
var ErrInsertIntoIncompatibleTypes = errors.NewKind("cannot convert type %s to %s")
View Source
var ErrInsertIntoMismatchValueCount = errors.NewKind("number of values does not match number of columns provided")
View Source
var ErrInsertIntoNonexistentColumn = errors.NewKind("invalid column name %v")
View Source
var ErrInsertIntoNotSupported = errors.NewKind("table doesn't support INSERT INTO")

ErrInsertIntoNotSupported is thrown when a table doesn't support inserts

View Source
var ErrInsertIntoUnsupportedValues = errors.NewKind("%T is unsupported for inserts")
View Source
var ErrInvalidLookupForIndexedTable = errors.NewKind("indexable table does not support given lookup: %s")
View Source
var ErrNoIndexableTable = errors.NewKind("expected an IndexableTable, couldn't find one in %v")
View Source
var ErrNoIndexedTableAccess = errors.NewKind("expected an IndexedTableAccess, couldn't find one in %v")
View Source
var ErrNoPartitionable = errors.NewKind("no partitionable node found in exchange tree")

ErrNoPartitionable is returned when no Partitionable node is found in the Exchange tree.

View Source
var ErrNoReplicationController = errors.NewKind("no replication controller available")

ErrNoReplicationController is returned when replication commands are executed without a configured replication controller to dispatch the command to.

View Source
var ErrNotPrimaryKeyAlterable = errors.NewKind("error: table is not primary key alterable")

ErrNotPrimaryKeyAlterable is return when a table cannot be determined to be primary key alterable

View Source
var ErrNotView = errors.NewKind("'%' is not VIEW")
View Source
var ErrOnDuplicateKeyUpdateNotSupported = errors.NewKind("table doesn't support ON DUPLICATE KEY UPDATE")
View Source
var ErrReplaceIntoNotSupported = errors.NewKind("table doesn't support REPLACE INTO")
View Source
var ErrRowIterDisposed = errors.New("attempted to call RowIter() on a disposed Node")
View Source
var ErrTruncateNotSupported = errors.NewKind("table doesn't support TRUNCATE")
View Source
var ErrUnresolvedTable = errors.NewKind("unresolved table")

ErrUnresolvedTable is thrown when a table cannot be resolved

View Source
var ErrUpdateForTableNotSupported = errors.NewKind("The target table %s of the UPDATE is not updatable")
View Source
var ErrUpdateNotSupported = errors.NewKind("table doesn't support UPDATE")
View Source
var ErrUpdateUnexpectedSetResult = errors.NewKind("attempted to set field but expression returned %T")

cc: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-strict The INSERT IGNORE syntax applies to these ignorable errors ER_BAD_NULL_ERROR - yes ER_DUP_ENTRY - yes ER_DUP_ENTRY_WITH_KEY_NAME - Yes ER_DUP_KEY - kinda ER_NO_PARTITION_FOR_GIVEN_VALUE - yes ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT - No ER_NO_REFERENCED_ROW_2 - Yes ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET - No ER_ROW_IS_REFERENCED_2 - Yes ER_SUBQUERY_NO_1_ROW - yes ER_VIEW_CHECK_FAILED - No

Functions

func ApplyBindings

func ApplyBindings(n sql.Node, bindings map[string]sql.Expression) (sql.Node, map[string]bool, error)

ApplyBindings replaces all `BindVar` expressions in the given sql.Node with their corresponding sql.Expression entries in the provided |bindings| map. If a binding for a |BindVar| expression is not found in the map, no error is returned and the |BindVar| expression is left in place. There is no check on whether all entries in |bindings| are used at least once throughout the |n| but a map of all the used |bindings| are returned. sql.DeferredType instances will be resolved by the binding types.

func FindForeignKeyColMapping added in v0.12.0

func FindForeignKeyColMapping(
	ctx *sql.Context,
	fkName string,
	localTbl sql.ForeignKeyTable,
	localFKCols []string,
	destFKCols []string,
	index sql.Index,
) ([]int, []sql.Type, error)

FindForeignKeyColMapping returns the mapping from a given row to its equivalent index position, based on the matching foreign key columns. This also verifies that the column types match, as it is a prerequisite for mapping. For foreign keys that do not match the full index, also returns the types to append during the key mapping, as all index columns must have a column expression. All strings are case-insensitive.

func FindIndexWithPrefix added in v0.12.0

func FindIndexWithPrefix(ctx *sql.Context, tbl sql.IndexAddressableTable, prefixCols []string, ignoredIndexes ...string) (sql.Index, bool, error)

FindIndexWithPrefix returns an index that has the given columns as a prefix. The returned index is deterministic and follows the given rules, from the highest priority in descending order:

1. Columns exactly match the index 2. Columns match as much of the index prefix as possible 3. Unique index before non-unique 4. Largest index by column count 5. Index ID in ascending order

The prefix columns may be in any order, and the returned index will contain all of the prefix columns within its prefix. For example, the slices [col1, col2] and [col2, col1] will match the same index, as their ordering does not matter. The index [col1, col2, col3] would match, but the index [col1, col3] would not match as it is missing "col2". Prefix columns are case-insensitive.

func GetColumnFromIndexExpr

func GetColumnFromIndexExpr(expr string, table sql.Table) *sql.Column

GetColumnFromIndexExpr returns column from the table given using the expression string given, in the form "table.column". Returns nil if the expression doesn't represent a column.

func GetDatabaseCollation added in v0.14.0

func GetDatabaseCollation(ctx *sql.Context, db sql.Database) sql.CollationID

GetDatabaseCollation returns a database's collation. Also handles when a database does not explicitly support collations.

func GetDatabaseName added in v0.15.0

func GetDatabaseName(nodeToSearch sql.Node) string

GetDatabaseName attempts to fetch the database name from the node. If not found directly on the node, searches the children. Returns the first database name found, regardless of whether there are more, therefore this is only intended to be used in situations where only a single database is expected to be found. Unlike how tables are handled in most nodes, databases may be stored as a string field therefore there will be situations where a database name exists on a node, but cannot be found through inspection.

func GetDeletable added in v0.12.0

func GetDeletable(node sql.Node) (sql.DeletableTable, error)

func GetIndexLookup added in v0.12.0

func GetIndexLookup(ita *IndexedTableAccess) sql.IndexLookup

GetIndexLookup returns the sql.IndexLookup from an IndexedTableAccess. This method is exported for use in integration tests.

func GetInsertable

func GetInsertable(node sql.Node) (sql.InsertableTable, error)

func GetIsUpdatableFromCreateView added in v0.15.0

func GetIsUpdatableFromCreateView(cv *CreateView) bool

GetIsUpdatableFromCreateView returns whether the view is updatable or not. https://dev.mysql.com/doc/refman/8.0/en/view-updatability.html

func GetQueryType added in v0.15.0

func GetQueryType(child sql.Node) queryType

func GetTruncatable

func GetTruncatable(node sql.Node) (sql.TruncateableTable, error)

func GetUpdatable added in v0.12.0

func GetUpdatable(node sql.Node) (sql.UpdatableTable, error)

func HasEmptyTable added in v0.15.0

func HasEmptyTable(n sql.Node) bool

func HasPrimaryKeys added in v0.15.0

func HasPrimaryKeys(table sql.Table) bool

func IsBinary

func IsBinary(node sql.Node) bool

IsBinary returns whether the node is binary or not.

func IsDDLNode added in v0.10.0

func IsDDLNode(node sql.Node) bool

func IsDualTable added in v0.14.0

func IsDualTable(t sql.Table) bool

IsDualTable returns whether the given table is the "dual" table.

func IsEmptyIter added in v0.15.0

func IsEmptyIter(i sql.RowIter) bool

func IsEmptyTable added in v0.15.0

func IsEmptyTable(n sql.Node) bool

func IsNoRowNode added in v0.10.0

func IsNoRowNode(node sql.Node) bool

IsNoRowNode returns whether this are node interacts only with schema and the catalog, not with any table rows.

func IsNullRejecting added in v0.15.0

func IsNullRejecting(e sql.Expression) bool

IsNullRejecting returns whether the expression always returns false for nil inputs.

func IsSessionAutocommit added in v0.12.0

func IsSessionAutocommit(ctx *sql.Context) (bool, error)

IsSessionAutocommit returns true if the current session is using implicit transaction management through autocommit.

func IsShowNode added in v0.10.0

func IsShowNode(node sql.Node) bool

func IsUnary

func IsUnary(node sql.Node) bool

IsUnary returns whether the node is unary or not.

func NewCachedResultsManager added in v0.14.0

func NewCachedResultsManager() *cachedResultsManager

func NewCaseStatement added in v0.15.0

func NewCaseStatement(caseExpr sql.Expression, ifConditionals []*IfConditional, elseStatement sql.Node) sql.Node

NewCaseStatement creates a new *NewCaseStatement or *IfElseBlock node.

func NewCheckDefinition added in v0.9.0

func NewCheckDefinition(ctx *sql.Context, check *sql.CheckConstraint) (*sql.CheckDefinition, error)

func NewCheckpointingTableEditorIter added in v0.14.0

func NewCheckpointingTableEditorIter(wrappedIter sql.RowIter, table sql.EditOpenerCloser) sql.RowIter

NewCheckpointingTableEditorIter is similar to NewTableEditorIter except that it returns an iter that calls BeginStatement and CompleteStatement on |table| after every iter of |wrappedIter|. While SLOW, this functionality ensures correctness for statements that need to rollback individual statements that error such as INSERT IGNORE INTO.

func NewDualSqlTable added in v0.14.0

func NewDualSqlTable() sql.Table

NewDualSqlTable creates a new Dual table.

func NewEmptyTableWithSchema added in v0.15.0

func NewEmptyTableWithSchema(schema sql.Schema) sql.Node

func NewJSONTable added in v0.14.0

func NewJSONTable(ctx *sql.Context, dataExpr sql.Expression, path string, colPaths []string, alias string, schema sql.PrimaryKeySchema) (sql.Node, error)

NewJSONTable creates a new in memory table from the JSON formatted data, a jsonpath path string, and table spec.

func NewNotInSubquery

func NewNotInSubquery(left sql.Expression, right sql.Expression) sql.Expression

NewNotInSubquery creates a new NotInSubquery expression.

func NewShowIndexes

func NewShowIndexes(table sql.Node) sql.Node

NewShowIndexes creates a new ShowIndexes node. The node must represent a table.

func NewStripRowNode added in v0.9.0

func NewStripRowNode(child sql.Node, numCols int) sql.Node

func NewTableEditorIter added in v0.10.0

func NewTableEditorIter(wrappedIter sql.RowIter, openerClosers ...sql.EditOpenerCloser) sql.RowIter

NewTableEditorIter returns a new *tableEditorIter by wrapping the given iterator. If the "statement_boundaries" session variable is set to false, then the original iterator is returned. Each of the |openerClosers| specified will be called to begin, complete, and discard statements as needed as the |wrappedIter| is processed.

func NewTrackedRowIter added in v0.15.0

func NewTrackedRowIter(
	node sql.Node,
	iter sql.RowIter,
	onNext NotifyFunc,
	onDone NotifyFunc,
) *trackedRowIter

func NillaryWithChildren

func NillaryWithChildren(node sql.Node, children ...sql.Node) (sql.Node, error)

NillaryNode is a node with no children. This is a common WithChildren implementation for all nodes that have none.

func NodeRepresentsSelect added in v0.15.0

func NodeRepresentsSelect(s sql.Node) bool

NodeRepresentsSelect attempts to walk a sql.Node to determine if it represents a SELECT statement.

func OrderTriggers added in v0.12.0

func OrderTriggers(triggers []*CreateTrigger) (beforeTriggers []*CreateTrigger, afterTriggers []*CreateTrigger)

OrderTriggers is a utility method that first sorts triggers into their precedence. It then splits the triggers into before and after pairs.

func ReadCommitted added in v0.12.0

func ReadCommitted(ctx *sql.Context) bool

func RecreateTableSchemaFromJoinSchema added in v0.15.0

func RecreateTableSchemaFromJoinSchema(joinSchema sql.Schema) map[string]sql.Schema

RecreateTableSchemaFromJoinSchema takes a join schema and recreates each individual tables schema.

func ResolveForeignKey added in v0.12.0

func ResolveForeignKey(ctx *sql.Context, tbl sql.ForeignKeyTable, refTbl sql.ForeignKeyTable, fkDef sql.ForeignKeyConstraint, shouldAdd, fkChecks bool) error

ResolveForeignKey verifies the foreign key definition and resolves the foreign key, creating indexes and validating data as necessary.

func SplitRowIntoTableRowMap added in v0.15.0

func SplitRowIntoTableRowMap(row sql.Row, joinSchema sql.Schema) map[string]sql.Row

SplitRowIntoTableRowMap takes a join table row and breaks into a map of tables and their respective row.

Types

type AccountLimits added in v0.12.0

type AccountLimits struct {
	MaxQueriesPerHour     *int64
	MaxUpdatesPerHour     *int64
	MaxConnectionsPerHour *int64
	MaxUserConnections    *int64
}

AccountLimits represents the limits imposed upon an account.

type AddColumn

type AddColumn struct {
	Table sql.Node
	// contains filtered or unexported fields
}

func NewAddColumn

func NewAddColumn(database sql.Database, table *UnresolvedTable, column *sql.Column, order *sql.ColumnOrder) *AddColumn

func (*AddColumn) CheckPrivileges added in v0.12.0

func (a *AddColumn) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AddColumn) Children

func (a *AddColumn) Children() []sql.Node

func (*AddColumn) CollationCoercibility added in v0.15.0

func (*AddColumn) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AddColumn) Column

func (a *AddColumn) Column() *sql.Column

func (*AddColumn) Database

func (c *AddColumn) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AddColumn) DebugString added in v0.12.0

func (a *AddColumn) DebugString() string

func (*AddColumn) Expressions

func (a *AddColumn) Expressions() []sql.Expression

func (*AddColumn) Order

func (a *AddColumn) Order() *sql.ColumnOrder

func (*AddColumn) Resolved

func (a *AddColumn) Resolved() bool

Resolved implements the Resolvable interface.

func (*AddColumn) Schema

func (a *AddColumn) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*AddColumn) String

func (a *AddColumn) String() string

func (*AddColumn) TargetSchema added in v0.12.0

func (a *AddColumn) TargetSchema() sql.Schema

func (*AddColumn) ValidateDefaultPosition added in v0.15.0

func (a *AddColumn) ValidateDefaultPosition(tblSch sql.Schema) error

func (AddColumn) WithChildren

func (a AddColumn) WithChildren(children ...sql.Node) (sql.Node, error)

func (*AddColumn) WithDatabase

func (a *AddColumn) WithDatabase(db sql.Database) (sql.Node, error)

func (AddColumn) WithExpressions

func (a AddColumn) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (AddColumn) WithTargetSchema added in v0.12.0

func (a AddColumn) WithTargetSchema(schema sql.Schema) (sql.Node, error)

WithTargetSchema implements sql.SchemaTarget

type AlterAutoIncrement

type AlterAutoIncrement struct {
	Table   sql.Node
	AutoVal uint64
	// contains filtered or unexported fields
}

func NewAlterAutoIncrement

func NewAlterAutoIncrement(database sql.Database, table sql.Node, autoVal uint64) *AlterAutoIncrement

func (*AlterAutoIncrement) CheckPrivileges added in v0.12.0

func (p *AlterAutoIncrement) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterAutoIncrement) Children added in v0.12.0

func (p *AlterAutoIncrement) Children() []sql.Node

Children implements the sql.Node interface.

func (*AlterAutoIncrement) CollationCoercibility added in v0.15.0

func (p *AlterAutoIncrement) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterAutoIncrement) Database added in v0.12.0

func (c *AlterAutoIncrement) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterAutoIncrement) Resolved added in v0.12.0

func (p *AlterAutoIncrement) Resolved() bool

Resolved implements the sql.Node interface.

func (*AlterAutoIncrement) Schema

func (p *AlterAutoIncrement) Schema() sql.Schema

func (AlterAutoIncrement) String

func (p AlterAutoIncrement) String() string

func (*AlterAutoIncrement) WithChildren

func (p *AlterAutoIncrement) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*AlterAutoIncrement) WithDatabase added in v0.12.0

func (p *AlterAutoIncrement) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type AlterDB added in v0.14.0

type AlterDB struct {
	Catalog sql.Catalog

	Collation sql.CollationID
	// contains filtered or unexported fields
}

AlterDB alters a database from the Catalog.

func NewAlterDatabase added in v0.14.0

func NewAlterDatabase(dbName string, collation sql.CollationID) *AlterDB

NewAlterDatabase returns a new AlterDB.

func (*AlterDB) CheckPrivileges added in v0.14.0

func (c *AlterDB) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterDB) Children added in v0.14.0

func (c *AlterDB) Children() []sql.Node

Children implements the interface sql.Node.

func (*AlterDB) CollationCoercibility added in v0.15.0

func (*AlterDB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterDB) Database added in v0.14.0

func (c *AlterDB) Database(ctx *sql.Context) string

Database returns the name of the database that will be used.

func (*AlterDB) Resolved added in v0.14.0

func (c *AlterDB) Resolved() bool

Resolved implements the interface sql.Node.

func (*AlterDB) Schema added in v0.14.0

func (c *AlterDB) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*AlterDB) String added in v0.14.0

func (c *AlterDB) String() string

String implements the interface sql.Node.

func (*AlterDB) WithChildren added in v0.14.0

func (c *AlterDB) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type AlterDefaultDrop added in v0.10.0

type AlterDefaultDrop struct {
	Table      sql.Node
	ColumnName string
	// contains filtered or unexported fields
}

AlterDefaultDrop represents the ALTER COLUMN DROP DEFAULT statement.

func NewAlterDefaultDrop added in v0.10.0

func NewAlterDefaultDrop(database sql.Database, table sql.Node, columnName string) *AlterDefaultDrop

NewAlterDefaultDrop returns a *AlterDefaultDrop node.

func (*AlterDefaultDrop) CheckPrivileges added in v0.12.0

func (d *AlterDefaultDrop) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterDefaultDrop) Children added in v0.12.0

func (d *AlterDefaultDrop) Children() []sql.Node

Children implements the sql.Node interface.

func (*AlterDefaultDrop) CollationCoercibility added in v0.15.0

func (d *AlterDefaultDrop) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterDefaultDrop) Database added in v0.12.0

func (c *AlterDefaultDrop) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterDefaultDrop) Expressions added in v0.12.0

func (d *AlterDefaultDrop) Expressions() []sql.Expression

func (*AlterDefaultDrop) Resolved added in v0.12.0

func (c *AlterDefaultDrop) Resolved() bool

Resolved implements the Resolvable interface.

func (*AlterDefaultDrop) RowIter added in v0.10.0

func (d *AlterDefaultDrop) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*AlterDefaultDrop) Schema added in v0.12.0

func (*AlterDefaultDrop) Schema() sql.Schema

Schema implements the Node interface.

func (*AlterDefaultDrop) String added in v0.10.0

func (d *AlterDefaultDrop) String() string

String implements the sql.Node interface.

func (*AlterDefaultDrop) TargetSchema added in v0.12.0

func (d *AlterDefaultDrop) TargetSchema() sql.Schema

func (*AlterDefaultDrop) WithChildren added in v0.10.0

func (d *AlterDefaultDrop) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*AlterDefaultDrop) WithDatabase added in v0.12.0

func (d *AlterDefaultDrop) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (AlterDefaultDrop) WithExpressions added in v0.12.0

func (d AlterDefaultDrop) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (AlterDefaultDrop) WithTargetSchema added in v0.12.0

func (d AlterDefaultDrop) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type AlterDefaultSet added in v0.10.0

type AlterDefaultSet struct {
	Table      sql.Node
	ColumnName string
	Default    *sql.ColumnDefaultValue
	// contains filtered or unexported fields
}

AlterDefaultSet represents the ALTER COLUMN SET DEFAULT statement.

func NewAlterDefaultSet added in v0.10.0

func NewAlterDefaultSet(database sql.Database, table sql.Node, columnName string, defVal *sql.ColumnDefaultValue) *AlterDefaultSet

NewAlterDefaultSet returns a *AlterDefaultSet node.

func (*AlterDefaultSet) CheckPrivileges added in v0.12.0

func (d *AlterDefaultSet) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterDefaultSet) Children added in v0.12.0

func (d *AlterDefaultSet) Children() []sql.Node

Children implements the sql.Node interface.

func (*AlterDefaultSet) CollationCoercibility added in v0.15.0

func (d *AlterDefaultSet) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterDefaultSet) Database added in v0.12.0

func (c *AlterDefaultSet) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterDefaultSet) Expressions added in v0.10.0

func (d *AlterDefaultSet) Expressions() []sql.Expression

func (*AlterDefaultSet) Resolved added in v0.10.0

func (d *AlterDefaultSet) Resolved() bool

Resolved implements the sql.Node interface.

func (*AlterDefaultSet) RowIter added in v0.10.0

func (d *AlterDefaultSet) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*AlterDefaultSet) Schema added in v0.12.0

func (*AlterDefaultSet) Schema() sql.Schema

Schema implements the Node interface.

func (*AlterDefaultSet) String added in v0.10.0

func (d *AlterDefaultSet) String() string

String implements the sql.Node interface.

func (*AlterDefaultSet) TargetSchema added in v0.12.0

func (d *AlterDefaultSet) TargetSchema() sql.Schema

func (*AlterDefaultSet) WithChildren added in v0.10.0

func (d *AlterDefaultSet) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*AlterDefaultSet) WithDatabase added in v0.12.0

func (d *AlterDefaultSet) WithDatabase(database sql.Database) (sql.Node, error)

func (AlterDefaultSet) WithDefault added in v0.14.0

func (d AlterDefaultSet) WithDefault(expr sql.Expression) (sql.Node, error)

func (AlterDefaultSet) WithExpressions added in v0.10.0

func (d AlterDefaultSet) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (AlterDefaultSet) WithTargetSchema added in v0.12.0

func (d AlterDefaultSet) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type AlterIndex

type AlterIndex struct {
	// Action states whether it's a CREATE, DROP, or RENAME
	Action IndexAction

	// Table is the table that is being referenced
	Table sql.Node
	// IndexName is the index name, and in the case of a RENAME it represents the new name
	IndexName string
	// PreviousIndexName states the old name when renaming an index
	PreviousIndexName string
	// Using states whether you're using BTREE, HASH, or none
	Using sql.IndexUsing
	// Constraint specifies whether this is UNIQUE, FULLTEXT, SPATIAL, or none
	Constraint sql.IndexConstraint
	// Columns contains the column names (and possibly lengths) when creating an index
	Columns []sql.IndexColumn
	// Comment is the comment that was left at index creation, if any
	Comment string
	// DisableKeys determines whether to DISABLE KEYS if true or ENABLE KEYS if false
	DisableKeys bool
	// contains filtered or unexported fields
}

func NewAlterCreateIndex

func NewAlterCreateIndex(db sql.Database, table sql.Node, indexName string, using sql.IndexUsing, constraint sql.IndexConstraint, columns []sql.IndexColumn, comment string) *AlterIndex

func NewAlterDisableEnableKeys added in v0.12.0

func NewAlterDisableEnableKeys(db sql.Database, table sql.Node, disableKeys bool) *AlterIndex

func NewAlterDropIndex

func NewAlterDropIndex(db sql.Database, table sql.Node, indexName string) *AlterIndex

func NewAlterRenameIndex

func NewAlterRenameIndex(db sql.Database, table sql.Node, fromIndexName, toIndexName string) *AlterIndex

func (*AlterIndex) CheckPrivileges added in v0.12.0

func (p *AlterIndex) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterIndex) Children

func (p *AlterIndex) Children() []sql.Node

Children implements the sql.Node interface.

func (*AlterIndex) CollationCoercibility added in v0.15.0

func (*AlterIndex) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterIndex) ColumnNames added in v0.15.0

func (p *AlterIndex) ColumnNames() []string

ColumnNames returns each column's name without the length property.

func (*AlterIndex) Database added in v0.12.0

func (c *AlterIndex) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterIndex) Expressions added in v0.15.0

func (p *AlterIndex) Expressions() []sql.Expression

Expressions on the AlterIndex object are specifically column default expresions, Nothing else.

func (*AlterIndex) Resolved

func (p *AlterIndex) Resolved() bool

func (*AlterIndex) Schema

func (p *AlterIndex) Schema() sql.Schema

Schema implements the Node interface.

func (AlterIndex) String

func (p AlterIndex) String() string

func (*AlterIndex) TargetSchema added in v0.15.0

func (p *AlterIndex) TargetSchema() sql.Schema

func (AlterIndex) WithChildren

func (p AlterIndex) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface. For AlterIndex, the only appropriate input is a single child - The Table.

func (*AlterIndex) WithDatabase added in v0.12.0

func (p *AlterIndex) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (AlterIndex) WithExpressions added in v0.15.0

func (p AlterIndex) WithExpressions(expressions ...sql.Expression) (sql.Node, error)

WithExpressions implements the Node Interface. For AlterIndex, expressions represent column defaults on the targetSchema instance - required to be the same number of columns on the target schema.

func (AlterIndex) WithTargetSchema added in v0.15.0

func (p AlterIndex) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type AlterPK added in v0.11.0

type AlterPK struct {
	Action  PKAction
	Table   sql.Node
	Columns []sql.IndexColumn
	Catalog sql.Catalog
	// contains filtered or unexported fields
}

func NewAlterCreatePk added in v0.11.0

func NewAlterCreatePk(db sql.Database, table sql.Node, columns []sql.IndexColumn) *AlterPK

func NewAlterDropPk added in v0.11.0

func NewAlterDropPk(db sql.Database, table sql.Node) *AlterPK

func (*AlterPK) CheckPrivileges added in v0.12.0

func (a *AlterPK) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterPK) Children added in v0.11.0

func (a *AlterPK) Children() []sql.Node

Children implements the sql.Node interface.

func (*AlterPK) CollationCoercibility added in v0.15.0

func (*AlterPK) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AlterPK) Database added in v0.12.0

func (c *AlterPK) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterPK) Expressions added in v0.12.0

func (a *AlterPK) Expressions() []sql.Expression

func (*AlterPK) Resolved added in v0.11.0

func (a *AlterPK) Resolved() bool

func (*AlterPK) Schema added in v0.11.0

func (a *AlterPK) Schema() sql.Schema

func (*AlterPK) String added in v0.11.0

func (a *AlterPK) String() string

func (*AlterPK) TargetSchema added in v0.12.0

func (a *AlterPK) TargetSchema() sql.Schema

func (AlterPK) WithChildren added in v0.11.0

func (a AlterPK) WithChildren(children ...sql.Node) (sql.Node, error)

func (AlterPK) WithDatabase added in v0.12.0

func (a AlterPK) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (AlterPK) WithExpressions added in v0.12.0

func (a AlterPK) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (AlterPK) WithTargetSchema added in v0.12.0

func (a AlterPK) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type AlterTableCollation added in v0.15.0

type AlterTableCollation struct {
	Table     sql.Node
	Collation sql.CollationID
	// contains filtered or unexported fields
}

func NewAlterTableCollation added in v0.15.0

func NewAlterTableCollation(database sql.Database, table *UnresolvedTable, collation sql.CollationID) *AlterTableCollation

NewAlterTableCollation returns a new *AlterTableCollation

func (*AlterTableCollation) CheckPrivileges added in v0.15.0

func (atc *AlterTableCollation) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AlterTableCollation) Children added in v0.15.0

func (atc *AlterTableCollation) Children() []sql.Node

Children implements the interface sql.Node.

func (*AlterTableCollation) Database added in v0.15.0

func (c *AlterTableCollation) Database() sql.Database

Database implements the sql.Databaser interface.

func (*AlterTableCollation) DebugString added in v0.15.0

func (atc *AlterTableCollation) DebugString() string

DebugString implements the interface sql.Node.

func (*AlterTableCollation) Resolved added in v0.15.0

func (atc *AlterTableCollation) Resolved() bool

Resolved implements the interface sql.Node.

func (*AlterTableCollation) Schema added in v0.15.0

func (atc *AlterTableCollation) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*AlterTableCollation) String added in v0.15.0

func (atc *AlterTableCollation) String() string

String implements the interface sql.Node.

func (*AlterTableCollation) WithChildren added in v0.15.0

func (atc *AlterTableCollation) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*AlterTableCollation) WithDatabase added in v0.15.0

func (atc *AlterTableCollation) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type AnalyzeTable added in v0.14.0

type AnalyzeTable struct {
	Db     string
	Stats  sql.StatsReadWriter
	Tables []sql.DbTable
}

func NewAnalyze added in v0.14.0

func NewAnalyze(names []sql.DbTable) *AnalyzeTable

func (*AnalyzeTable) CheckPrivileges added in v0.14.0

func (n *AnalyzeTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*AnalyzeTable) Children added in v0.14.0

func (n *AnalyzeTable) Children() []sql.Node

Children implements the interface sql.Node.

func (*AnalyzeTable) CollationCoercibility added in v0.15.0

func (*AnalyzeTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*AnalyzeTable) Resolved added in v0.14.0

func (n *AnalyzeTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*AnalyzeTable) Schema added in v0.14.0

func (n *AnalyzeTable) Schema() sql.Schema

Schema implements the interface sql.Node. TODO: should be |Tables|Op|Msg_type|Msg_text|

func (*AnalyzeTable) String added in v0.14.0

func (n *AnalyzeTable) String() string

String implements the interface sql.Node.

func (*AnalyzeTable) WithCatalog added in v0.15.0

func (n *AnalyzeTable) WithCatalog(cat sql.Catalog) *AnalyzeTable

func (*AnalyzeTable) WithChildren added in v0.14.0

func (n *AnalyzeTable) WithChildren(_ ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*AnalyzeTable) WithDb added in v0.15.0

func (n *AnalyzeTable) WithDb(db string) *AnalyzeTable

func (*AnalyzeTable) WithStats added in v0.15.0

func (n *AnalyzeTable) WithStats(stats sql.StatsReadWriter) *AnalyzeTable

func (*AnalyzeTable) WithTables added in v0.15.0

func (n *AnalyzeTable) WithTables(tables []sql.DbTable) *AnalyzeTable

type AuthenticatedUser added in v0.12.0

type AuthenticatedUser struct {
	UserName
	Auth1       Authentication
	Auth2       Authentication
	Auth3       Authentication
	AuthInitial Authentication
	Identity    string
}

AuthenticatedUser represents a user with the relevant methods of authentication.

type Authentication added in v0.12.0

type Authentication interface {
	// Plugin returns the name of the plugin that this authentication represents.
	Plugin() string
	// Password returns the value to insert into the database as the password.
	Password() string
}

Authentication represents an authentication method for a user.

func NewDefaultAuthentication added in v0.12.0

func NewDefaultAuthentication(password string) Authentication

NewDefaultAuthentication returns the given password with the default authentication method.

func NewOtherAuthentication added in v0.14.0

func NewOtherAuthentication(password, plugin string) Authentication

type AuthenticationMysqlNativePassword added in v0.12.0

type AuthenticationMysqlNativePassword string

AuthenticationMysqlNativePassword is an authentication type that represents "mysql_native_password".

func (AuthenticationMysqlNativePassword) Password added in v0.12.0

Password implements the interface Authentication.

func (AuthenticationMysqlNativePassword) Plugin added in v0.12.0

Plugin implements the interface Authentication.

type AuthenticationOther added in v0.14.0

type AuthenticationOther struct {
	// contains filtered or unexported fields
}

AuthenticationOther is an authentication type that represents plugin types other than "mysql_native_password". There must be a mysqldb plugin provided to use this plugin.

func (AuthenticationOther) Password added in v0.14.0

func (a AuthenticationOther) Password() string

func (AuthenticationOther) Plugin added in v0.14.0

func (a AuthenticationOther) Plugin() string

type BeginEndBlock

type BeginEndBlock struct {
	*Block
	Label string
	Pref  *expression.ProcedureReference
}

BeginEndBlock represents a BEGIN/END block.

func NewBeginEndBlock

func NewBeginEndBlock(label string, block *Block) *BeginEndBlock

NewBeginEndBlock creates a new *BeginEndBlock node.

func (*BeginEndBlock) CheckPrivileges added in v0.12.0

func (b *BeginEndBlock) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*BeginEndBlock) CollationCoercibility added in v0.15.0

func (b *BeginEndBlock) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*BeginEndBlock) DebugString

func (b *BeginEndBlock) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*BeginEndBlock) GetBlockLabel added in v0.15.0

func (b *BeginEndBlock) GetBlockLabel(ctx *sql.Context) string

GetBlockLabel implements the interface RepresentsLabeledBlock.

func (*BeginEndBlock) RepresentsLoop added in v0.15.0

func (b *BeginEndBlock) RepresentsLoop() bool

RepresentsLoop implements the interface RepresentsLabeledBlock.

func (*BeginEndBlock) String

func (b *BeginEndBlock) String() string

String implements the interface sql.Node.

func (*BeginEndBlock) WithChildren

func (b *BeginEndBlock) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*BeginEndBlock) WithParamReference added in v0.15.0

func (b *BeginEndBlock) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type BinaryNode

type BinaryNode struct {
	// contains filtered or unexported fields
}

BinaryNode is a node with two children.

func (BinaryNode) Children

func (n BinaryNode) Children() []sql.Node

Children implements the Node interface.

func (BinaryNode) Left

func (n BinaryNode) Left() sql.Node

func (BinaryNode) Resolved

func (n BinaryNode) Resolved() bool

Resolved implements the Resolvable interface.

func (BinaryNode) Right

func (n BinaryNode) Right() sql.Node

type BinlogReplicaControllerCommand added in v0.15.0

type BinlogReplicaControllerCommand interface {
	sql.Node

	// WithBinlogReplicaController returns a new instance of this BinlogReplicaController, with the binlog replica
	// controller configured.
	WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node
}

BinlogReplicaControllerCommand represents a SQL statement that requires a BinlogReplicaController (e.g. Start Replica, Show Replica Status).

type Block added in v0.9.0

type Block struct {
	// contains filtered or unexported fields
}

Block represents a collection of statements that should be executed in sequence.

func NewBlock added in v0.9.0

func NewBlock(statements []sql.Node) *Block

NewBlock creates a new *Block node.

func (*Block) CheckPrivileges added in v0.12.0

func (b *Block) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Block) Children added in v0.9.0

func (b *Block) Children() []sql.Node

Children implements the sql.Node interface.

func (*Block) CollationCoercibility added in v0.15.0

func (b *Block) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Block) DebugString added in v0.9.0

func (b *Block) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*Block) Resolved added in v0.9.0

func (b *Block) Resolved() bool

Resolved implements the sql.Node interface.

func (*Block) Schema added in v0.9.0

func (b *Block) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Block) SetSchema added in v0.15.0

func (b *Block) SetSchema(sch sql.Schema)

func (*Block) String added in v0.9.0

func (b *Block) String() string

String implements the sql.Node interface.

func (*Block) WithChildren added in v0.9.0

func (b *Block) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type BlockRowIter added in v0.9.0

type BlockRowIter interface {
	sql.RowIter
	// RepresentingNode returns the Node that most directly represents this RowIter. For example, in the case of
	// an IF/ELSE block, the RowIter represents the Node where the condition evaluated to true.
	RepresentingNode() sql.Node
	// Schema returns the schema of this RowIter.
	Schema() sql.Schema
}

BlockRowIter is an iterator that produces rows. It is an extended interface over RowIter. This is primarily used by block statements. In order to track the schema of a sql.RowIter from nested blocks, this extended row iter returns the relevant information inside of the iter itself. In addition, the most specific top-level Node for that iter is returned, as stored procedures use that Node to determine whether the iter represents a SELECT statement.

type CachedResults added in v0.9.0

type CachedResults struct {
	UnaryNode
	Id    uint64
	Mutex sync.Mutex
	//NoCache is set when the memory manager is unable to build
	// a cache, so we fallback to a passthrough RowIter
	NoCache bool
	// Finalized is set when we exhaust the child iter, and subsequent
	// RowIters will read from the cache rather than the child
	Finalized bool
	// Disposed is set after this CachedResults is invalidated
	Disposed bool
}

CachedResults tees the child node iterator into an in-memory cache for faster subsequent retrieval. This is usually combined with a HashLookup, whose RowIter defers to a CachedResult child to populate rows in memory on a first iteration. The second RowIter moves the rows from the memory cache to a hash map attached to HashLookup, disposing the CachedResult afterwards.

In the special case where we fill a CachedResult on pass one, but pass two never happens, we have to take care not to orphan the cache.

When we exhaust the source, but the cache is empty, subsequent calls to RowIter return an ErrEmptyCachedResult error for short-circuiting join trees.

When the memory manager cannot accommodate expanding the cache, we fall back to a passthrough iterator.

func NewCachedResults added in v0.9.0

func NewCachedResults(n sql.Node) *CachedResults

NewCachedResults returns a cached results plan Node, which will use a RowCache to cache results generated by Child.RowIter() and return those results for future calls to RowIter. This node is only safe to use if the Child is deterministic and is not dependent on the |row| parameter in the call to RowIter.

func (*CachedResults) CheckPrivileges added in v0.12.0

func (n *CachedResults) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CachedResults) CollationCoercibility added in v0.15.0

func (n *CachedResults) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CachedResults) DebugString added in v0.9.0

func (n *CachedResults) DebugString() string

func (*CachedResults) Dispose added in v0.9.0

func (n *CachedResults) Dispose()

func (*CachedResults) GetCachedResults added in v0.15.0

func (n *CachedResults) GetCachedResults() []sql.Row

func (*CachedResults) String added in v0.9.0

func (n *CachedResults) String() string

func (*CachedResults) WithChildren added in v0.9.0

func (n *CachedResults) WithChildren(children ...sql.Node) (sql.Node, error)

type Call added in v0.9.0

type Call struct {
	Name   string
	Params []sql.Expression

	Procedure *Procedure
	Pref      *expression.ProcedureReference
	// contains filtered or unexported fields
}

func NewCall added in v0.9.0

func NewCall(db sql.Database, name string, params []sql.Expression, asOf sql.Expression) *Call

NewCall returns a *Call node.

func (*Call) AsOf added in v0.15.0

func (c *Call) AsOf() sql.Expression

AsOf implements the Versionable interface.

func (*Call) CheckPrivileges added in v0.12.0

func (c *Call) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Call) Children added in v0.9.0

func (c *Call) Children() []sql.Node

Children implements the sql.Node interface.

func (*Call) CollationCoercibility added in v0.15.0

func (c *Call) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Call) Database added in v0.15.0

func (c *Call) Database() sql.Database

Database implements the sql.Databaser interface.

func (*Call) DebugString added in v0.12.0

func (c *Call) DebugString() string

DebugString implements sql.DebugStringer

func (*Call) Dispose added in v0.15.0

func (c *Call) Dispose()

func (*Call) Expressions added in v0.9.0

func (c *Call) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*Call) Resolved added in v0.9.0

func (c *Call) Resolved() bool

Resolved implements the sql.Node interface.

func (*Call) Schema added in v0.9.0

func (c *Call) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Call) String added in v0.9.0

func (c *Call) String() string

String implements the sql.Node interface.

func (*Call) WithAsOf added in v0.15.0

func (c *Call) WithAsOf(asOf sql.Expression) (sql.Node, error)

WithAsOf implements the Versionable interface.

func (*Call) WithChildren added in v0.9.0

func (c *Call) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*Call) WithDatabase added in v0.15.0

func (c *Call) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (*Call) WithExpressions added in v0.9.0

func (c *Call) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

func (*Call) WithParamReference added in v0.9.0

func (c *Call) WithParamReference(pRef *expression.ProcedureReference) *Call

WithParamReference returns a new *Call containing the given *expression.ProcedureReference.

func (*Call) WithProcedure added in v0.9.0

func (c *Call) WithProcedure(proc *Procedure) *Call

WithProcedure returns a new *Call containing the given *sql.Procedure.

type CaseStatement added in v0.15.0

type CaseStatement struct {
	Expr   sql.Expression
	IfElse *IfElseBlock
}

CaseStatement represents CASE statements, which are different from CASE expressions. These are intended for use in triggers and stored procedures. Specifically, this implements CASE statements when comparing each conditional to a value. The version of CASE that does not compare each conditional to a value is functionally equivalent to a series of IF/ELSE statements, and therefore we simply use an IfElseBlock.

func (*CaseStatement) CheckPrivileges added in v0.15.0

func (c *CaseStatement) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CaseStatement) Children added in v0.15.0

func (c *CaseStatement) Children() []sql.Node

Children implements the interface sql.Node.

func (*CaseStatement) CollationCoercibility added in v0.15.0

func (c *CaseStatement) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CaseStatement) DebugString added in v0.15.0

func (c *CaseStatement) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*CaseStatement) Expressions added in v0.15.0

func (c *CaseStatement) Expressions() []sql.Expression

Expressions implements the interface sql.Node.

func (*CaseStatement) Resolved added in v0.15.0

func (c *CaseStatement) Resolved() bool

Resolved implements the interface sql.Node.

func (*CaseStatement) Schema added in v0.15.0

func (c *CaseStatement) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*CaseStatement) String added in v0.15.0

func (c *CaseStatement) String() string

String implements the interface sql.Node.

func (*CaseStatement) WithChildren added in v0.15.0

func (c *CaseStatement) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*CaseStatement) WithExpressions added in v0.15.0

func (c *CaseStatement) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the interface sql.Node.

type ChangeReplicationFilter added in v0.15.0

type ChangeReplicationFilter struct {
	ReplicaController binlogreplication.BinlogReplicaController
	Options           []binlogreplication.ReplicationOption
}

ChangeReplicationFilter is a plan node for the "CHANGE REPLICATION FILTER" statement. https://dev.mysql.com/doc/refman/8.0/en/change-replication-filter.html

func NewChangeReplicationFilter added in v0.15.0

func NewChangeReplicationFilter(options []binlogreplication.ReplicationOption) *ChangeReplicationFilter

func (*ChangeReplicationFilter) CheckPrivileges added in v0.15.0

func (c *ChangeReplicationFilter) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*ChangeReplicationFilter) Children added in v0.15.0

func (c *ChangeReplicationFilter) Children() []sql.Node

func (*ChangeReplicationFilter) CollationCoercibility added in v0.15.0

func (*ChangeReplicationFilter) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ChangeReplicationFilter) Resolved added in v0.15.0

func (c *ChangeReplicationFilter) Resolved() bool

func (*ChangeReplicationFilter) Schema added in v0.15.0

func (c *ChangeReplicationFilter) Schema() sql.Schema

func (*ChangeReplicationFilter) String added in v0.15.0

func (c *ChangeReplicationFilter) String() string

func (*ChangeReplicationFilter) WithBinlogReplicaController added in v0.15.0

func (c *ChangeReplicationFilter) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*ChangeReplicationFilter) WithChildren added in v0.15.0

func (c *ChangeReplicationFilter) WithChildren(children ...sql.Node) (sql.Node, error)

type ChangeReplicationSource added in v0.15.0

type ChangeReplicationSource struct {
	ReplicaController binlogreplication.BinlogReplicaController
	Options           []binlogreplication.ReplicationOption
}

ChangeReplicationSource is the plan node for the "CHANGE REPLICATION SOURCE TO" statement. https://dev.mysql.com/doc/refman/8.0/en/change-replication-source-to.html

func NewChangeReplicationSource added in v0.15.0

func NewChangeReplicationSource(options []binlogreplication.ReplicationOption) *ChangeReplicationSource

func (*ChangeReplicationSource) CheckPrivileges added in v0.15.0

func (c *ChangeReplicationSource) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*ChangeReplicationSource) Children added in v0.15.0

func (c *ChangeReplicationSource) Children() []sql.Node

func (*ChangeReplicationSource) CollationCoercibility added in v0.15.0

func (*ChangeReplicationSource) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ChangeReplicationSource) Resolved added in v0.15.0

func (c *ChangeReplicationSource) Resolved() bool

func (*ChangeReplicationSource) Schema added in v0.15.0

func (c *ChangeReplicationSource) Schema() sql.Schema

func (*ChangeReplicationSource) String added in v0.15.0

func (c *ChangeReplicationSource) String() string

func (*ChangeReplicationSource) WithBinlogReplicaController added in v0.15.0

func (c *ChangeReplicationSource) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*ChangeReplicationSource) WithChildren added in v0.15.0

func (c *ChangeReplicationSource) WithChildren(children ...sql.Node) (sql.Node, error)

type Characteristic added in v0.9.0

type Characteristic byte

Characteristic represents a characteristic that is defined on either a stored procedure or stored function.

const (
	Characteristic_LanguageSql Characteristic = iota
	Characteristic_Deterministic
	Characteristic_NotDeterministic
	Characteristic_ContainsSql
	Characteristic_NoSql
	Characteristic_ReadsSqlData
	Characteristic_ModifiesSqlData
)

func (Characteristic) String added in v0.9.0

func (c Characteristic) String() string

String returns the original SQL representation.

type ChildParentMapping added in v0.12.0

type ChildParentMapping []int

ChildParentMapping is a mapping from the foreign key columns of a child schema to the parent schema. The position in the slice corresponds to the position in the child schema, while the value at a given position refers to the position in the parent schema. For all columns that are not in the foreign key definition, a value of -1 is returned.

Here's an example: parent Schema: x1, x2, x3, x4, x5 child Schema: y1, y2, y3, y4 FOREIGN KEY (y2) REFERENCES parent (x4)

The slice for the above would be [-1, 3, -1, -1]. The foreign key uses the column "y2" on the child, which is the second position in the schema (and therefore the second position in the mapping). The equivalent parent column is "x4", which is in the fourth position (so 3 with zero-based indexed).

func GetChildParentMapping added in v0.12.0

func GetChildParentMapping(parentSch sql.Schema, childSch sql.Schema, fkDef sql.ForeignKeyConstraint) (ChildParentMapping, error)

GetChildParentMapping returns a mapping from the foreign key columns of a child schema to the parent schema.

type Close added in v0.15.0

type Close struct {
	Name string
	Pref *expression.ProcedureReference
}

Close represents the CLOSE statement, which closes a cursor.

func NewClose added in v0.15.0

func NewClose(name string) *Close

NewClose returns a new *Close node.

func (*Close) CheckPrivileges added in v0.15.0

func (c *Close) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Close) Children added in v0.15.0

func (c *Close) Children() []sql.Node

Children implements the interface sql.Node.

func (*Close) CollationCoercibility added in v0.15.0

func (*Close) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Close) Resolved added in v0.15.0

func (c *Close) Resolved() bool

Resolved implements the interface sql.Node.

func (*Close) Schema added in v0.15.0

func (c *Close) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Close) String added in v0.15.0

func (c *Close) String() string

String implements the interface sql.Node.

func (*Close) WithChildren added in v0.15.0

func (c *Close) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Close) WithParamReference added in v0.15.0

func (c *Close) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type ColDefaultExpression added in v0.15.0

type ColDefaultExpression struct {
	Column *sql.Column
}

colDefault expression evaluates the column default for a row being inserted, correctly handling zero values and nulls

func (ColDefaultExpression) Children added in v0.15.0

func (c ColDefaultExpression) Children() []sql.Expression

func (ColDefaultExpression) CollationCoercibility added in v0.15.0

func (c ColDefaultExpression) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

func (ColDefaultExpression) Eval added in v0.15.0

func (c ColDefaultExpression) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (ColDefaultExpression) IsNullable added in v0.15.0

func (c ColDefaultExpression) IsNullable() bool

func (ColDefaultExpression) Resolved added in v0.15.0

func (c ColDefaultExpression) Resolved() bool

func (ColDefaultExpression) String added in v0.15.0

func (c ColDefaultExpression) String() string

func (ColDefaultExpression) Type added in v0.15.0

func (c ColDefaultExpression) Type() sql.Type

func (ColDefaultExpression) WithChildren added in v0.15.0

func (c ColDefaultExpression) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Commit

type Commit struct {
	// contains filtered or unexported fields
}

Commit commits the changes performed in a transaction. For sessions that don't implement sql.TransactionSession, this operation is a no-op.

func NewCommit

func NewCommit() *Commit

NewCommit creates a new Commit node.

func (Commit) CheckPrivileges added in v0.12.0

func (Commit) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (Commit) Children

func (Commit) Children() []sql.Node

func (*Commit) CollationCoercibility added in v0.15.0

func (*Commit) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Commit) Resolved

func (Commit) Resolved() bool

Resolved implements the sql.Node interface.

func (*Commit) RowIter

func (c *Commit) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (Commit) Schema

func (Commit) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Commit) String

func (*Commit) String() string

func (*Commit) WithChildren

func (c *Commit) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type CommonTableExpression added in v0.9.0

type CommonTableExpression struct {
	Subquery *SubqueryAlias
	Columns  []string
}

func NewCommonTableExpression added in v0.9.0

func NewCommonTableExpression(subquery *SubqueryAlias, columns []string) *CommonTableExpression

func (*CommonTableExpression) DebugString added in v0.9.0

func (e *CommonTableExpression) DebugString() string

func (*CommonTableExpression) String added in v0.9.0

func (e *CommonTableExpression) String() string

type Concat added in v0.11.0

type Concat struct {
	BinaryNode
}

Concat is a node that returns everything in Left and then everything in Right, but it excludes any results in Right that already appeared in Left. Similar to Distinct(Union(...)) but allows Left to return the same row more than once.

func NewConcat added in v0.11.0

func NewConcat(left, right sql.Node) *Concat

NewConcat creates a new Concat node with the given children. See concatJoin memo expression for more details.

func (*Concat) CheckPrivileges added in v0.12.0

func (c *Concat) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Concat) CollationCoercibility added in v0.15.0

func (*Concat) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Concat) DebugString added in v0.11.0

func (c Concat) DebugString() string

func (*Concat) Schema added in v0.11.0

func (c *Concat) Schema() sql.Schema

func (Concat) String added in v0.11.0

func (c Concat) String() string

func (*Concat) WithChildren added in v0.11.0

func (c *Concat) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type CopierProps added in v0.11.0

type CopierProps struct {
	// contains filtered or unexported fields
}

type CreateCheck added in v0.9.0

type CreateCheck struct {
	UnaryNode
	Check *sql.CheckConstraint
}

func NewAlterAddCheck added in v0.9.0

func NewAlterAddCheck(table sql.Node, check *sql.CheckConstraint) *CreateCheck

func (*CreateCheck) CheckPrivileges added in v0.12.0

func (c *CreateCheck) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateCheck) CollationCoercibility added in v0.15.0

func (c *CreateCheck) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateCheck) Expressions added in v0.9.0

func (c *CreateCheck) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*CreateCheck) Resolved added in v0.9.0

func (c *CreateCheck) Resolved() bool

Resolved implements the Resolvable interface.

func (*CreateCheck) Schema added in v0.9.0

func (c *CreateCheck) Schema() sql.Schema

func (CreateCheck) String added in v0.9.0

func (c CreateCheck) String() string

func (*CreateCheck) WithChildren added in v0.9.0

func (c *CreateCheck) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*CreateCheck) WithExpressions added in v0.9.0

func (c *CreateCheck) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type CreateDB added in v0.9.0

type CreateDB struct {
	Catalog     sql.Catalog
	DbName      string
	IfNotExists bool
	Collation   sql.CollationID
}

CreateDB creates an in memory database that lasts the length of the process only.

func NewCreateDatabase added in v0.9.0

func NewCreateDatabase(dbName string, ifNotExists bool, collation sql.CollationID) *CreateDB

func (*CreateDB) CheckPrivileges added in v0.12.0

func (c *CreateDB) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateDB) Children added in v0.9.0

func (c *CreateDB) Children() []sql.Node

func (*CreateDB) CollationCoercibility added in v0.15.0

func (*CreateDB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateDB) Database added in v0.14.0

func (c *CreateDB) Database() string

Database returns the name of the database that will be used.

func (*CreateDB) Resolved added in v0.9.0

func (c *CreateDB) Resolved() bool

func (*CreateDB) Schema added in v0.9.0

func (c *CreateDB) Schema() sql.Schema

func (*CreateDB) String added in v0.9.0

func (c *CreateDB) String() string

func (*CreateDB) WithChildren added in v0.9.0

func (c *CreateDB) WithChildren(children ...sql.Node) (sql.Node, error)

type CreateEvent added in v0.15.0

type CreateEvent struct {
	EventName        string
	Definer          string
	At               *OnScheduleTimestamp
	Every            *expression.Interval
	Starts           *OnScheduleTimestamp
	Ends             *OnScheduleTimestamp
	OnCompPreserve   bool
	Status           EventStatus
	Comment          string
	DefinitionString string
	DefinitionNode   sql.Node
	IfNotExists      bool
	// contains filtered or unexported fields
}

func NewCreateEvent added in v0.15.0

func NewCreateEvent(
	db sql.Database,
	name, definer string,
	at, starts, ends *OnScheduleTimestamp,
	every *expression.Interval,
	onCompletionPreserve bool,
	status EventStatus,
	comment, definitionString string,
	definition sql.Node,
	ifNotExists bool,
) *CreateEvent

NewCreateEvent returns a *CreateEvent node.

func (*CreateEvent) CheckPrivileges added in v0.15.0

func (c *CreateEvent) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateEvent) Children added in v0.15.0

func (c *CreateEvent) Children() []sql.Node

Children implements the sql.Node interface.

func (*CreateEvent) Database added in v0.15.0

func (c *CreateEvent) Database() sql.Database

Database implements the sql.Databaser interface.

func (*CreateEvent) Expressions added in v0.15.0

func (c *CreateEvent) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*CreateEvent) GetEventDetails added in v0.15.0

func (c *CreateEvent) GetEventDetails(ctx *sql.Context, eventCreationTime time.Time) (sql.EventDetails, error)

GetEventDetails returns EventDetails based on CreateEvent object. It expects all timestamp and interval values to be resolved. This function gets called either from RowIter of CreateEvent plan, or from anywhere that getting EventDetails from EventDefinition retrieved from a database.

func (*CreateEvent) Resolved added in v0.15.0

func (c *CreateEvent) Resolved() bool

Resolved implements the sql.Node interface.

func (*CreateEvent) RowIter added in v0.15.0

func (c *CreateEvent) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*CreateEvent) Schema added in v0.15.0

func (c *CreateEvent) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*CreateEvent) String added in v0.15.0

func (c *CreateEvent) String() string

String implements the sql.Node interface.

func (*CreateEvent) WithChildren added in v0.15.0

func (c *CreateEvent) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*CreateEvent) WithDatabase added in v0.15.0

func (c *CreateEvent) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (*CreateEvent) WithExpressions added in v0.15.0

func (c *CreateEvent) WithExpressions(e ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type CreateForeignKey

type CreateForeignKey struct {
	// In the cases where we have multiple ALTER statements, we need to resolve the table at execution time rather than
	// during analysis. Otherwise, you could add a column in the preceding alter and we may have analyzed to a table
	// that did not yet have that column.
	DbProvider sql.DatabaseProvider
	FkDef      *sql.ForeignKeyConstraint
}

func NewAlterAddForeignKey

func NewAlterAddForeignKey(fkDef *sql.ForeignKeyConstraint) *CreateForeignKey

func (*CreateForeignKey) CheckPrivileges added in v0.12.0

func (p *CreateForeignKey) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateForeignKey) Children added in v0.10.0

func (p *CreateForeignKey) Children() []sql.Node

Children implements the interface sql.Node.

func (*CreateForeignKey) CollationCoercibility added in v0.15.0

func (*CreateForeignKey) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateForeignKey) Database added in v0.10.0

func (p *CreateForeignKey) Database() string

func (*CreateForeignKey) DatabaseProvider added in v0.12.0

func (p *CreateForeignKey) DatabaseProvider() sql.DatabaseProvider

DatabaseProvider implements the interface sql.MultiDatabaser.

func (*CreateForeignKey) Resolved added in v0.10.0

func (p *CreateForeignKey) Resolved() bool

Resolved implements the interface sql.Node.

func (*CreateForeignKey) Schema

func (p *CreateForeignKey) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*CreateForeignKey) String

func (p *CreateForeignKey) String() string

String implements the interface sql.Node.

func (*CreateForeignKey) WithChildren

func (p *CreateForeignKey) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*CreateForeignKey) WithDatabaseProvider added in v0.12.0

func (p *CreateForeignKey) WithDatabaseProvider(provider sql.DatabaseProvider) (sql.Node, error)

WithDatabaseProvider implements the interface sql.MultiDatabaser.

type CreateIndex

type CreateIndex struct {
	Name            string
	Table           sql.Node
	Exprs           []sql.Expression
	Driver          string
	Config          map[string]string
	Catalog         sql.Catalog
	CurrentDatabase string
}

CreateIndex is a node to create an index.

func NewCreateIndex

func NewCreateIndex(
	name string,
	table sql.Node,
	exprs []sql.Expression,
	driver string,
	config map[string]string,
) *CreateIndex

NewCreateIndex creates a new CreateIndex node.

func (*CreateIndex) CheckPrivileges added in v0.12.0

func (c *CreateIndex) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateIndex) Children

func (c *CreateIndex) Children() []sql.Node

Children implements the Node interface.

func (*CreateIndex) CollationCoercibility added in v0.15.0

func (*CreateIndex) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateIndex) Database added in v0.12.0

func (c *CreateIndex) Database() string

func (*CreateIndex) Expressions

func (c *CreateIndex) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*CreateIndex) Resolved

func (c *CreateIndex) Resolved() bool

Resolved implements the Node interface.

func (*CreateIndex) Schema

func (c *CreateIndex) Schema() sql.Schema

Schema implements the Node interface.

func (*CreateIndex) String

func (c *CreateIndex) String() string

func (*CreateIndex) WithChildren

func (c *CreateIndex) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*CreateIndex) WithExpressions

func (c *CreateIndex) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type CreateProcedure added in v0.9.0

type CreateProcedure struct {
	*Procedure

	BodyString string
	// contains filtered or unexported fields
}

func NewCreateProcedure added in v0.9.0

func NewCreateProcedure(
	db sql.Database,
	name,
	definer string,
	params []ProcedureParam,
	createdAt, modifiedAt time.Time,
	securityContext ProcedureSecurityContext,
	characteristics []Characteristic,
	body sql.Node,
	comment, createString, bodyString string,
) *CreateProcedure

NewCreateProcedure returns a *CreateProcedure node.

func (*CreateProcedure) CheckPrivileges added in v0.12.0

func (c *CreateProcedure) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateProcedure) Children added in v0.9.0

func (c *CreateProcedure) Children() []sql.Node

Children implements the sql.Node interface.

func (*CreateProcedure) CollationCoercibility added in v0.15.0

func (*CreateProcedure) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateProcedure) Database added in v0.9.0

func (c *CreateProcedure) Database() sql.Database

Database implements the sql.Databaser interface.

func (*CreateProcedure) DebugString added in v0.9.0

func (c *CreateProcedure) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*CreateProcedure) Resolved added in v0.9.0

func (c *CreateProcedure) Resolved() bool

Resolved implements the sql.Node interface.

func (*CreateProcedure) Schema added in v0.9.0

func (c *CreateProcedure) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*CreateProcedure) String added in v0.9.0

func (c *CreateProcedure) String() string

String implements the sql.Node interface.

func (*CreateProcedure) WithChildren added in v0.9.0

func (c *CreateProcedure) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*CreateProcedure) WithDatabase added in v0.9.0

func (c *CreateProcedure) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type CreateRole added in v0.12.0

type CreateRole struct {
	IfNotExists bool
	Roles       []UserName
	MySQLDb     sql.Database
}

CreateRole represents the statement CREATE ROLE.

func NewCreateRole added in v0.12.0

func NewCreateRole(ifNotExists bool, roles []UserName) *CreateRole

NewCreateRole returns a new CreateRole node.

func (*CreateRole) CheckPrivileges added in v0.12.0

func (n *CreateRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateRole) Children added in v0.12.0

func (n *CreateRole) Children() []sql.Node

Children implements the interface sql.Node.

func (*CreateRole) CollationCoercibility added in v0.15.0

func (*CreateRole) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateRole) Database added in v0.12.0

func (n *CreateRole) Database() sql.Database

Database implements the interface sql.Databaser.

func (*CreateRole) Resolved added in v0.12.0

func (n *CreateRole) Resolved() bool

Resolved implements the interface sql.Node.

func (*CreateRole) Schema added in v0.12.0

func (n *CreateRole) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*CreateRole) String added in v0.12.0

func (n *CreateRole) String() string

String implements the interface sql.Node.

func (*CreateRole) WithChildren added in v0.12.0

func (n *CreateRole) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*CreateRole) WithDatabase added in v0.12.0

func (n *CreateRole) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type CreateSavepoint added in v0.10.0

type CreateSavepoint struct {
	Name string
	// contains filtered or unexported fields
}

CreateSavepoint creates a savepoint with the given name. For sessions that don't implement sql.TransactionSession, this is a no-op.

func NewCreateSavepoint added in v0.10.0

func NewCreateSavepoint(name string) *CreateSavepoint

NewCreateSavepoint creates a new CreateSavepoint node.

func (CreateSavepoint) CheckPrivileges added in v0.12.0

func (CreateSavepoint) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (CreateSavepoint) Children added in v0.10.0

func (CreateSavepoint) Children() []sql.Node

func (*CreateSavepoint) CollationCoercibility added in v0.15.0

func (*CreateSavepoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (CreateSavepoint) Resolved added in v0.10.0

func (CreateSavepoint) Resolved() bool

Resolved implements the sql.Node interface.

func (*CreateSavepoint) RowIter added in v0.10.0

func (c *CreateSavepoint) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (CreateSavepoint) Schema added in v0.10.0

func (CreateSavepoint) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*CreateSavepoint) String added in v0.10.0

func (c *CreateSavepoint) String() string

func (*CreateSavepoint) WithChildren added in v0.10.0

func (c *CreateSavepoint) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type CreateTable

type CreateTable struct {
	CreateSchema sql.PrimaryKeySchema

	FkDefs []*sql.ForeignKeyConstraint

	ChDefs    sql.CheckConstraints
	IdxDefs   []*IndexDefinition
	Collation sql.CollationID
	// contains filtered or unexported fields
}

CreateTable is a node describing the creation of some table.

func NewCreateTable

func NewCreateTable(db sql.Database, name string, ifn IfNotExistsOption, temp TempTableOption, tableSpec *TableSpec) *CreateTable

NewCreateTable creates a new CreateTable node

func NewCreateTableLike

func NewCreateTableLike(db sql.Database, name string, likeTable sql.Node, ifn IfNotExistsOption, temp TempTableOption) *CreateTable

NewCreateTableLike creates a new CreateTable node for CREATE TABLE LIKE statements

func NewCreateTableSelect added in v0.11.0

func NewCreateTableSelect(db sql.Database, name string, selectNode sql.Node, tableSpec *TableSpec, ifn IfNotExistsOption, temp TempTableOption) *CreateTable

NewCreateTableSelect create a new CreateTable node for CREATE TABLE [AS] SELECT

func (*CreateTable) CheckPrivileges added in v0.12.0

func (c *CreateTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateTable) Children

func (c *CreateTable) Children() []sql.Node

Children implements the Node interface.

func (*CreateTable) CollationCoercibility added in v0.15.0

func (*CreateTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateTable) CreateChecks added in v0.15.0

func (c *CreateTable) CreateChecks(ctx *sql.Context, tableNode sql.Table) error

func (*CreateTable) CreateForeignKeys added in v0.15.0

func (c *CreateTable) CreateForeignKeys(ctx *sql.Context, tableNode sql.Table) error

func (*CreateTable) CreateIndexes added in v0.15.0

func (c *CreateTable) CreateIndexes(ctx *sql.Context, tableNode sql.Table, idxes []*IndexDefinition) error

func (*CreateTable) Database

func (c *CreateTable) Database() sql.Database

Database implements the sql.Databaser interface.

func (*CreateTable) DebugString added in v0.10.0

func (c *CreateTable) DebugString() string

func (*CreateTable) Expressions

func (c *CreateTable) Expressions() []sql.Expression

func (*CreateTable) ForeignKeys added in v0.12.0

func (c *CreateTable) ForeignKeys() []*sql.ForeignKeyConstraint

ForeignKeys returns any foreign keys that will be declared on this table.

func (*CreateTable) IfNotExists

func (c *CreateTable) IfNotExists() IfNotExistsOption

func (*CreateTable) Like

func (c *CreateTable) Like() sql.Node

func (*CreateTable) Name

func (c *CreateTable) Name() string

func (*CreateTable) PkSchema added in v0.12.0

func (c *CreateTable) PkSchema() sql.PrimaryKeySchema

func (*CreateTable) Resolved

func (c *CreateTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*CreateTable) Schema

func (c *CreateTable) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*CreateTable) Select added in v0.11.0

func (c *CreateTable) Select() sql.Node

func (*CreateTable) String

func (c *CreateTable) String() string

func (*CreateTable) TableSpec added in v0.11.0

func (c *CreateTable) TableSpec() *TableSpec

func (*CreateTable) TargetSchema added in v0.14.0

func (c *CreateTable) TargetSchema() sql.Schema

TargetSchema implements the sql.TargetSchema interface.

func (*CreateTable) Temporary added in v0.11.0

func (c *CreateTable) Temporary() TempTableOption

func (*CreateTable) ValidateDefaultPosition added in v0.15.0

func (c *CreateTable) ValidateDefaultPosition() error

func (CreateTable) WithChildren

func (c CreateTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*CreateTable) WithDatabase

func (c *CreateTable) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (CreateTable) WithExpressions

func (c CreateTable) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (*CreateTable) WithParentForeignKeyTables added in v0.12.0

func (c *CreateTable) WithParentForeignKeyTables(refTbls []sql.ForeignKeyTable) (*CreateTable, error)

WithParentForeignKeyTables adds the tables that are referenced in each foreign key. The table indices is assumed to match the foreign key indices in their respective slices.

func (*CreateTable) WithTargetSchema added in v0.14.0

func (c *CreateTable) WithTargetSchema(schema sql.Schema) (sql.Node, error)

WithTargetSchema implements the sql.TargetSchema interface.

type CreateTrigger

type CreateTrigger struct {
	TriggerName         string
	TriggerTime         string
	TriggerEvent        string
	TriggerOrder        *TriggerOrder
	Table               sql.Node
	Body                sql.Node
	CreateTriggerString string
	BodyString          string
	CreatedAt           time.Time
	Definer             string
	// contains filtered or unexported fields
}

func NewCreateTrigger

func NewCreateTrigger(triggerDb sql.Database,
	triggerName,
	triggerTime,
	triggerEvent string,
	triggerOrder *TriggerOrder,
	table sql.Node,
	body sql.Node,
	createTriggerString,
	bodyString string,
	createdAt time.Time,
	definer string) *CreateTrigger

func (*CreateTrigger) CheckPrivileges added in v0.12.0

func (c *CreateTrigger) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateTrigger) Children

func (c *CreateTrigger) Children() []sql.Node

func (*CreateTrigger) CollationCoercibility added in v0.15.0

func (*CreateTrigger) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateTrigger) Database

func (c *CreateTrigger) Database() sql.Database

func (*CreateTrigger) DebugString

func (c *CreateTrigger) DebugString() string

func (*CreateTrigger) Resolved

func (c *CreateTrigger) Resolved() bool

func (*CreateTrigger) Schema

func (c *CreateTrigger) Schema() sql.Schema

func (*CreateTrigger) String

func (c *CreateTrigger) String() string

func (*CreateTrigger) WithChildren

func (c *CreateTrigger) WithChildren(children ...sql.Node) (sql.Node, error)

func (*CreateTrigger) WithDatabase

func (c *CreateTrigger) WithDatabase(database sql.Database) (sql.Node, error)

type CreateUser added in v0.12.0

type CreateUser struct {
	IfNotExists     bool
	Users           []AuthenticatedUser
	DefaultRoles    []UserName
	TLSOptions      *TLSOptions
	AccountLimits   *AccountLimits
	PasswordOptions *PasswordOptions
	Locked          bool
	Attribute       string
	MySQLDb         sql.Database
}

CreateUser represents the statement CREATE USER.

func (*CreateUser) CheckPrivileges added in v0.12.0

func (n *CreateUser) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateUser) Children added in v0.12.0

func (n *CreateUser) Children() []sql.Node

Children implements the interface sql.Node.

func (*CreateUser) CollationCoercibility added in v0.15.0

func (*CreateUser) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateUser) Database added in v0.12.0

func (n *CreateUser) Database() sql.Database

Database implements the interface sql.Databaser.

func (*CreateUser) Resolved added in v0.12.0

func (n *CreateUser) Resolved() bool

Resolved implements the interface sql.Node.

func (*CreateUser) RowIter added in v0.12.0

func (n *CreateUser) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*CreateUser) Schema added in v0.12.0

func (n *CreateUser) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*CreateUser) String added in v0.12.0

func (n *CreateUser) String() string

String implements the interface sql.Node.

func (*CreateUser) WithChildren added in v0.12.0

func (n *CreateUser) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*CreateUser) WithDatabase added in v0.12.0

func (n *CreateUser) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type CreateView

type CreateView struct {
	UnaryNode

	Name             string
	Columns          []string
	IsReplace        bool
	Definition       *SubqueryAlias
	CreateViewString string
	Algorithm        string
	Definer          string
	Security         string
	CheckOpt         string
	// contains filtered or unexported fields
}

CreateView is a node representing the creation (or replacement) of a view, which is defined by the Child node. The Columns member represent the explicit columns specified by the query, if any.

func NewCreateView

func NewCreateView(
	database sql.Database,
	name string,
	columns []string,
	definition *SubqueryAlias,
	isReplace bool,
	createViewStr, algorithm, definer, security string,
) *CreateView

NewCreateView creates a CreateView node with the specified parameters, setting its catalog to nil.

func (*CreateView) CheckPrivileges added in v0.12.0

func (cv *CreateView) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*CreateView) Children

func (cv *CreateView) Children() []sql.Node

Children implements the Node interface. It returns the Child of the CreateView node; i.e., the definition of the view that will be created.

func (*CreateView) CollationCoercibility added in v0.15.0

func (*CreateView) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*CreateView) Database

func (cv *CreateView) Database() sql.Database

Database implements the Databaser interface, and it returns the database in which CreateView will create the view.

func (*CreateView) Resolved

func (cv *CreateView) Resolved() bool

Resolved implements the Node interface. This node is resolved if and only if the database and the Child are both resolved.

func (*CreateView) Schema

func (cv *CreateView) Schema() sql.Schema

Schema implements the Node interface. It always returns nil.

func (*CreateView) String

func (cv *CreateView) String() string

String implements the fmt.Stringer interface, using sql.TreePrinter to generate the string.

func (*CreateView) View

func (cv *CreateView) View() *sql.View

View returns the view that will be created by this node.

func (*CreateView) WithChildren

func (cv *CreateView) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface. It only succeeds if the length of the specified children equals 1.

func (*CreateView) WithDatabase

func (cv *CreateView) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the Databaser interface, and it returns a copy of this node with the specified database.

type DeallocateQuery added in v0.15.0

type DeallocateQuery struct {
	Name string
}

DeallocateQuery is a node that prepares the query

func NewDeallocateQuery added in v0.15.0

func NewDeallocateQuery(name string) *DeallocateQuery

NewDeallocateQuery executes a prepared statement

func (*DeallocateQuery) CheckPrivileges added in v0.15.0

func (p *DeallocateQuery) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeallocateQuery) Children added in v0.15.0

func (p *DeallocateQuery) Children() []sql.Node

Children implements the Node interface.

func (*DeallocateQuery) CollationCoercibility added in v0.15.0

func (*DeallocateQuery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeallocateQuery) Resolved added in v0.15.0

func (p *DeallocateQuery) Resolved() bool

func (*DeallocateQuery) RowIter added in v0.15.0

func (p *DeallocateQuery) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the Node interface.

func (*DeallocateQuery) Schema added in v0.15.0

func (p *DeallocateQuery) Schema() sql.Schema

Schema implements the Node interface.

func (*DeallocateQuery) String added in v0.15.0

func (p *DeallocateQuery) String() string

func (*DeallocateQuery) WithChildren added in v0.15.0

func (p *DeallocateQuery) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type DeclareCondition added in v0.9.0

type DeclareCondition struct {
	Name          string
	MysqlErrCode  int64
	SqlStateValue string
}

DeclareCondition represents the DECLARE ... CONDITION statement.

func NewDeclareCondition added in v0.9.0

func NewDeclareCondition(name string, errCode int64, sqlStateValue string) *DeclareCondition

NewDeclareCondition returns a *DeclareCondition node.

func (*DeclareCondition) CheckPrivileges added in v0.12.0

func (d *DeclareCondition) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeclareCondition) Children added in v0.9.0

func (d *DeclareCondition) Children() []sql.Node

Children implements the sql.Node interface.

func (*DeclareCondition) CollationCoercibility added in v0.15.0

func (*DeclareCondition) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeclareCondition) Resolved added in v0.9.0

func (d *DeclareCondition) Resolved() bool

Resolved implements the sql.Node interface.

func (*DeclareCondition) RowIter added in v0.9.0

func (d *DeclareCondition) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*DeclareCondition) Schema added in v0.9.0

func (d *DeclareCondition) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*DeclareCondition) String added in v0.9.0

func (d *DeclareCondition) String() string

String implements the sql.Node interface.

func (*DeclareCondition) WithChildren added in v0.9.0

func (d *DeclareCondition) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type DeclareCursor added in v0.15.0

type DeclareCursor struct {
	Name   string
	Select sql.Node
	Pref   *expression.ProcedureReference
}

DeclareCursor represents the DECLARE ... CURSOR statement.

func NewDeclareCursor added in v0.15.0

func NewDeclareCursor(name string, selectStatement sql.Node) *DeclareCursor

NewDeclareCursor returns a new *DeclareCursor node.

func (*DeclareCursor) CheckPrivileges added in v0.15.0

func (d *DeclareCursor) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeclareCursor) Children added in v0.15.0

func (d *DeclareCursor) Children() []sql.Node

Children implements the interface sql.Node.

func (*DeclareCursor) CollationCoercibility added in v0.15.0

func (*DeclareCursor) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeclareCursor) DebugString added in v0.15.0

func (d *DeclareCursor) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*DeclareCursor) Resolved added in v0.15.0

func (d *DeclareCursor) Resolved() bool

Resolved implements the interface sql.Node.

func (*DeclareCursor) Schema added in v0.15.0

func (d *DeclareCursor) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DeclareCursor) String added in v0.15.0

func (d *DeclareCursor) String() string

String implements the interface sql.Node.

func (*DeclareCursor) WithChildren added in v0.15.0

func (d *DeclareCursor) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DeclareCursor) WithParamReference added in v0.15.0

func (d *DeclareCursor) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type DeclareHandler added in v0.15.0

type DeclareHandler struct {
	Action    DeclareHandlerAction
	Statement sql.Node
	Pref      *expression.ProcedureReference
}

DeclareHandler represents the DECLARE ... HANDLER statement.

func NewDeclareHandler added in v0.15.0

func NewDeclareHandler(action DeclareHandlerAction, statement sql.Node) (*DeclareHandler, error)

NewDeclareHandler returns a new *DeclareHandler node.

func (*DeclareHandler) CheckPrivileges added in v0.15.0

func (d *DeclareHandler) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeclareHandler) Children added in v0.15.0

func (d *DeclareHandler) Children() []sql.Node

Children implements the interface sql.Node.

func (*DeclareHandler) CollationCoercibility added in v0.15.0

func (*DeclareHandler) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeclareHandler) DebugString added in v0.15.0

func (d *DeclareHandler) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*DeclareHandler) Resolved added in v0.15.0

func (d *DeclareHandler) Resolved() bool

Resolved implements the interface sql.Node.

func (*DeclareHandler) Schema added in v0.15.0

func (d *DeclareHandler) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DeclareHandler) String added in v0.15.0

func (d *DeclareHandler) String() string

String implements the interface sql.Node.

func (*DeclareHandler) WithChildren added in v0.15.0

func (d *DeclareHandler) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DeclareHandler) WithParamReference added in v0.15.0

func (d *DeclareHandler) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type DeclareHandlerAction added in v0.15.0

type DeclareHandlerAction byte
const (
	DeclareHandlerAction_Continue DeclareHandlerAction = iota
	DeclareHandlerAction_Exit
	DeclareHandlerAction_Undo
)

type DeclareVariables added in v0.15.0

type DeclareVariables struct {
	Names      []string
	Type       sql.Type
	DefaultVal *sql.ColumnDefaultValue
	Pref       *expression.ProcedureReference
}

DeclareVariables represents the DECLARE statement for local variables.

func NewDeclareVariables added in v0.15.0

func NewDeclareVariables(names []string, typ sql.Type, defaultVal *sql.ColumnDefaultValue) *DeclareVariables

NewDeclareVariables returns a new *DeclareVariables node.

func (*DeclareVariables) CheckPrivileges added in v0.15.0

func (d *DeclareVariables) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeclareVariables) Children added in v0.15.0

func (d *DeclareVariables) Children() []sql.Node

Children implements the interface sql.Node.

func (*DeclareVariables) CollationCoercibility added in v0.15.0

func (*DeclareVariables) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeclareVariables) Resolved added in v0.15.0

func (d *DeclareVariables) Resolved() bool

Resolved implements the interface sql.Node.

func (*DeclareVariables) Schema added in v0.15.0

func (d *DeclareVariables) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DeclareVariables) String added in v0.15.0

func (d *DeclareVariables) String() string

String implements the interface sql.Node.

func (*DeclareVariables) WithChildren added in v0.15.0

func (d *DeclareVariables) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DeclareVariables) WithParamReference added in v0.15.0

func (d *DeclareVariables) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type DeferredAsOfTable added in v0.12.0

type DeferredAsOfTable struct {
	*ResolvedTable
	// contains filtered or unexported fields
}

func NewDeferredAsOfTable added in v0.12.0

func NewDeferredAsOfTable(t *ResolvedTable, asOf sql.Expression) *DeferredAsOfTable

func (*DeferredAsOfTable) AsOf added in v0.12.0

func (t *DeferredAsOfTable) AsOf() sql.Expression

AsOf implements sql.UnresolvedTable

func (*DeferredAsOfTable) Database added in v0.12.0

func (t *DeferredAsOfTable) Database() string

Database implements sql.UnresolvedTable

func (*DeferredAsOfTable) Expressions added in v0.12.0

func (t *DeferredAsOfTable) Expressions() []sql.Expression

func (*DeferredAsOfTable) Name added in v0.12.0

func (t *DeferredAsOfTable) Name() string

Name implements the Nameable interface.

func (*DeferredAsOfTable) WithAsOf added in v0.12.0

func (t *DeferredAsOfTable) WithAsOf(asOf sql.Expression) (sql.Node, error)

WithAsOf implements sql.UnresolvedTable

func (*DeferredAsOfTable) WithExpressions added in v0.12.0

func (t *DeferredAsOfTable) WithExpressions(expressions ...sql.Expression) (sql.Node, error)

type DeferredFilteredTable added in v0.14.0

type DeferredFilteredTable struct {
	*ResolvedTable
}

func NewDeferredFilteredTable added in v0.14.0

func NewDeferredFilteredTable(t *ResolvedTable) *DeferredFilteredTable

type DeleteFrom

type DeleteFrom struct {
	UnaryNode
	// contains filtered or unexported fields
}

DeleteFrom is a node describing a deletion from some table.

func NewDeleteFrom

func NewDeleteFrom(n sql.Node, targets []sql.Node) *DeleteFrom

NewDeleteFrom creates a DeleteFrom node.

func (*DeleteFrom) CheckPrivileges added in v0.12.0

func (p *DeleteFrom) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DeleteFrom) CollationCoercibility added in v0.15.0

func (*DeleteFrom) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DeleteFrom) Database added in v0.9.0

func (p *DeleteFrom) Database() string

func (*DeleteFrom) DebugString

func (p *DeleteFrom) DebugString() string

func (*DeleteFrom) GetDeleteTargets added in v0.15.0

func (p *DeleteFrom) GetDeleteTargets() []sql.Node

GetDeleteTargets returns the sql.Nodes representing the tables from which rows should be deleted. For a DELETE FROM JOIN statement, this will return the tables explicitly specified by the caller. For a DELETE FROM statement this will return the single table in the DELETE FROM source that is implicitly assumed to be the target of the delete operation.

func (*DeleteFrom) HasExplicitTargets added in v0.15.0

func (p *DeleteFrom) HasExplicitTargets() bool

HasExplicitTargets returns true if the target delete tables were explicitly specified. This can only happen with DELETE FROM JOIN statements – for DELETE FROM statements using a single source table, the target is NOT explicitly specified and is assumed to be the single source table.

func (*DeleteFrom) Resolved added in v0.15.0

func (p *DeleteFrom) Resolved() bool

Resolved implements the sql.Resolvable interface.

func (*DeleteFrom) String

func (p *DeleteFrom) String() string

func (*DeleteFrom) WithChildren

func (p *DeleteFrom) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*DeleteFrom) WithExplicitTargets added in v0.15.0

func (p *DeleteFrom) WithExplicitTargets(targets []sql.Node) *DeleteFrom

WithExplicitTargets returns a new DeleteFrom node instance with the specified |targets| set as the explicitly specified targets of the delete operation.

type Describe

type Describe struct {
	UnaryNode
}

Describe is a node that describes its children.

func NewDescribe

func NewDescribe(child sql.Node) *Describe

NewDescribe creates a new Describe node.

func (*Describe) CheckPrivileges added in v0.12.0

func (d *Describe) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Describe) CollationCoercibility added in v0.15.0

func (*Describe) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Describe) Schema

func (d *Describe) Schema() sql.Schema

Schema implements the Node interface.

func (Describe) String

func (d Describe) String() string

func (*Describe) WithChildren

func (d *Describe) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type DescribeQuery

type DescribeQuery struct {
	UnaryNode
	Format string
}

DescribeQuery returns the description of the query plan.

func NewDescribeQuery

func NewDescribeQuery(format string, child sql.Node) *DescribeQuery

NewDescribeQuery creates a new DescribeQuery node.

func (*DescribeQuery) CheckPrivileges added in v0.12.0

func (d *DescribeQuery) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DescribeQuery) Children added in v0.9.0

func (d *DescribeQuery) Children() []sql.Node

func (*DescribeQuery) CollationCoercibility added in v0.15.0

func (*DescribeQuery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DescribeQuery) DebugString

func (d *DescribeQuery) DebugString() string

func (*DescribeQuery) Query added in v0.9.0

func (d *DescribeQuery) Query() sql.Node

Query returns the query node being described

func (*DescribeQuery) Resolved added in v0.9.0

func (d *DescribeQuery) Resolved() bool

func (*DescribeQuery) Schema

func (d *DescribeQuery) Schema() sql.Schema

Schema implements the Node interface.

func (*DescribeQuery) String

func (d *DescribeQuery) String() string

func (*DescribeQuery) WithChildren

func (d *DescribeQuery) WithChildren(node ...sql.Node) (sql.Node, error)

func (*DescribeQuery) WithQuery added in v0.9.0

func (d *DescribeQuery) WithQuery(child sql.Node) sql.Node

WithQuery returns a copy of this node with the query node given

type DisjointedChildrenNode added in v0.15.0

type DisjointedChildrenNode interface {
	sql.Node
	// DisjointedChildren returns multiple groupings of child nodes, with each group being unrelated to the other groups.
	DisjointedChildren() [][]sql.Node
	// WithDisjointedChildren returns a copy of the node with all child groups replaced.
	// Returns an error if the number of children in each group is different than the current number of children in each
	// group. They must be given in the same order as they are returned by DisjointedChildren.
	WithDisjointedChildren(children [][]sql.Node) (sql.Node, error)
}

DisjointedChildrenNode is a sql.Node that contains multiple, disjointed groupings of child nodes. This is a highly specialized node that will not be applicable to the majority, as most nodes will return all children in the Children() function. For those nodes that do not return all of their children in the Children() function (such as InsertInto), operations such as stored procedures require the implementation of this interface so that those unexposed children may be accessed.

type Distinct

type Distinct struct {
	UnaryNode
}

Distinct is a node that ensures all rows that come from it are unique.

func NewDistinct

func NewDistinct(child sql.Node) *Distinct

NewDistinct creates a new Distinct node.

func (*Distinct) CheckPrivileges added in v0.12.0

func (d *Distinct) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Distinct) CollationCoercibility added in v0.15.0

func (d *Distinct) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Distinct) DebugString

func (d Distinct) DebugString() string

func (*Distinct) Resolved

func (d *Distinct) Resolved() bool

Resolved implements the Resolvable interface.

func (Distinct) String

func (d Distinct) String() string

func (*Distinct) WithChildren

func (d *Distinct) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type DropCheck added in v0.9.0

type DropCheck struct {
	UnaryNode
	Name string
}

func NewAlterDropCheck added in v0.9.0

func NewAlterDropCheck(table sql.Node, name string) *DropCheck

func (*DropCheck) CheckPrivileges added in v0.12.0

func (p *DropCheck) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropCheck) CollationCoercibility added in v0.15.0

func (p *DropCheck) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropCheck) Schema added in v0.9.0

func (p *DropCheck) Schema() sql.Schema

func (DropCheck) String added in v0.9.0

func (p DropCheck) String() string

func (*DropCheck) WithChildren added in v0.9.0

func (p *DropCheck) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type DropColumn

type DropColumn struct {
	Table  sql.Node
	Column string
	Checks sql.CheckConstraints
	// contains filtered or unexported fields
}

func NewDropColumn

func NewDropColumn(database sql.Database, table *UnresolvedTable, column string) *DropColumn

func (*DropColumn) CheckPrivileges added in v0.12.0

func (d *DropColumn) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropColumn) Children

func (d *DropColumn) Children() []sql.Node

func (*DropColumn) CollationCoercibility added in v0.15.0

func (*DropColumn) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropColumn) Database

func (c *DropColumn) Database() sql.Database

Database implements the sql.Databaser interface.

func (*DropColumn) Expressions added in v0.12.0

func (d *DropColumn) Expressions() []sql.Expression

func (*DropColumn) Resolved

func (d *DropColumn) Resolved() bool

func (*DropColumn) Schema

func (d *DropColumn) Schema() sql.Schema

func (*DropColumn) String

func (d *DropColumn) String() string

func (*DropColumn) TargetSchema added in v0.12.0

func (d *DropColumn) TargetSchema() sql.Schema

func (*DropColumn) Validate added in v0.15.0

func (d *DropColumn) Validate(ctx *sql.Context, tbl sql.Table) error

Validate returns an error if this drop column operation is invalid (because it would invalidate a column default or other constraint). TODO: move this check to analyzer

func (DropColumn) WithChildren

func (d DropColumn) WithChildren(children ...sql.Node) (sql.Node, error)

func (*DropColumn) WithDatabase

func (d *DropColumn) WithDatabase(db sql.Database) (sql.Node, error)

func (DropColumn) WithExpressions added in v0.12.0

func (d DropColumn) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (DropColumn) WithTargetSchema added in v0.12.0

func (d DropColumn) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type DropConstraint added in v0.10.0

type DropConstraint struct {
	UnaryNode
	Name string
}

DropConstraint is a temporary node to handle dropping a named constraint on a table. The type of the constraint is not known, and is determined during analysis.

func NewDropConstraint added in v0.10.0

func NewDropConstraint(table *UnresolvedTable, name string) *DropConstraint

NewDropConstraint returns a new DropConstraint node

func (*DropConstraint) CheckPrivileges added in v0.12.0

func (d *DropConstraint) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropConstraint) CollationCoercibility added in v0.15.0

func (d *DropConstraint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropConstraint) RowIter added in v0.10.0

func (d *DropConstraint) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

func (*DropConstraint) String added in v0.10.0

func (d *DropConstraint) String() string

func (DropConstraint) WithChildren added in v0.10.0

func (d DropConstraint) WithChildren(children ...sql.Node) (sql.Node, error)

type DropDB added in v0.9.0

type DropDB struct {
	Catalog  sql.Catalog
	DbName   string
	IfExists bool
}

DropDB removes a databases from the Catalog and updates the active database if it gets removed itself.

func NewDropDatabase added in v0.9.0

func NewDropDatabase(dbName string, ifExists bool) *DropDB

func (*DropDB) CheckPrivileges added in v0.12.0

func (d *DropDB) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropDB) Children added in v0.9.0

func (d *DropDB) Children() []sql.Node

func (*DropDB) CollationCoercibility added in v0.15.0

func (*DropDB) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropDB) Resolved added in v0.9.0

func (d *DropDB) Resolved() bool

func (*DropDB) Schema added in v0.9.0

func (d *DropDB) Schema() sql.Schema

func (*DropDB) String added in v0.9.0

func (d *DropDB) String() string

func (*DropDB) WithChildren added in v0.9.0

func (d *DropDB) WithChildren(children ...sql.Node) (sql.Node, error)

type DropEvent added in v0.15.0

type DropEvent struct {
	EventName string
	IfExists  bool
	// contains filtered or unexported fields
}

func NewDropEvent added in v0.15.0

func NewDropEvent(db sql.Database, eventName string, ifExists bool) *DropEvent

NewDropEvent creates a new *DropEvent node.

func (*DropEvent) CheckPrivileges added in v0.15.0

func (d *DropEvent) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropEvent) Children added in v0.15.0

func (c *DropEvent) Children() []sql.Node

Children implements the Node interface.

func (*DropEvent) Database added in v0.15.0

func (c *DropEvent) Database() sql.Database

Database implements the sql.Databaser interface.

func (*DropEvent) Resolved added in v0.15.0

func (c *DropEvent) Resolved() bool

Resolved implements the Resolvable interface.

func (*DropEvent) RowIter added in v0.15.0

func (d *DropEvent) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*DropEvent) Schema added in v0.15.0

func (d *DropEvent) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*DropEvent) String added in v0.15.0

func (d *DropEvent) String() string

String implements the sql.Node interface.

func (*DropEvent) WithChildren added in v0.15.0

func (d *DropEvent) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*DropEvent) WithDatabase added in v0.15.0

func (d *DropEvent) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type DropForeignKey

type DropForeignKey struct {
	// In the cases where we have multiple ALTER statements, we need to resolve the table at execution time rather than
	// during analysis. Otherwise, you could add a foreign key in the preceding alter and we may have analyzed to a
	// table that did not yet have that foreign key.
	DbProvider sql.DatabaseProvider

	Table string
	Name  string
	// contains filtered or unexported fields
}

func NewAlterDropForeignKey

func NewAlterDropForeignKey(db, table, name string) *DropForeignKey

func (*DropForeignKey) CheckPrivileges added in v0.12.0

func (p *DropForeignKey) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropForeignKey) Children added in v0.12.0

func (p *DropForeignKey) Children() []sql.Node

Children implements the interface sql.Node.

func (*DropForeignKey) CollationCoercibility added in v0.15.0

func (*DropForeignKey) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropForeignKey) Database added in v0.12.0

func (p *DropForeignKey) Database() string

func (*DropForeignKey) DatabaseProvider added in v0.12.0

func (p *DropForeignKey) DatabaseProvider() sql.DatabaseProvider

DatabaseProvider implements the interface sql.MultiDatabaser.

func (*DropForeignKey) Resolved added in v0.12.0

func (p *DropForeignKey) Resolved() bool

Resolved implements the interface sql.Node.

func (*DropForeignKey) Schema

func (p *DropForeignKey) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DropForeignKey) String

func (p *DropForeignKey) String() string

String implements the interface sql.Node.

func (*DropForeignKey) WithChildren

func (p *DropForeignKey) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DropForeignKey) WithDatabaseProvider added in v0.12.0

func (p *DropForeignKey) WithDatabaseProvider(provider sql.DatabaseProvider) (sql.Node, error)

WithDatabaseProvider implements the interface sql.MultiDatabaser.

type DropIndex

type DropIndex struct {
	Name            string
	Table           sql.Node
	Catalog         sql.Catalog
	CurrentDatabase string
}

DropIndex is a node to drop an index.

func NewDropIndex

func NewDropIndex(name string, table sql.Node) *DropIndex

NewDropIndex creates a new DropIndex node.

func (*DropIndex) CheckPrivileges added in v0.12.0

func (d *DropIndex) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropIndex) Children

func (d *DropIndex) Children() []sql.Node

Children implements the Node interface.

func (*DropIndex) CollationCoercibility added in v0.15.0

func (*DropIndex) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropIndex) Database added in v0.12.0

func (d *DropIndex) Database() string

func (*DropIndex) Resolved

func (d *DropIndex) Resolved() bool

Resolved implements the Node interface.

func (*DropIndex) Schema

func (d *DropIndex) Schema() sql.Schema

Schema implements the Node interface.

func (*DropIndex) String

func (d *DropIndex) String() string

func (*DropIndex) WithChildren

func (d *DropIndex) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type DropProcedure added in v0.9.0

type DropProcedure struct {
	Db            sql.Database
	IfExists      bool
	ProcedureName string
}

func NewDropProcedure added in v0.9.0

func NewDropProcedure(db sql.Database, procedureName string, ifExists bool) *DropProcedure

NewDropProcedure creates a new *DropProcedure node.

func (*DropProcedure) CheckPrivileges added in v0.12.0

func (d *DropProcedure) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropProcedure) Children added in v0.9.0

func (d *DropProcedure) Children() []sql.Node

Children implements the sql.Node interface.

func (*DropProcedure) CollationCoercibility added in v0.15.0

func (*DropProcedure) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropProcedure) Database added in v0.9.0

func (d *DropProcedure) Database() sql.Database

Database implements the sql.Databaser interface.

func (*DropProcedure) Resolved added in v0.9.0

func (d *DropProcedure) Resolved() bool

Resolved implements the sql.Node interface.

func (*DropProcedure) Schema added in v0.9.0

func (d *DropProcedure) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*DropProcedure) String added in v0.9.0

func (d *DropProcedure) String() string

String implements the sql.Node interface.

func (*DropProcedure) WithChildren added in v0.9.0

func (d *DropProcedure) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*DropProcedure) WithDatabase added in v0.9.0

func (d *DropProcedure) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type DropRole added in v0.12.0

type DropRole struct {
	IfExists bool
	Roles    []UserName
	MySQLDb  sql.Database
}

DropRole represents the statement DROP ROLE.

func NewDropRole added in v0.12.0

func NewDropRole(ifExists bool, roles []UserName) *DropRole

NewDropRole returns a new DropRole node.

func (*DropRole) CheckPrivileges added in v0.12.0

func (n *DropRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropRole) Children added in v0.12.0

func (n *DropRole) Children() []sql.Node

Children implements the interface sql.Node.

func (*DropRole) CollationCoercibility added in v0.15.0

func (*DropRole) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropRole) Database added in v0.12.0

func (n *DropRole) Database() sql.Database

Database implements the interface sql.Databaser.

func (*DropRole) Resolved added in v0.12.0

func (n *DropRole) Resolved() bool

Resolved implements the interface sql.Node.

func (*DropRole) RowIter added in v0.12.0

func (n *DropRole) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*DropRole) Schema added in v0.12.0

func (n *DropRole) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DropRole) String added in v0.12.0

func (n *DropRole) String() string

String implements the interface sql.Node.

func (*DropRole) WithChildren added in v0.12.0

func (n *DropRole) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DropRole) WithDatabase added in v0.12.0

func (n *DropRole) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type DropTable

type DropTable struct {
	Tables []sql.Node

	TriggerNames []string
	// contains filtered or unexported fields
}

DropTable is a node describing dropping one or more tables

func NewDropTable

func NewDropTable(tbls []sql.Node, ifExists bool) *DropTable

NewDropTable creates a new DropTable node

func (*DropTable) CheckPrivileges added in v0.12.0

func (d *DropTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropTable) Children

func (d *DropTable) Children() []sql.Node

Children implements the Node interface.

func (*DropTable) CollationCoercibility added in v0.15.0

func (*DropTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropTable) IfExists added in v0.12.0

func (d *DropTable) IfExists() bool

IfExists returns ifExists variable.

func (*DropTable) Resolved

func (d *DropTable) Resolved() bool

Resolved implements the sql.Expression interface.

func (*DropTable) Schema

func (d *DropTable) Schema() sql.Schema

Schema implements the sql.Expression interface.

func (*DropTable) String

func (d *DropTable) String() string

String implements the sql.Node interface.

func (*DropTable) TableNames

func (d *DropTable) TableNames() ([]string, error)

TableNames returns the names of the tables to drop.

func (*DropTable) WithChildren

func (d *DropTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*DropTable) WithTriggers

func (d *DropTable) WithTriggers(triggers []string) sql.Node

WithTriggers returns this node but with the given triggers.

type DropTrigger

type DropTrigger struct {
	Db          sql.Database
	IfExists    bool
	TriggerName string
}

func NewDropTrigger

func NewDropTrigger(db sql.Database, trigger string, ifExists bool) *DropTrigger

NewDropTrigger creates a new NewDropTrigger node for DROP TRIGGER statements.

func (*DropTrigger) CheckPrivileges added in v0.12.0

func (d *DropTrigger) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropTrigger) Children

func (d *DropTrigger) Children() []sql.Node

Children implements the sql.Node interface.

func (*DropTrigger) CollationCoercibility added in v0.15.0

func (*DropTrigger) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropTrigger) Database

func (d *DropTrigger) Database() sql.Database

Database implements the sql.Databaser interface.

func (*DropTrigger) Resolved

func (d *DropTrigger) Resolved() bool

Resolved implements the sql.Node interface.

func (*DropTrigger) Schema

func (d *DropTrigger) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*DropTrigger) String

func (d *DropTrigger) String() string

String implements the sql.Node interface.

func (*DropTrigger) WithChildren

func (d *DropTrigger) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*DropTrigger) WithDatabase

func (d *DropTrigger) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type DropUser added in v0.12.0

type DropUser struct {
	IfExists bool
	Users    []UserName
	MySQLDb  sql.Database
}

DropUser represents the statement DROP USER.

func NewDropUser added in v0.12.0

func NewDropUser(ifExists bool, users []UserName) *DropUser

NewDropUser returns a new DropUser node.

func (*DropUser) CheckPrivileges added in v0.12.0

func (n *DropUser) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropUser) Children added in v0.12.0

func (n *DropUser) Children() []sql.Node

Children implements the interface sql.Node.

func (*DropUser) CollationCoercibility added in v0.15.0

func (*DropUser) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropUser) Database added in v0.12.0

func (n *DropUser) Database() sql.Database

Database implements the interface sql.Databaser.

func (*DropUser) Resolved added in v0.12.0

func (n *DropUser) Resolved() bool

Resolved implements the interface sql.Node.

func (*DropUser) RowIter added in v0.12.0

func (n *DropUser) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*DropUser) Schema added in v0.12.0

func (n *DropUser) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*DropUser) String added in v0.12.0

func (n *DropUser) String() string

String implements the interface sql.Node.

func (*DropUser) WithChildren added in v0.12.0

func (n *DropUser) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*DropUser) WithDatabase added in v0.12.0

func (n *DropUser) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type DropView

type DropView struct {
	IfExists bool
	// contains filtered or unexported fields
}

DropView is a node representing the removal of a list of views, defined by the children member. The flag ifExists represents whether the user wants the node to fail if any of the views in children does not exist.

func NewDropView

func NewDropView(children []sql.Node, ifExists bool) *DropView

NewDropView creates a DropView node with the specified parameters, setting its catalog to nil.

func (*DropView) CheckPrivileges added in v0.12.0

func (dvs *DropView) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*DropView) Children

func (dvs *DropView) Children() []sql.Node

Children implements the Node interface. It returns the children of the CreateView node; i.e., all the views that will be dropped.

func (*DropView) CollationCoercibility added in v0.15.0

func (*DropView) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*DropView) Resolved

func (dvs *DropView) Resolved() bool

Resolved implements the Node interface. This node is resolved if and only if all of its children are resolved.

func (*DropView) Schema

func (dvs *DropView) Schema() sql.Schema

Schema implements the Node interface. It always returns nil.

func (*DropView) String

func (dvs *DropView) String() string

String implements the fmt.Stringer interface, using sql.TreePrinter to generate the string.

func (*DropView) WithChildren

func (dvs *DropView) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface. It always suceeds, returning a copy of this node with the new array of nodes as children.

type DummyResolvedDB

type DummyResolvedDB struct {
	// contains filtered or unexported fields
}

DummyResolvedDB is a transient database useful only for instances where a database is not available but required. No tables are persisted, nor will be returned.

func NewDummyResolvedDB

func NewDummyResolvedDB(name string) *DummyResolvedDB

NewDummyResolvedDB creates a new dummy database with the given name.

func (*DummyResolvedDB) AddTable

func (d *DummyResolvedDB) AddTable(name string, t sql.Table)

func (*DummyResolvedDB) CreateTable

func (d *DummyResolvedDB) CreateTable(ctx *sql.Context, name string, schema sql.PrimaryKeySchema, collation sql.CollationID) error

func (*DummyResolvedDB) DropTable

func (d *DummyResolvedDB) DropTable(ctx *sql.Context, name string) error

func (*DummyResolvedDB) GetTableInsensitive

func (d *DummyResolvedDB) GetTableInsensitive(ctx *sql.Context, tblName string) (sql.Table, bool, error)

func (*DummyResolvedDB) GetTableNames

func (d *DummyResolvedDB) GetTableNames(ctx *sql.Context) ([]string, error)

func (*DummyResolvedDB) Name

func (d *DummyResolvedDB) Name() string

func (*DummyResolvedDB) RenameTable

func (d *DummyResolvedDB) RenameTable(ctx *sql.Context, oldName, newName string) error

func (*DummyResolvedDB) Tables

func (d *DummyResolvedDB) Tables() map[string]sql.Table

type ElseCaseError added in v0.15.0

type ElseCaseError struct{}

func (ElseCaseError) CheckPrivileges added in v0.15.0

func (e ElseCaseError) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (ElseCaseError) Children added in v0.15.0

func (e ElseCaseError) Children() []sql.Node

Children implements the interface sql.Node.

func (ElseCaseError) CollationCoercibility added in v0.15.0

func (e ElseCaseError) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (ElseCaseError) Resolved added in v0.15.0

func (e ElseCaseError) Resolved() bool

Resolved implements the interface sql.Node.

func (ElseCaseError) Schema added in v0.15.0

func (e ElseCaseError) Schema() sql.Schema

Schema implements the interface sql.Node.

func (ElseCaseError) String added in v0.15.0

func (e ElseCaseError) String() string

String implements the interface sql.Node.

func (ElseCaseError) WithChildren added in v0.15.0

func (e ElseCaseError) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type EmptyTable

type EmptyTable struct {
	// contains filtered or unexported fields
}

func (*EmptyTable) CheckPrivileges added in v0.15.0

func (e *EmptyTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*EmptyTable) Children added in v0.15.0

func (*EmptyTable) Children() []sql.Node

func (*EmptyTable) CollationCoercibility added in v0.15.0

func (*EmptyTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*EmptyTable) Name added in v0.15.0

func (e *EmptyTable) Name() string

func (*EmptyTable) Resolved added in v0.15.0

func (*EmptyTable) Resolved() bool

func (*EmptyTable) RowIter added in v0.15.0

func (*EmptyTable) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

func (*EmptyTable) Schema added in v0.15.0

func (e *EmptyTable) Schema() sql.Schema

func (*EmptyTable) String added in v0.15.0

func (e *EmptyTable) String() string

func (*EmptyTable) WithChildren added in v0.15.0

func (e *EmptyTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type EventOnScheduleEveryInterval added in v0.15.0

type EventOnScheduleEveryInterval struct {
	Years   int64
	Months  int64
	Days    int64
	Hours   int64
	Minutes int64
	Seconds int64
}

EventOnScheduleEveryInterval is used to store ON SCHEDULE EVERY clause's interval definition. It is equivalent of expression.TimeDelta without microseconds field.

func EventOnScheduleEveryIntervalFromString added in v0.15.0

func EventOnScheduleEveryIntervalFromString(every string) (*EventOnScheduleEveryInterval, error)

EventOnScheduleEveryIntervalFromString returns *EventOnScheduleEveryInterval parsing given interval string such as `2 DAY` or `'1:2' MONTH_DAY`. This function is used in Dolt to construct EventOnScheduleEveryInterval value for the EventDetails.

func NewEveryInterval added in v0.15.0

func NewEveryInterval(y, mo, d, h, mi, s int64) *EventOnScheduleEveryInterval

func (*EventOnScheduleEveryInterval) GetIntervalValAndField added in v0.15.0

func (e *EventOnScheduleEveryInterval) GetIntervalValAndField() (string, string)

GetIntervalValAndField returns ON SCHEDULE EVERY clause's interval value and field type in string format (e.g. returns "'1:2'" and "MONTH_DAY" for 1 month and 2 day or returns "4" and "HOUR" for 4 hour intervals).

type EventStatus added in v0.15.0

type EventStatus byte

EventStatus represents an event status that is defined for an event.

const (
	EventStatus_Enable EventStatus = iota
	EventStatus_Disable
	EventStatus_DisableOnSlave
)

func EventStatusFromString added in v0.15.0

func EventStatusFromString(status string) (EventStatus, error)

EventStatusFromString returns EventStatus based on the given string value. This function is used in Dolt to get EventStatus value for the EventDetails.

func (EventStatus) String added in v0.15.0

func (e EventStatus) String() string

String returns the original SQL representation.

type Exchange

type Exchange struct {
	UnaryNode
	Parallelism int
}

Exchange is a node that can parallelize the underlying tree iterating partitions concurrently.

func NewExchange

func NewExchange(
	parallelism int,
	child sql.Node,
) *Exchange

NewExchange creates a new Exchange node.

func (*Exchange) CheckPrivileges added in v0.12.0

func (e *Exchange) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Exchange) CollationCoercibility added in v0.15.0

func (e *Exchange) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Exchange) DebugString

func (e *Exchange) DebugString() string

func (*Exchange) String

func (e *Exchange) String() string

func (*Exchange) WithChildren

func (e *Exchange) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ExchangePartition added in v0.15.0

type ExchangePartition struct {
	sql.Partition
	Table sql.Table
}

func (*ExchangePartition) CheckPrivileges added in v0.15.0

func (p *ExchangePartition) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (ExchangePartition) Children added in v0.15.0

func (ExchangePartition) Children() []sql.Node

func (*ExchangePartition) CollationCoercibility added in v0.15.0

func (p *ExchangePartition) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (ExchangePartition) Resolved added in v0.15.0

func (ExchangePartition) Resolved() bool

func (*ExchangePartition) Schema added in v0.15.0

func (p *ExchangePartition) Schema() sql.Schema

func (*ExchangePartition) String added in v0.15.0

func (p *ExchangePartition) String() string

func (*ExchangePartition) WithChildren added in v0.15.0

func (p *ExchangePartition) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ExecuteQuery added in v0.15.0

type ExecuteQuery struct {
	Name     string
	BindVars []sql.Expression
}

ExecuteQuery is a node that prepares the query

func NewExecuteQuery added in v0.15.0

func NewExecuteQuery(name string, bindVars ...sql.Expression) *ExecuteQuery

NewExecuteQuery executes a prepared statement

func (*ExecuteQuery) CheckPrivileges added in v0.15.0

func (p *ExecuteQuery) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ExecuteQuery) Children added in v0.15.0

func (p *ExecuteQuery) Children() []sql.Node

Children implements the Node interface.

func (*ExecuteQuery) CollationCoercibility added in v0.15.0

func (*ExecuteQuery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ExecuteQuery) Resolved added in v0.15.0

func (p *ExecuteQuery) Resolved() bool

func (*ExecuteQuery) RowIter added in v0.15.0

func (p *ExecuteQuery) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the Node interface.

func (*ExecuteQuery) Schema added in v0.15.0

func (p *ExecuteQuery) Schema() sql.Schema

Schema implements the Node interface.

func (*ExecuteQuery) String added in v0.15.0

func (p *ExecuteQuery) String() string

func (*ExecuteQuery) WithChildren added in v0.15.0

func (p *ExecuteQuery) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ExistsSubquery added in v0.11.0

type ExistsSubquery struct {
	Query *Subquery
}

ExistsSubquery is an expression that checks that a subquery returns a non-empty result set. It's in the plan package, instead of the expression package, because Subquery is itself in the plan package (because it functions more like a plan node than an expression in its evaluation).

func NewExistsSubquery added in v0.11.0

func NewExistsSubquery(sq *Subquery) *ExistsSubquery

NewExistsSubquery created an ExistsSubquery expression.

func (*ExistsSubquery) Children added in v0.11.0

func (e *ExistsSubquery) Children() []sql.Expression

Children implements the Expression interface.

func (*ExistsSubquery) CollationCoercibility added in v0.15.0

func (*ExistsSubquery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ExistsSubquery) Eval added in v0.11.0

func (e *ExistsSubquery) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*ExistsSubquery) IsNullable added in v0.11.0

func (e *ExistsSubquery) IsNullable() bool

IsNullable implements the Expression interface.

func (*ExistsSubquery) Resolved added in v0.11.0

func (e *ExistsSubquery) Resolved() bool

Resolved implements the Expression interface.

func (*ExistsSubquery) String added in v0.11.0

func (e *ExistsSubquery) String() string

String implements the Expression interface.

func (*ExistsSubquery) Type added in v0.11.0

func (e *ExistsSubquery) Type() sql.Type

Type implements the Expression interface.

func (*ExistsSubquery) WithChildren added in v0.11.0

func (e *ExistsSubquery) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type ExternalProcedure added in v0.12.0

type ExternalProcedure struct {
	sql.ExternalStoredProcedureDetails
	ParamDefinitions []ProcedureParam
	Params           []*expression.ProcedureParam
}

ExternalProcedure is the sql.Node container for sql.ExternalStoredProcedureDetails.

func (*ExternalProcedure) CheckPrivileges added in v0.12.0

func (n *ExternalProcedure) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ExternalProcedure) Children added in v0.12.0

func (n *ExternalProcedure) Children() []sql.Node

Children implements the interface sql.Node.

func (*ExternalProcedure) CollationCoercibility added in v0.15.0

func (*ExternalProcedure) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ExternalProcedure) Expressions added in v0.12.0

func (n *ExternalProcedure) Expressions() []sql.Expression

Expressions implements the interface sql.Expressioner.

func (*ExternalProcedure) ProcessParam added in v0.15.0

func (n *ExternalProcedure) ProcessParam(ctx *sql.Context, funcParamType reflect.Type, exprParamVal interface{}) (reflect.Value, error)

func (*ExternalProcedure) Resolved added in v0.12.0

func (n *ExternalProcedure) Resolved() bool

Resolved implements the interface sql.Node.

func (*ExternalProcedure) RowIter added in v0.12.0

func (n *ExternalProcedure) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*ExternalProcedure) Schema added in v0.12.0

func (n *ExternalProcedure) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*ExternalProcedure) String added in v0.12.0

func (n *ExternalProcedure) String() string

String implements the interface sql.Node.

func (*ExternalProcedure) WithChildren added in v0.12.0

func (n *ExternalProcedure) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*ExternalProcedure) WithExpressions added in v0.12.0

func (n *ExternalProcedure) WithExpressions(expressions ...sql.Expression) (sql.Node, error)

WithExpressions implements the interface sql.Expressioner.

type Fetch added in v0.15.0

type Fetch struct {
	Name      string
	Variables []string
	InnerSet  *Set
	Pref      *expression.ProcedureReference
	Sch       sql.Schema
}

Fetch represents the FETCH statement, which handles value acquisition from cursors.

func NewFetch added in v0.15.0

func NewFetch(name string, variables []string) *Fetch

NewFetch returns a new *Fetch node.

func (*Fetch) CheckPrivileges added in v0.15.0

func (f *Fetch) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Fetch) Children added in v0.15.0

func (f *Fetch) Children() []sql.Node

Children implements the interface sql.Node.

func (*Fetch) CollationCoercibility added in v0.15.0

func (*Fetch) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Fetch) Resolved added in v0.15.0

func (f *Fetch) Resolved() bool

Resolved implements the interface sql.Node.

func (*Fetch) Schema added in v0.15.0

func (f *Fetch) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Fetch) String added in v0.15.0

func (f *Fetch) String() string

String implements the interface sql.Node.

func (*Fetch) WithChildren added in v0.15.0

func (f *Fetch) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Fetch) WithParamReference added in v0.15.0

func (f *Fetch) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type Filter

type Filter struct {
	UnaryNode
	Expression sql.Expression
}

Filter skips rows that don't match a certain expression.

func NewFilter

func NewFilter(expression sql.Expression, child sql.Node) *Filter

NewFilter creates a new filter node.

func (*Filter) CheckPrivileges added in v0.12.0

func (f *Filter) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Filter) CollationCoercibility added in v0.15.0

func (f *Filter) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Filter) DebugString

func (f *Filter) DebugString() string

func (*Filter) Expressions

func (f *Filter) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*Filter) Resolved

func (f *Filter) Resolved() bool

Resolved implements the Resolvable interface.

func (*Filter) String

func (f *Filter) String() string

func (*Filter) WithChildren

func (f *Filter) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Filter) WithExpressions

func (f *Filter) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type FilterIter

type FilterIter struct {
	// contains filtered or unexported fields
}

FilterIter is an iterator that filters another iterator and skips rows that don't match the given condition.

func NewFilterIter

func NewFilterIter(
	cond sql.Expression,
	child sql.RowIter,
) *FilterIter

NewFilterIter creates a new FilterIter.

func (*FilterIter) Close

func (i *FilterIter) Close(ctx *sql.Context) error

Close implements the RowIter interface.

func (*FilterIter) Next

func (i *FilterIter) Next(ctx *sql.Context) (sql.Row, error)

Next implements the RowIter interface.

type FlushPrivileges added in v0.12.0

type FlushPrivileges struct {
	MysqlDb sql.Database
	// contains filtered or unexported fields
}

FlushPrivileges reads privileges from mysql tables and registers any unregistered privileges found.

func NewFlushPrivileges added in v0.12.0

func NewFlushPrivileges(ft bool) *FlushPrivileges

NewFlushPrivileges creates a new FlushPrivileges node.

func (*FlushPrivileges) CheckPrivileges added in v0.12.0

func (f *FlushPrivileges) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*FlushPrivileges) Children added in v0.12.0

func (*FlushPrivileges) Children() []sql.Node

Children implements the sql.Node interface.

func (*FlushPrivileges) CollationCoercibility added in v0.15.0

func (*FlushPrivileges) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*FlushPrivileges) Database added in v0.12.0

func (f *FlushPrivileges) Database() sql.Database

Database implements the sql.Databaser interface.

func (*FlushPrivileges) Resolved added in v0.12.0

func (f *FlushPrivileges) Resolved() bool

Resolved implements the interface sql.Node.

func (*FlushPrivileges) RowIter added in v0.12.0

func (f *FlushPrivileges) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*FlushPrivileges) Schema added in v0.12.0

func (*FlushPrivileges) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*FlushPrivileges) String added in v0.12.0

func (*FlushPrivileges) String() string

String implements the interface sql.Node.

func (*FlushPrivileges) WithChildren added in v0.12.0

func (f *FlushPrivileges) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*FlushPrivileges) WithDatabase added in v0.12.0

func (f *FlushPrivileges) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ForeignKeyEditor added in v0.12.0

type ForeignKeyEditor struct {
	Schema     sql.Schema
	Editor     sql.ForeignKeyEditor
	References []*ForeignKeyReferenceHandler
	RefActions []ForeignKeyRefActionData
	Cyclical   bool
}

ForeignKeyEditor handles update and delete operations, as they may have referential actions on other tables (such as cascading). If this editor is Cyclical, then that means that following the referential actions will eventually lead back to this same editor. Self-referential foreign keys are inherently cyclical.

func (*ForeignKeyEditor) Close added in v0.12.0

func (fkEditor *ForeignKeyEditor) Close(ctx *sql.Context) error

Close closes this handler along with all child handlers.

func (*ForeignKeyEditor) ColumnsUpdated added in v0.12.0

func (fkEditor *ForeignKeyEditor) ColumnsUpdated(refActionData ForeignKeyRefActionData, old sql.Row, new sql.Row) (bool, error)

ColumnsUpdated returns whether the columns involved in the foreign key were updated. Some updates may only update columns that are not involved in a foreign key, and therefore we should ignore a CASCADE or SET NULL referential action in such cases.

func (*ForeignKeyEditor) Delete added in v0.12.0

func (fkEditor *ForeignKeyEditor) Delete(ctx *sql.Context, row sql.Row, depth int) error

Delete handles both the standard DELETE statement and propagated referential actions from a parent table's ON DELETE.

func (*ForeignKeyEditor) IsInitialized added in v0.12.0

func (fkEditor *ForeignKeyEditor) IsInitialized(editors map[*ForeignKeyEditor]struct{}) bool

IsInitialized returns whether this editor has been initialized. The given map is used to prevent cycles, as editors will reference themselves if a cycle is formed between foreign keys.

func (*ForeignKeyEditor) OnDeleteCascade added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnDeleteCascade(ctx *sql.Context, refActionData ForeignKeyRefActionData, row sql.Row, depth int) error

OnDeleteCascade handles the ON DELETE CASCADE referential action.

func (*ForeignKeyEditor) OnDeleteRestrict added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnDeleteRestrict(ctx *sql.Context, refActionData ForeignKeyRefActionData, row sql.Row) error

OnDeleteRestrict handles the ON DELETE RESTRICT referential action.

func (*ForeignKeyEditor) OnDeleteSetNull added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnDeleteSetNull(ctx *sql.Context, refActionData ForeignKeyRefActionData, row sql.Row, depth int) error

OnDeleteSetNull handles the ON DELETE SET NULL referential action.

func (*ForeignKeyEditor) OnUpdateCascade added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnUpdateCascade(ctx *sql.Context, refActionData ForeignKeyRefActionData, old sql.Row, new sql.Row, depth int) error

OnUpdateCascade handles the ON UPDATE CASCADE referential action.

func (*ForeignKeyEditor) OnUpdateRestrict added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnUpdateRestrict(ctx *sql.Context, refActionData ForeignKeyRefActionData, old sql.Row, new sql.Row) error

OnUpdateRestrict handles the ON UPDATE RESTRICT referential action.

func (*ForeignKeyEditor) OnUpdateSetNull added in v0.12.0

func (fkEditor *ForeignKeyEditor) OnUpdateSetNull(ctx *sql.Context, refActionData ForeignKeyRefActionData, old sql.Row, new sql.Row, depth int) error

OnUpdateSetNull handles the ON UPDATE SET NULL referential action.

func (*ForeignKeyEditor) Update added in v0.12.0

func (fkEditor *ForeignKeyEditor) Update(ctx *sql.Context, old sql.Row, new sql.Row, depth int) error

Update handles both the standard UPDATE statement and propagated referential actions from a parent table's ON UPDATE.

type ForeignKeyHandler added in v0.12.0

type ForeignKeyHandler struct {
	Table        sql.ForeignKeyTable
	Sch          sql.Schema
	OriginalNode sql.Node
	Editor       *ForeignKeyEditor
	AllUpdaters  []sql.ForeignKeyEditor
}

ForeignKeyHandler handles all referencing and cascading operations that would need to be executed for an operation on a table.

func (*ForeignKeyHandler) CheckPrivileges added in v0.12.0

func (n *ForeignKeyHandler) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ForeignKeyHandler) Children added in v0.12.0

func (n *ForeignKeyHandler) Children() []sql.Node

Children implements the interface sql.Node.

func (*ForeignKeyHandler) Close added in v0.12.0

func (n *ForeignKeyHandler) Close(ctx *sql.Context) error

Close implements the interface sql.Closer.

func (*ForeignKeyHandler) Collation added in v0.14.0

func (n *ForeignKeyHandler) Collation() sql.CollationID

Collation implements the interface sql.Node.

func (*ForeignKeyHandler) CollationCoercibility added in v0.15.0

func (*ForeignKeyHandler) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ForeignKeyHandler) DebugString added in v0.15.0

func (n *ForeignKeyHandler) DebugString() string

func (*ForeignKeyHandler) Delete added in v0.12.0

func (n *ForeignKeyHandler) Delete(ctx *sql.Context, row sql.Row) error

Delete implements the interface sql.RowDeleter.

func (*ForeignKeyHandler) Deleter added in v0.12.0

func (n *ForeignKeyHandler) Deleter(context *sql.Context) sql.RowDeleter

Deleter implements the interface sql.DeletableTable.

func (*ForeignKeyHandler) DiscardChanges added in v0.12.0

func (n *ForeignKeyHandler) DiscardChanges(ctx *sql.Context, errorEncountered error) error

DiscardChanges implements the interface sql.TableEditor.

func (*ForeignKeyHandler) Insert added in v0.12.0

func (n *ForeignKeyHandler) Insert(ctx *sql.Context, row sql.Row) error

Insert implements the interface sql.RowInserter.

func (*ForeignKeyHandler) Inserter added in v0.12.0

func (n *ForeignKeyHandler) Inserter(context *sql.Context) sql.RowInserter

Inserter implements the interface sql.InsertableTable.

func (*ForeignKeyHandler) Name added in v0.12.0

func (n *ForeignKeyHandler) Name() string

Name implements the interface sql.Table.

func (*ForeignKeyHandler) PartitionRows added in v0.12.0

func (n *ForeignKeyHandler) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements the interface sql.Table.

func (*ForeignKeyHandler) Partitions added in v0.12.0

func (n *ForeignKeyHandler) Partitions(ctx *sql.Context) (sql.PartitionIter, error)

Partitions implements the interface sql.Table.

func (*ForeignKeyHandler) Replacer added in v0.12.0

func (n *ForeignKeyHandler) Replacer(ctx *sql.Context) sql.RowReplacer

Replacer implements the interface sql.ReplaceableTable.

func (*ForeignKeyHandler) Resolved added in v0.12.0

func (n *ForeignKeyHandler) Resolved() bool

Resolved implements the interface sql.Node.

func (*ForeignKeyHandler) Schema added in v0.12.0

func (n *ForeignKeyHandler) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*ForeignKeyHandler) StatementBegin added in v0.12.0

func (n *ForeignKeyHandler) StatementBegin(ctx *sql.Context)

StatementBegin implements the interface sql.TableEditor.

func (*ForeignKeyHandler) StatementComplete added in v0.12.0

func (n *ForeignKeyHandler) StatementComplete(ctx *sql.Context) error

StatementComplete implements the interface sql.TableEditor.

func (*ForeignKeyHandler) String added in v0.12.0

func (n *ForeignKeyHandler) String() string

String implements the interface sql.Node.

func (*ForeignKeyHandler) Update added in v0.12.0

func (n *ForeignKeyHandler) Update(ctx *sql.Context, old sql.Row, new sql.Row) error

Update implements the interface sql.RowUpdater.

func (*ForeignKeyHandler) Updater added in v0.12.0

func (n *ForeignKeyHandler) Updater(ctx *sql.Context) sql.RowUpdater

Updater implements the interface sql.UpdatableTable.

func (*ForeignKeyHandler) WithChildren added in v0.12.0

func (n *ForeignKeyHandler) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type ForeignKeyRefActionData added in v0.12.0

type ForeignKeyRefActionData struct {
	RowMapper          *ForeignKeyRowMapper
	Editor             *ForeignKeyEditor
	ForeignKey         sql.ForeignKeyConstraint
	ChildParentMapping ChildParentMapping
}

ForeignKeyRefActionData contains the mapper, editor, and child to parent mapping for processing referential actions.

type ForeignKeyReferenceHandler added in v0.12.0

type ForeignKeyReferenceHandler struct {
	ForeignKey sql.ForeignKeyConstraint
	RowMapper  ForeignKeyRowMapper
	SelfCols   map[string]int // SelfCols are used for self-referential fks to refer to a col position given a col name
}

ForeignKeyReferenceHandler handles references to any parent rows to verify they exist.

func (*ForeignKeyReferenceHandler) CheckReference added in v0.12.0

func (reference *ForeignKeyReferenceHandler) CheckReference(ctx *sql.Context, row sql.Row) error

CheckReference checks that the given row has an index entry in the referenced table.

func (*ForeignKeyReferenceHandler) CheckTable added in v0.12.0

func (reference *ForeignKeyReferenceHandler) CheckTable(ctx *sql.Context, tbl sql.ForeignKeyTable) error

CheckTable checks that every row in the table has an index entry in the referenced table.

func (*ForeignKeyReferenceHandler) IsInitialized added in v0.12.0

func (reference *ForeignKeyReferenceHandler) IsInitialized() bool

IsInitialized returns whether this reference handler has been initialized.

type ForeignKeyRowMapper added in v0.12.0

type ForeignKeyRowMapper struct {
	Index     sql.Index
	Updater   sql.ForeignKeyEditor
	SourceSch sql.Schema
	// IndexPositions hold the mapping between an index's column position and the source row's column position. Given
	// an index (x1, x2) and a source row (y1, y2, y3) and the relation (x1->y3, x2->y1), this slice would contain
	// [2, 0]. The first index column "x1" maps to the third source column "y3" (so position 2 since it's zero-based),
	// and the second index column "x2" maps to the first source column "y1" (position 0).
	IndexPositions []int
	// AppendTypes hold any types that may be needed to complete an index range's generation. Foreign keys are allowed
	// to use an index's prefix, and indexes expect ranges to reference all of their columns (not just the prefix), so
	// we grab the types of the suffix index columns to append to the range after the prefix columns that we're
	// referencing.
	AppendTypes []sql.Type
}

ForeignKeyRowMapper takes a source row and returns all matching rows on the contained table according to the row mapping from the source columns to the contained index's columns.

func (*ForeignKeyRowMapper) GetIter added in v0.12.0

func (mapper *ForeignKeyRowMapper) GetIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

GetIter returns a row iterator for all rows that match the given source row.

func (*ForeignKeyRowMapper) GetKeyString added in v0.12.0

func (mapper *ForeignKeyRowMapper) GetKeyString(row sql.Row) string

GetKeyString returns a string representing the key used to access the index.

func (*ForeignKeyRowMapper) IsInitialized added in v0.12.0

func (mapper *ForeignKeyRowMapper) IsInitialized() bool

IsInitialized returns whether this mapper has been initialized.

type Grant added in v0.12.0

type Grant struct {
	Privileges      []Privilege
	ObjectType      ObjectType
	PrivilegeLevel  PrivilegeLevel
	Users           []UserName
	WithGrantOption bool
	As              *GrantUserAssumption
	MySQLDb         sql.Database
}

Grant represents the statement GRANT [privilege...] ON [item] TO [user...].

func NewGrant added in v0.12.0

func NewGrant(db sql.Database, privileges []Privilege, objType ObjectType, level PrivilegeLevel, users []UserName, withGrant bool, as *GrantUserAssumption, granter string) (*Grant, error)

NewGrant returns a new Grant node.

func (*Grant) CheckPrivileges added in v0.12.0

func (n *Grant) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Grant) Children added in v0.12.0

func (n *Grant) Children() []sql.Node

Children implements the interface sql.Node.

func (*Grant) CollationCoercibility added in v0.15.0

func (*Grant) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Grant) Database added in v0.12.0

func (n *Grant) Database() sql.Database

Database implements the interface sql.Databaser.

func (*Grant) HandleDatabasePrivileges added in v0.15.0

func (n *Grant) HandleDatabasePrivileges(user *mysql_db.User, dbName string) error

HandleDatabasePrivileges handles giving a user their database privileges.

func (*Grant) HandleGlobalPrivileges added in v0.15.0

func (n *Grant) HandleGlobalPrivileges(user *mysql_db.User) error

HandleGlobalPrivileges handles giving a user their global privileges.

func (*Grant) HandleTablePrivileges added in v0.15.0

func (n *Grant) HandleTablePrivileges(user *mysql_db.User, dbName string, tblName string) error

HandleTablePrivileges handles giving a user their table privileges.

func (*Grant) Resolved added in v0.12.0

func (n *Grant) Resolved() bool

Resolved implements the interface sql.Node.

func (*Grant) RowIter added in v0.12.0

func (n *Grant) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*Grant) Schema added in v0.12.0

func (n *Grant) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Grant) String added in v0.12.0

func (n *Grant) String() string

String implements the interface sql.Node.

func (*Grant) WithChildren added in v0.12.0

func (n *Grant) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Grant) WithDatabase added in v0.12.0

func (n *Grant) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type GrantProxy added in v0.12.0

type GrantProxy struct {
	On              UserName
	To              []UserName
	WithGrantOption bool
}

GrantProxy represents the statement GRANT PROXY.

func NewGrantProxy added in v0.12.0

func NewGrantProxy(on UserName, to []UserName, withGrant bool) *GrantProxy

NewGrantProxy returns a new GrantProxy node.

func (*GrantProxy) CheckPrivileges added in v0.12.0

func (n *GrantProxy) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*GrantProxy) Children added in v0.12.0

func (n *GrantProxy) Children() []sql.Node

Children implements the interface sql.Node.

func (*GrantProxy) CollationCoercibility added in v0.15.0

func (*GrantProxy) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GrantProxy) Resolved added in v0.12.0

func (n *GrantProxy) Resolved() bool

Resolved implements the interface sql.Node.

func (*GrantProxy) RowIter added in v0.12.0

func (n *GrantProxy) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*GrantProxy) Schema added in v0.12.0

func (n *GrantProxy) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*GrantProxy) String added in v0.12.0

func (n *GrantProxy) String() string

String implements the interface sql.Node.

func (*GrantProxy) WithChildren added in v0.12.0

func (n *GrantProxy) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type GrantRole added in v0.12.0

type GrantRole struct {
	Roles           []UserName
	TargetUsers     []UserName
	WithAdminOption bool
	MySQLDb         sql.Database
}

GrantRole represents the statement GRANT [role...] TO [user...].

func NewGrantRole added in v0.12.0

func NewGrantRole(roles []UserName, users []UserName, withAdmin bool) *GrantRole

NewGrantRole returns a new GrantRole node.

func (*GrantRole) CheckPrivileges added in v0.12.0

func (n *GrantRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*GrantRole) Children added in v0.12.0

func (n *GrantRole) Children() []sql.Node

Children implements the interface sql.Node.

func (*GrantRole) CollationCoercibility added in v0.15.0

func (*GrantRole) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GrantRole) Database added in v0.12.0

func (n *GrantRole) Database() sql.Database

Database implements the interface sql.Databaser.

func (*GrantRole) Resolved added in v0.12.0

func (n *GrantRole) Resolved() bool

Resolved implements the interface sql.Node.

func (*GrantRole) RowIter added in v0.12.0

func (n *GrantRole) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*GrantRole) Schema added in v0.12.0

func (n *GrantRole) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*GrantRole) String added in v0.12.0

func (n *GrantRole) String() string

String implements the interface sql.Node.

func (*GrantRole) WithChildren added in v0.12.0

func (n *GrantRole) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*GrantRole) WithDatabase added in v0.12.0

func (n *GrantRole) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type GrantUserAssumption added in v0.12.0

type GrantUserAssumption struct {
	Type  GrantUserAssumptionType
	User  UserName
	Roles []UserName
}

GrantUserAssumption represents the target user that the user executing the GRANT statement will assume the identity of.

type GrantUserAssumptionType added in v0.12.0

type GrantUserAssumptionType byte

GrantUserAssumptionType is the assumption type that the user executing the GRANT statement will use.

const (
	GrantUserAssumptionType_Default GrantUserAssumptionType = iota
	GrantUserAssumptionType_None
	GrantUserAssumptionType_All
	GrantUserAssumptionType_AllExcept
	GrantUserAssumptionType_Roles
)

type GroupBy

type GroupBy struct {
	UnaryNode
	SelectedExprs []sql.Expression
	GroupByExprs  []sql.Expression
}

GroupBy groups the rows by some expressions.

func NewGroupBy

func NewGroupBy(selectedExprs, groupByExprs []sql.Expression, child sql.Node) *GroupBy

NewGroupBy creates a new GroupBy node. Like Project, GroupBy is a top-level node, and contains all the fields that will appear in the output of the query. Some of these fields may be aggregate functions, some may be columns or other expressions. Unlike a project, the GroupBy also has a list of group-by expressions, which usually also appear in the list of selected expressions.

func (*GroupBy) CheckPrivileges added in v0.12.0

func (g *GroupBy) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*GroupBy) CollationCoercibility added in v0.15.0

func (g *GroupBy) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*GroupBy) DebugString

func (g *GroupBy) DebugString() string

func (*GroupBy) Expressions

func (g *GroupBy) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*GroupBy) ProjectedExprs added in v0.14.0

func (g *GroupBy) ProjectedExprs() []sql.Expression

ProjectedExprs implements the sql.Projector interface

func (*GroupBy) Resolved

func (g *GroupBy) Resolved() bool

Resolved implements the Resolvable interface.

func (*GroupBy) Schema

func (g *GroupBy) Schema() sql.Schema

Schema implements the Node interface.

func (*GroupBy) String

func (g *GroupBy) String() string

func (*GroupBy) WithChildren

func (g *GroupBy) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*GroupBy) WithExpressions

func (g *GroupBy) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Node interface.

func (*GroupBy) WithProjectedExprs added in v0.14.0

func (g *GroupBy) WithProjectedExprs(exprs ...sql.Expression) (sql.Projector, error)

WithProjectedExprs implements the sql.Projector interface

type HashLookup added in v0.10.0

type HashLookup struct {
	UnaryNode
	Inner  sql.Expression
	Outer  sql.Expression
	Mutex  *sync.Mutex
	Lookup map[interface{}][]sql.Row
}

func NewHashLookup added in v0.10.0

func NewHashLookup(n *CachedResults, childProjection sql.Expression, lookupProjection sql.Expression) *HashLookup

NewHashLookup returns a node that performs an indexed hash lookup of cached rows for fulfilling RowIter() calls. In particular, this node sits directly on top of a `CachedResults` node and has two expressions: a projection for hashing the Child row results and another projection for hashing the parent row values when performing a lookup. When RowIter is called, if cached results are available, it fulfills the RowIter call by performing a hash lookup on the projected results. If cached results are not available, it simply delegates to the child.

func (*HashLookup) CheckPrivileges added in v0.12.0

func (n *HashLookup) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*HashLookup) CollationCoercibility added in v0.15.0

func (n *HashLookup) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*HashLookup) DebugString added in v0.10.0

func (n *HashLookup) DebugString() string

func (*HashLookup) Dispose added in v0.14.0

func (n *HashLookup) Dispose()

func (*HashLookup) Expressions added in v0.14.0

func (n *HashLookup) Expressions() []sql.Expression

func (*HashLookup) GetHashKey added in v0.15.0

func (n *HashLookup) GetHashKey(ctx *sql.Context, e sql.Expression, row sql.Row) (interface{}, error)

Convert a tuple expression returning []interface{} into something comparable. Fast paths a few smaller slices into fixed size arrays, puts everything else through string serialization and a hash for now. It is OK to hash lossy here as the join condition is still evaluated after the matching rows are returned.

func (*HashLookup) String added in v0.10.0

func (n *HashLookup) String() string

func (*HashLookup) WithChildren added in v0.10.0

func (n *HashLookup) WithChildren(children ...sql.Node) (sql.Node, error)

func (*HashLookup) WithExpressions added in v0.14.0

func (n *HashLookup) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

type Having

type Having struct {
	UnaryNode
	Cond sql.Expression
}

Having node is a filter that supports aggregate expressions. A having node is identical to a filter node in behaviour. The difference is that some analyzer rules work specifically on having clauses and not filters. For that reason, Having is a completely new node instead of using just filter.

func NewHaving

func NewHaving(cond sql.Expression, child sql.Node) *Having

NewHaving creates a new having node.

func (*Having) CheckPrivileges added in v0.12.0

func (h *Having) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Having) CollationCoercibility added in v0.15.0

func (h *Having) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Having) DebugString added in v0.9.0

func (h *Having) DebugString() string

func (*Having) Expressions

func (h *Having) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*Having) Resolved

func (h *Having) Resolved() bool

Resolved implements the sql.Node interface.

func (*Having) String

func (h *Having) String() string

func (*Having) WithChildren

func (h *Having) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Having) WithExpressions

func (h *Having) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type IfConditional added in v0.9.0

type IfConditional struct {
	Condition sql.Expression
	Body      sql.Node
}

IfConditional represents IF statements only.

func NewIfConditional added in v0.9.0

func NewIfConditional(condition sql.Expression, body sql.Node) *IfConditional

NewIfConditional creates a new *IfConditional node.

func (*IfConditional) CheckPrivileges added in v0.12.0

func (ic *IfConditional) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*IfConditional) Children added in v0.9.0

func (ic *IfConditional) Children() []sql.Node

Children implements the sql.Node interface.

func (*IfConditional) CollationCoercibility added in v0.15.0

func (ic *IfConditional) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IfConditional) DebugString added in v0.9.0

func (ic *IfConditional) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*IfConditional) Expressions added in v0.9.0

func (ic *IfConditional) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*IfConditional) Resolved added in v0.9.0

func (ic *IfConditional) Resolved() bool

Resolved implements the sql.Node interface.

func (*IfConditional) Schema added in v0.9.0

func (ic *IfConditional) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*IfConditional) String added in v0.9.0

func (ic *IfConditional) String() string

String implements the sql.Node interface.

func (*IfConditional) WithChildren added in v0.9.0

func (ic *IfConditional) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*IfConditional) WithExpressions added in v0.9.0

func (ic *IfConditional) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type IfElseBlock added in v0.9.0

type IfElseBlock struct {
	IfConditionals []*IfConditional
	Else           sql.Node
}

IfElseBlock represents IF/ELSE IF/ELSE statements.

func NewIfElse added in v0.9.0

func NewIfElse(ifConditionals []*IfConditional, elseStatement sql.Node) *IfElseBlock

NewIfElse creates a new *IfElseBlock node.

func (*IfElseBlock) CheckPrivileges added in v0.12.0

func (ieb *IfElseBlock) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*IfElseBlock) Children added in v0.9.0

func (ieb *IfElseBlock) Children() []sql.Node

Children implements the sql.Node interface.

func (*IfElseBlock) CollationCoercibility added in v0.15.0

func (ieb *IfElseBlock) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IfElseBlock) DebugString added in v0.9.0

func (ieb *IfElseBlock) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*IfElseBlock) Resolved added in v0.9.0

func (ieb *IfElseBlock) Resolved() bool

Resolved implements the sql.Node interface.

func (*IfElseBlock) Schema added in v0.9.0

func (ieb *IfElseBlock) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*IfElseBlock) String added in v0.9.0

func (ieb *IfElseBlock) String() string

String implements the sql.Node interface.

func (*IfElseBlock) WithChildren added in v0.9.0

func (ieb *IfElseBlock) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type IfNotExistsOption added in v0.11.0

type IfNotExistsOption bool
const (
	IfNotExists       IfNotExistsOption = true
	IfNotExistsAbsent IfNotExistsOption = false
)

type InSubquery

type InSubquery struct {
	expression.BinaryExpression
}

InSubquery is an expression that checks an expression is in the result of a subquery. It's in the plan package, instead of the expression package, because Subquery is itself in the plan package (because it functions more like a plan node than an expression in its evaluation).

func NewInSubquery

func NewInSubquery(left sql.Expression, right sql.Expression) *InSubquery

NewInSubquery creates an InSubquery expression.

func (*InSubquery) Children

func (in *InSubquery) Children() []sql.Expression

Children implements the Expression interface.

func (*InSubquery) CollationCoercibility added in v0.15.0

func (*InSubquery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*InSubquery) DebugString

func (in *InSubquery) DebugString() string

func (*InSubquery) Dispose added in v0.15.0

func (in *InSubquery) Dispose()

Dispose implements sql.Disposable

func (*InSubquery) Eval

func (in *InSubquery) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*InSubquery) String

func (in *InSubquery) String() string

func (*InSubquery) Type

func (in *InSubquery) Type() sql.Type

Type implements sql.Expression

func (*InSubquery) WithChildren

func (in *InSubquery) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

type IndexAction

type IndexAction byte
const (
	IndexAction_Create IndexAction = iota
	IndexAction_Drop
	IndexAction_Rename
	IndexAction_DisableEnableKeys
)

type IndexDefinition

type IndexDefinition struct {
	IndexName  string
	Using      sql.IndexUsing
	Constraint sql.IndexConstraint
	Columns    []sql.IndexColumn
	Comment    string
}

func (*IndexDefinition) ColumnNames added in v0.12.0

func (i *IndexDefinition) ColumnNames() []string

ColumnNames returns each column's name without the length property.

func (*IndexDefinition) String added in v0.10.0

func (i *IndexDefinition) String() string

type IndexedTableAccess

type IndexedTableAccess struct {
	ResolvedTable *ResolvedTable

	Table sql.IndexedTable
	// contains filtered or unexported fields
}

IndexedTableAccess represents an indexed lookup of a particular ResolvedTable. The values for the key used to access the indexed table is provided in RowIter(), or during static analysis.

func NewIndexedAccessForResolvedTable added in v0.14.0

func NewIndexedAccessForResolvedTable(rt *ResolvedTable, lb *LookupBuilder) (*IndexedTableAccess, error)

NewIndexedAccessForResolvedTable creates an IndexedTableAccess node if the resolved table embeds an IndexAddressableTable, otherwise returns an error.

func NewIndexedTableAccess

func NewIndexedTableAccess(rt *ResolvedTable, t sql.IndexedTable, lb *LookupBuilder) *IndexedTableAccess

NewIndexedTableAccess returns a new IndexedTableAccess node that will use the LookupBuilder to build lookups. An index lookup will be calculated and applied for the row given in RowIter().

func NewStaticIndexedAccessForResolvedTable added in v0.14.0

func NewStaticIndexedAccessForResolvedTable(rt *ResolvedTable, lookup sql.IndexLookup) (*IndexedTableAccess, error)

NewStaticIndexedAccessForResolvedTable creates an IndexedTableAccess node if the resolved table embeds an IndexAddressableTable, otherwise returns an error.

func NewStaticIndexedTableAccess

func NewStaticIndexedTableAccess(rt *ResolvedTable, t sql.IndexedTable, lookup sql.IndexLookup) *IndexedTableAccess

NewStaticIndexedTableAccess returns a new IndexedTableAccess node with the indexlookup given. It will be applied in RowIter() without consideration of the row given. The key expression should faithfully represent this lookup, but is only for display purposes.

func (*IndexedTableAccess) CanBuildIndex added in v0.12.0

func (i *IndexedTableAccess) CanBuildIndex(ctx *sql.Context) (bool, error)

CanBuildIndex returns whether an index lookup on this table can be successfully built for a zero-valued key. For a static lookup, no lookup needs to be built, so returns true.

func (*IndexedTableAccess) CheckPrivileges added in v0.12.0

func (i *IndexedTableAccess) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*IndexedTableAccess) Children added in v0.12.0

func (i *IndexedTableAccess) Children() []sql.Node

func (*IndexedTableAccess) Collation added in v0.14.0

func (i *IndexedTableAccess) Collation() sql.CollationID

func (*IndexedTableAccess) CollationCoercibility added in v0.15.0

func (i *IndexedTableAccess) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*IndexedTableAccess) Database added in v0.12.0

func (i *IndexedTableAccess) Database() sql.Database

func (*IndexedTableAccess) DebugString

func (i *IndexedTableAccess) DebugString() string

func (*IndexedTableAccess) Expressions

func (i *IndexedTableAccess) Expressions() []sql.Expression

Expressions implements sql.Expressioner

func (*IndexedTableAccess) GetLookup added in v0.15.0

func (i *IndexedTableAccess) GetLookup(ctx *sql.Context, row sql.Row) (sql.IndexLookup, error)

func (*IndexedTableAccess) Index added in v0.12.0

func (i *IndexedTableAccess) Index() sql.Index

func (*IndexedTableAccess) IsStatic added in v0.14.0

func (i *IndexedTableAccess) IsStatic() bool

func (*IndexedTableAccess) Name added in v0.12.0

func (i *IndexedTableAccess) Name() string

func (*IndexedTableAccess) PartitionRows added in v0.12.0

func (i *IndexedTableAccess) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements sql.Table

func (*IndexedTableAccess) Partitions added in v0.12.0

func (i *IndexedTableAccess) Partitions(ctx *sql.Context) (sql.PartitionIter, error)

Partitions implements sql.Table

func (*IndexedTableAccess) Resolved added in v0.12.0

func (i *IndexedTableAccess) Resolved() bool

func (*IndexedTableAccess) Schema added in v0.12.0

func (i *IndexedTableAccess) Schema() sql.Schema

func (*IndexedTableAccess) String

func (i *IndexedTableAccess) String() string

func (*IndexedTableAccess) WithChildren

func (i *IndexedTableAccess) WithChildren(children ...sql.Node) (sql.Node, error)

func (*IndexedTableAccess) WithExpressions

func (i *IndexedTableAccess) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements sql.Expressioner

func (IndexedTableAccess) WithTable added in v0.12.0

func (i IndexedTableAccess) WithTable(table sql.Table) (*IndexedTableAccess, error)

WithTable replaces the underlying ResolvedTable with the one given.

type InsertDestination added in v0.12.0

type InsertDestination struct {
	UnaryNode
	Sch sql.Schema
}

InsertDestination is a wrapper for a table to be used with InsertInto.Destination that allows the schema to be overridden. This is useful when the table in question has late-resolving column defaults.

func NewInsertDestination added in v0.12.0

func NewInsertDestination(schema sql.Schema, node sql.Node) *InsertDestination

func (*InsertDestination) CheckPrivileges added in v0.12.0

func (id *InsertDestination) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*InsertDestination) CollationCoercibility added in v0.15.0

func (id *InsertDestination) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*InsertDestination) DebugString added in v0.12.0

func (id *InsertDestination) DebugString() string

func (*InsertDestination) Expressions added in v0.12.0

func (id *InsertDestination) Expressions() []sql.Expression

func (*InsertDestination) Resolved added in v0.12.0

func (id *InsertDestination) Resolved() bool

func (*InsertDestination) Schema added in v0.12.0

func (id *InsertDestination) Schema() sql.Schema

func (*InsertDestination) String added in v0.12.0

func (id *InsertDestination) String() string

func (InsertDestination) WithChildren added in v0.12.0

func (id InsertDestination) WithChildren(children ...sql.Node) (sql.Node, error)

func (InsertDestination) WithExpressions added in v0.12.0

func (id InsertDestination) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

type InsertInto

type InsertInto struct {
	Destination sql.Node
	Source      sql.Node
	ColumnNames []string
	IsReplace   bool
	OnDupExprs  []sql.Expression
	Checks      sql.CheckConstraints
	Ignore      bool
	// contains filtered or unexported fields
}

InsertInto is the top level node for INSERT INTO statements. It has a source for rows and a destination to insert them into.

func NewInsertInto

func NewInsertInto(db sql.Database, dst, src sql.Node, isReplace bool, cols []string, onDupExprs []sql.Expression, ignore bool) *InsertInto

NewInsertInto creates an InsertInto node.

func (*InsertInto) CheckPrivileges added in v0.12.0

func (ii *InsertInto) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*InsertInto) Children added in v0.9.0

func (ii *InsertInto) Children() []sql.Node

func (*InsertInto) CollationCoercibility added in v0.15.0

func (*InsertInto) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*InsertInto) Database added in v0.9.0

func (ii *InsertInto) Database() sql.Database

func (InsertInto) DebugString

func (ii InsertInto) DebugString() string

func (*InsertInto) DisjointedChildren added in v0.15.0

func (ii *InsertInto) DisjointedChildren() [][]sql.Node

DisjointedChildren implements the interface DisjointedChildrenNode.

func (*InsertInto) Dispose added in v0.15.0

func (ii *InsertInto) Dispose()

func (*InsertInto) Expressions

func (ii *InsertInto) Expressions() []sql.Expression

func (*InsertInto) Resolved

func (ii *InsertInto) Resolved() bool

Resolved implements the Resolvable interface.

func (*InsertInto) Schema

func (ii *InsertInto) Schema() sql.Schema

Schema implements the sql.Node interface. Insert nodes return rows that are inserted. Replaces return a concatenation of the deleted row and the inserted row. If no row was deleted, the value of those columns is nil.

func (InsertInto) String

func (ii InsertInto) String() string

func (*InsertInto) WithChildren

func (ii *InsertInto) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*InsertInto) WithDatabase added in v0.9.0

func (ii *InsertInto) WithDatabase(database sql.Database) (sql.Node, error)

func (*InsertInto) WithDisjointedChildren added in v0.15.0

func (ii *InsertInto) WithDisjointedChildren(children [][]sql.Node) (sql.Node, error)

WithDisjointedChildren implements the interface DisjointedChildrenNode.

func (InsertInto) WithExpressions

func (ii InsertInto) WithExpressions(newExprs ...sql.Expression) (sql.Node, error)

func (*InsertInto) WithSource added in v0.9.0

func (ii *InsertInto) WithSource(src sql.Node) sql.Node

WithSource sets the source node for this insert, which is analyzed separately

type Into added in v0.12.0

type Into struct {
	UnaryNode
	IntoVars []sql.Expression
}

Into is a node to wrap the top-level node in a query plan so that any result will set user-defined or others variables given

func NewInto added in v0.12.0

func NewInto(child sql.Node, variables []sql.Expression) *Into

func (*Into) CheckPrivileges added in v0.12.0

func (i *Into) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Into) CollationCoercibility added in v0.15.0

func (i *Into) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Into) DebugString added in v0.12.0

func (i *Into) DebugString() string

func (*Into) Expressions added in v0.12.0

func (i *Into) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*Into) String added in v0.12.0

func (i *Into) String() string

func (*Into) WithChildren added in v0.12.0

func (i *Into) WithChildren(children ...sql.Node) (sql.Node, error)

func (*Into) WithExpressions added in v0.12.0

func (i *Into) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type Iterate added in v0.15.0

type Iterate struct {
	Label string
}

Iterate represents the ITERATE statement, which instructs a loop to continue to the next iteration. Equivalent to "continue" in Go.

func NewIterate added in v0.15.0

func NewIterate(label string) *Iterate

NewIterate returns a new *Iterate node.

func (*Iterate) CheckPrivileges added in v0.15.0

func (i *Iterate) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Iterate) Children added in v0.15.0

func (i *Iterate) Children() []sql.Node

Children implements the interface sql.Node.

func (*Iterate) CollationCoercibility added in v0.15.0

func (*Iterate) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Iterate) Resolved added in v0.15.0

func (i *Iterate) Resolved() bool

Resolved implements the interface sql.Node.

func (*Iterate) Schema added in v0.15.0

func (i *Iterate) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Iterate) String added in v0.15.0

func (i *Iterate) String() string

String implements the interface sql.Node.

func (*Iterate) WithChildren added in v0.15.0

func (i *Iterate) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type JSONTable added in v0.14.0

type JSONTable struct {
	DataExpr sql.Expression

	Path string

	ColPaths []string
	// contains filtered or unexported fields
}

func (*JSONTable) CheckPrivileges added in v0.14.0

func (t *JSONTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the sql.Node interface

func (*JSONTable) Children added in v0.14.0

func (t *JSONTable) Children() []sql.Node

Children implements the sql.Node interface

func (*JSONTable) Collation added in v0.14.0

func (t *JSONTable) Collation() sql.CollationID

Collation implements the sql.Table interface

func (*JSONTable) CollationCoercibility added in v0.15.0

func (*JSONTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*JSONTable) Expressions added in v0.14.0

func (t *JSONTable) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface

func (*JSONTable) Name added in v0.14.0

func (t *JSONTable) Name() string

Name implements the sql.Table interface

func (*JSONTable) PartitionRows added in v0.14.0

func (t *JSONTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements the sql.Table interface

func (*JSONTable) Partitions added in v0.14.0

func (t *JSONTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)

Partitions implements the sql.Table interface

func (*JSONTable) Resolved added in v0.14.0

func (t *JSONTable) Resolved() bool

Resolved implements the sql.Resolvable interface

func (*JSONTable) Schema added in v0.14.0

func (t *JSONTable) Schema() sql.Schema

Schema implements the sql.Table interface

func (*JSONTable) String added in v0.14.0

func (t *JSONTable) String() string

String implements the sql.Table interface

func (*JSONTable) WithChildren added in v0.14.0

func (t *JSONTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface

func (*JSONTable) WithExpressions added in v0.14.0

func (t *JSONTable) WithExpressions(expression ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface

type JoinNode

type JoinNode struct {
	BinaryNode
	Filter     sql.Expression
	Op         JoinType
	CommentStr string
	ScopeLen   int
}

JoinNode contains all the common data fields and implements the common sql.Node getters for all join types.

func NewAntiJoin added in v0.14.0

func NewAntiJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewCrossJoin

func NewCrossJoin(left, right sql.Node) *JoinNode

func NewFullOuterJoin added in v0.14.0

func NewFullOuterJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewHashJoin added in v0.14.0

func NewHashJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewInnerJoin

func NewInnerJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewJoin added in v0.14.0

func NewJoin(left, right sql.Node, op JoinType, cond sql.Expression) *JoinNode

func NewLeftOuterHashJoin added in v0.14.0

func NewLeftOuterHashJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewLeftOuterJoin added in v0.14.0

func NewLeftOuterJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewLeftOuterLookupJoin added in v0.14.0

func NewLeftOuterLookupJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewLookupJoin added in v0.14.0

func NewLookupJoin(left, right sql.Node, cond sql.Expression) *JoinNode

An LookupJoin is a join that uses index lookups for the secondary table.

func NewNaturalJoin

func NewNaturalJoin(left, right sql.Node) *JoinNode

NaturalJoin is a join that automatically joins by all the columns with the same name. NaturalJoin is a placeholder node, it should be transformed into an INNER JOIN during analysis.

func NewRightOuterJoin added in v0.14.0

func NewRightOuterJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func NewSemiJoin added in v0.14.0

func NewSemiJoin(left, right sql.Node, cond sql.Expression) *JoinNode

func (*JoinNode) CheckPrivileges added in v0.14.0

func (j *JoinNode) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*JoinNode) CollationCoercibility added in v0.15.0

func (*JoinNode) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*JoinNode) Comment added in v0.9.0

func (j *JoinNode) Comment() string

Comment implements sql.CommentedNode

func (*JoinNode) DebugString added in v0.14.0

func (j *JoinNode) DebugString() string

func (*JoinNode) Expressions added in v0.14.0

func (j *JoinNode) Expressions() []sql.Expression

Expressions implements sql.Expression

func (*JoinNode) JoinCond

func (j *JoinNode) JoinCond() sql.Expression

func (*JoinNode) JoinType

func (j *JoinNode) JoinType() JoinType

func (*JoinNode) Resolved added in v0.14.0

func (j *JoinNode) Resolved() bool

Resolved implements the Resolvable interface.

func (*JoinNode) Schema added in v0.14.0

func (j *JoinNode) Schema() sql.Schema

Schema implements the Node interface.

func (*JoinNode) String added in v0.14.0

func (j *JoinNode) String() string

func (*JoinNode) WithChildren added in v0.14.0

func (j *JoinNode) WithChildren(children ...sql.Node) (sql.Node, error)

func (*JoinNode) WithComment added in v0.14.0

func (j *JoinNode) WithComment(comment string) sql.Node

WithComment implements sql.CommentedNode

func (*JoinNode) WithExpressions added in v0.14.0

func (j *JoinNode) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (*JoinNode) WithScopeLen added in v0.9.0

func (j *JoinNode) WithScopeLen(i int) *JoinNode

type JoinType

type JoinType uint16
const (
	JoinTypeUnknown         JoinType = iota // UnknownJoin
	JoinTypeCross                           // CrossJoin
	JoinTypeInner                           // InnerJoin
	JoinTypeSemi                            // SemiJoin
	JoinTypeAnti                            // AntiJoin
	JoinTypeRightSemi                       // RightSemiJoin
	JoinTypeLeftOuter                       // LeftOuterJoin
	JoinTypeFullOuter                       // FullOuterJoin
	JoinTypeGroupBy                         // GroupByJoin
	JoinTypeRightOuter                      // RightJoin
	JoinTypeLookup                          // LookupJoin
	JoinTypeLeftOuterLookup                 // LeftOuterLookupJoin
	JoinTypeHash                            // HashJoin
	JoinTypeLeftOuterHash                   // LeftOuterHashJoin
	JoinTypeMerge                           // MergeJoin
	JoinTypeLeftOuterMerge                  // LeftOuterMergeJoin
	JoinTypeSemiHash                        // SemiHashJoin
	JoinTypeAntiHash                        // AntiHashJoin
	JoinTypeSemiLookup                      // SemiLookupJoin
	JoinTypeAntiLookup                      // AntiLookupJoin
	JoinTypeRightSemiLookup                 // RightSemiLookupJoin
	JoinTypeSemiMerge                       // SemiMergeJoin
	JoinTypeAntiMerge                       // AntiMergeJoin
	JoinTypeNatural                         // NaturalJoin
)

func (JoinType) AsHash added in v0.15.0

func (i JoinType) AsHash() JoinType

func (JoinType) AsLookup added in v0.15.0

func (i JoinType) AsLookup() JoinType

func (JoinType) AsMerge added in v0.15.0

func (i JoinType) AsMerge() JoinType

func (JoinType) IsAnti added in v0.15.0

func (i JoinType) IsAnti() bool

func (JoinType) IsCross added in v0.14.0

func (i JoinType) IsCross() bool

func (JoinType) IsDegenerate added in v0.14.0

func (i JoinType) IsDegenerate() bool

func (JoinType) IsFullOuter added in v0.14.0

func (i JoinType) IsFullOuter() bool

func (JoinType) IsHash added in v0.15.0

func (i JoinType) IsHash() bool

func (JoinType) IsInner added in v0.14.0

func (i JoinType) IsInner() bool

func (JoinType) IsLeftOuter added in v0.14.0

func (i JoinType) IsLeftOuter() bool

func (JoinType) IsLookup added in v0.14.0

func (i JoinType) IsLookup() bool

func (JoinType) IsMerge added in v0.15.0

func (i JoinType) IsMerge() bool

func (JoinType) IsNatural added in v0.14.0

func (i JoinType) IsNatural() bool

func (JoinType) IsPartial added in v0.14.0

func (i JoinType) IsPartial() bool

func (JoinType) IsPhysical added in v0.14.0

func (i JoinType) IsPhysical() bool

func (JoinType) IsPlaceholder added in v0.14.0

func (i JoinType) IsPlaceholder() bool

func (JoinType) IsRightOuter added in v0.14.0

func (i JoinType) IsRightOuter() bool

func (JoinType) IsRightPartial added in v0.15.0

func (i JoinType) IsRightPartial() bool

func (JoinType) IsSemi added in v0.15.0

func (i JoinType) IsSemi() bool

func (JoinType) String

func (i JoinType) String() string

type Kill added in v0.12.0

type Kill struct {
	Kt     KillType
	ConnID uint32
}

func NewKill added in v0.12.0

func NewKill(kt KillType, connID uint32) *Kill

func (*Kill) CheckPrivileges added in v0.12.0

func (k *Kill) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Kill) Children added in v0.12.0

func (k *Kill) Children() []sql.Node

func (*Kill) CollationCoercibility added in v0.15.0

func (*Kill) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Kill) Resolved added in v0.12.0

func (k *Kill) Resolved() bool

func (*Kill) Schema added in v0.12.0

func (k *Kill) Schema() sql.Schema

func (*Kill) String added in v0.12.0

func (k *Kill) String() string

func (*Kill) WithChildren added in v0.12.0

func (k *Kill) WithChildren(children ...sql.Node) (sql.Node, error)

type KillType added in v0.12.0

type KillType int
const (
	KillType_Query      KillType = 0
	KillType_Connection KillType = 1
)

func (KillType) String added in v0.12.0

func (kt KillType) String() string

type Leave added in v0.15.0

type Leave struct {
	Label string
}

Leave represents the LEAVE statement, which instructs a loop to end. Equivalent to "break" in Go.

func NewLeave added in v0.15.0

func NewLeave(label string) *Leave

NewLeave returns a new *Leave node.

func (*Leave) CheckPrivileges added in v0.15.0

func (l *Leave) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Leave) Children added in v0.15.0

func (l *Leave) Children() []sql.Node

Children implements the interface sql.Node.

func (*Leave) CollationCoercibility added in v0.15.0

func (*Leave) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Leave) Resolved added in v0.15.0

func (l *Leave) Resolved() bool

Resolved implements the interface sql.Node.

func (*Leave) Schema added in v0.15.0

func (l *Leave) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Leave) String added in v0.15.0

func (l *Leave) String() string

String implements the interface sql.Node.

func (*Leave) WithChildren added in v0.15.0

func (l *Leave) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type Limit

type Limit struct {
	UnaryNode
	Limit         sql.Expression
	CalcFoundRows bool
}

Limit is a node that only allows up to N rows to be retrieved.

func NewLimit

func NewLimit(size sql.Expression, child sql.Node) *Limit

NewLimit creates a new Limit node with the given size.

func (*Limit) CheckPrivileges added in v0.12.0

func (l *Limit) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Limit) CollationCoercibility added in v0.15.0

func (l *Limit) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Limit) DebugString

func (l Limit) DebugString() string

func (*Limit) Expressions added in v0.10.0

func (l *Limit) Expressions() []sql.Expression

Expressions implements sql.Expressioner

func (*Limit) Resolved

func (l *Limit) Resolved() bool

Resolved implements the Resolvable interface.

func (Limit) String

func (l Limit) String() string

func (Limit) WithCalcFoundRows added in v0.12.0

func (l Limit) WithCalcFoundRows(v bool) *Limit

func (*Limit) WithChildren

func (l *Limit) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (Limit) WithExpressions added in v0.10.0

func (l Limit) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements sql.Expressioner

type LoadData added in v0.9.0

type LoadData struct {
	Local                   bool
	File                    string
	Destination             sql.Node
	ColumnNames             []string
	ResponsePacketSent      bool
	Fields                  *sqlparser.Fields
	Lines                   *sqlparser.Lines
	IgnoreNum               int64
	FieldsTerminatedByDelim string
	FieldsEnclosedByDelim   string
	FieldsOptionallyDelim   bool
	FieldsEscapedByDelim    string
	LinesTerminatedByDelim  string
	LinesStartingByDelim    string
}

func NewLoadData added in v0.9.0

func NewLoadData(local bool, file string, destination sql.Node, cols []string, fields *sqlparser.Fields, lines *sqlparser.Lines, ignoreNum int64) *LoadData

func (*LoadData) CheckPrivileges added in v0.12.0

func (l *LoadData) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*LoadData) Children added in v0.9.0

func (l *LoadData) Children() []sql.Node

func (*LoadData) CollationCoercibility added in v0.15.0

func (*LoadData) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*LoadData) Resolved added in v0.9.0

func (l *LoadData) Resolved() bool

func (*LoadData) Schema added in v0.9.0

func (l *LoadData) Schema() sql.Schema

func (*LoadData) SetParsingValues added in v0.15.0

func (l *LoadData) SetParsingValues() error

SetParsingValues parses the LoadData object to get the delimiter into FIELDS and LINES terms.

func (*LoadData) SplitLines added in v0.15.0

func (l *LoadData) SplitLines(data []byte, atEOF bool) (advance int, token []byte, err error)

func (*LoadData) String added in v0.9.0

func (l *LoadData) String() string

func (*LoadData) WithChildren added in v0.9.0

func (l *LoadData) WithChildren(children ...sql.Node) (sql.Node, error)

type LockTables

type LockTables struct {
	Catalog sql.Catalog
	Locks   []*TableLock
}

LockTables will lock tables for the session in which it's executed.

func NewLockTables

func NewLockTables(locks []*TableLock) *LockTables

NewLockTables creates a new LockTables node.

func (*LockTables) CheckPrivileges added in v0.12.0

func (t *LockTables) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*LockTables) Children

func (t *LockTables) Children() []sql.Node

Children implements the sql.Node interface.

func (*LockTables) CollationCoercibility added in v0.15.0

func (*LockTables) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*LockTables) Resolved

func (t *LockTables) Resolved() bool

Resolved implements the sql.Node interface.

func (*LockTables) Schema

func (t *LockTables) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*LockTables) String

func (t *LockTables) String() string

func (*LockTables) WithChildren

func (t *LockTables) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type LookupBuilder added in v0.14.0

type LookupBuilder struct {
	// contains filtered or unexported fields
}

LookupBuilder abstracts secondary table access for an LookupJoin. A row from the primary table is first evaluated on the secondary index's expressions (columns) to produce a lookupBuilderKey. Consider the query below, assuming B has an index `xy (x,y)`:

select * from A join B on a.x = b.x AND a.y = b.y

Assume we choose A as the primary row source and B as a secondary lookup on `xy`. For every row in A, we will produce a lookupBuilderKey on B using the join condition. For the A row (x=1,y=2), the lookup key into B will be (1,2) to reflect the B-xy index access.

Then we construct a sql.RangeCollection to represent the (1,2) point lookup into B-xy. The collection will always be a single range, because a point lookup cannot be a disjoint set of ranges. The range will also have the same dimension as the index itself. If the join condition is a partial prefix on the index (ex: INDEX x (x)), the unfiltered columns are padded.

The <=> filter is a special case for two reasons. 1) It is not a point lookup, the corresponding range will either be IsNull or IsNotNull depending on whether the primary row key column is nil or not, respectfully. 2) The format of the output range is variable, while equality ranges are identical except for bound values.

Currently the analyzer constructs one of these and uses it for the IndexedTableAccess nodes below an indexed join, for example. This struct is also used to implement Expressioner on the IndexedTableAccess node.

func NewLookupBuilder added in v0.14.0

func NewLookupBuilder(index sql.Index, keyExprs []sql.Expression, matchesNullMask []bool) *LookupBuilder

func (*LookupBuilder) DebugString added in v0.14.0

func (lb *LookupBuilder) DebugString() string

func (*LookupBuilder) Expressions added in v0.14.0

func (lb *LookupBuilder) Expressions() []sql.Expression

func (*LookupBuilder) GetKey added in v0.14.0

func (lb *LookupBuilder) GetKey(ctx *sql.Context, row sql.Row) (lookupBuilderKey, error)

func (*LookupBuilder) GetKey2 added in v0.14.0

func (lb *LookupBuilder) GetKey2(ctx *sql.Context, row sql.Row2) (lookupBuilderKey, error)

func (*LookupBuilder) GetLookup added in v0.14.0

func (lb *LookupBuilder) GetLookup(key lookupBuilderKey) (sql.IndexLookup, error)

func (*LookupBuilder) GetZeroKey added in v0.14.0

func (lb *LookupBuilder) GetZeroKey() lookupBuilderKey

func (*LookupBuilder) Index added in v0.14.0

func (lb *LookupBuilder) Index() sql.Index

func (*LookupBuilder) WithExpressions added in v0.14.0

func (lb *LookupBuilder) WithExpressions(node sql.Node, exprs ...sql.Expression) (*LookupBuilder, error)

type Loop added in v0.15.0

type Loop struct {
	Label          string
	Condition      sql.Expression // We continue looping until the condition returns false
	OnceBeforeEval bool           // Whether to run through the statements first before evaluating the condition
	*Block
}

Loop represents the LOOP statement, which loops over a set of statements.

func NewLoop added in v0.15.0

func NewLoop(label string, block *Block) *Loop

NewLoop returns a new *Loop node.

func (*Loop) CheckPrivileges added in v0.15.0

func (l *Loop) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Loop) CollationCoercibility added in v0.15.0

func (l *Loop) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Loop) DebugString added in v0.15.0

func (l *Loop) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*Loop) Expressions added in v0.15.0

func (l *Loop) Expressions() []sql.Expression

Expressions implements the interface sql.Node.

func (*Loop) GetBlockLabel added in v0.15.0

func (l *Loop) GetBlockLabel(ctx *sql.Context) string

GetBlockLabel implements the interface RepresentsLabeledBlock.

func (*Loop) RepresentsLoop added in v0.15.0

func (l *Loop) RepresentsLoop() bool

RepresentsLoop implements the interface RepresentsLabeledBlock.

func (*Loop) Resolved added in v0.15.0

func (l *Loop) Resolved() bool

Resolved implements the interface sql.Node.

func (*Loop) String added in v0.15.0

func (l *Loop) String() string

String implements the interface sql.Node.

func (*Loop) WithChildren added in v0.15.0

func (l *Loop) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Loop) WithExpressions added in v0.15.0

func (l *Loop) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the interface sql.Node.

type Max1Row added in v0.15.0

type Max1Row struct {
	Child sql.Node

	Result      sql.Row
	Mu          *sync.Mutex
	EmptyResult bool
	// contains filtered or unexported fields
}

Max1Row throws a runtime error if its child (usually subquery) tries to return more than one row.

func NewMax1Row added in v0.15.0

func NewMax1Row(n sql.Node, name string) *Max1Row

func (*Max1Row) CheckPrivileges added in v0.15.0

func (m *Max1Row) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*Max1Row) Children added in v0.15.0

func (m *Max1Row) Children() []sql.Node

func (*Max1Row) CollationCoercibility added in v0.15.0

func (m *Max1Row) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Max1Row) DebugString added in v0.15.0

func (m *Max1Row) DebugString() string

func (*Max1Row) HasResults added in v0.15.0

func (m *Max1Row) HasResults() bool

HasResults returns true after a successful call to PopulateResults()

func (*Max1Row) Name added in v0.15.0

func (m *Max1Row) Name() string

func (*Max1Row) Resolved added in v0.15.0

func (m *Max1Row) Resolved() bool

func (*Max1Row) Schema added in v0.15.0

func (m *Max1Row) Schema() sql.Schema

func (*Max1Row) String added in v0.15.0

func (m *Max1Row) String() string

func (*Max1Row) WithChildren added in v0.15.0

func (m *Max1Row) WithChildren(children ...sql.Node) (sql.Node, error)

type ModifyColumn

type ModifyColumn struct {
	Table sql.Node
	// contains filtered or unexported fields
}

func NewModifyColumn

func NewModifyColumn(database sql.Database, table *UnresolvedTable, columnName string, column *sql.Column, order *sql.ColumnOrder) *ModifyColumn

func (*ModifyColumn) CheckPrivileges added in v0.12.0

func (m *ModifyColumn) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ModifyColumn) Children

func (m *ModifyColumn) Children() []sql.Node

func (*ModifyColumn) CollationCoercibility added in v0.15.0

func (*ModifyColumn) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ModifyColumn) Column

func (m *ModifyColumn) Column() string

func (*ModifyColumn) Database

func (c *ModifyColumn) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ModifyColumn) Expressions

func (m *ModifyColumn) Expressions() []sql.Expression

func (*ModifyColumn) NewColumn added in v0.9.0

func (m *ModifyColumn) NewColumn() *sql.Column

func (*ModifyColumn) Order

func (m *ModifyColumn) Order() *sql.ColumnOrder

func (*ModifyColumn) Resolved

func (m *ModifyColumn) Resolved() bool

Resolved implements the Resolvable interface.

func (*ModifyColumn) Schema

func (m *ModifyColumn) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ModifyColumn) String

func (m *ModifyColumn) String() string

func (*ModifyColumn) TargetSchema added in v0.12.0

func (m *ModifyColumn) TargetSchema() sql.Schema

func (*ModifyColumn) ValidateDefaultPosition added in v0.15.0

func (m *ModifyColumn) ValidateDefaultPosition(tblSch sql.Schema) error

func (ModifyColumn) WithChildren

func (m ModifyColumn) WithChildren(children ...sql.Node) (sql.Node, error)

func (*ModifyColumn) WithDatabase

func (m *ModifyColumn) WithDatabase(db sql.Database) (sql.Node, error)

func (ModifyColumn) WithExpressions

func (m ModifyColumn) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (ModifyColumn) WithTargetSchema added in v0.12.0

func (m ModifyColumn) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type NamedNotifyFunc

type NamedNotifyFunc func(name string)

NamedNotifyFunc is a function to notify about some event with a string argument.

type NamedWindows added in v0.12.0

type NamedWindows struct {
	UnaryNode
	WindowDefs map[string]*sql.WindowDefinition
}

NamedWindows is a list of WINDOW clause definitions to be resolved and merged into OVER clause sql.Window nodes.

func NewNamedWindows added in v0.12.0

func NewNamedWindows(windowDefs map[string]*sql.WindowDefinition, child sql.Node) *NamedWindows

func (*NamedWindows) CheckPrivileges added in v0.12.0

func (n *NamedWindows) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements sql.Node

func (*NamedWindows) CollationCoercibility added in v0.15.0

func (n *NamedWindows) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*NamedWindows) DebugString added in v0.12.0

func (n *NamedWindows) DebugString() string

DebugString implements sql.Node

func (*NamedWindows) RowIter added in v0.12.0

func (n *NamedWindows) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements sql.Node

func (*NamedWindows) String added in v0.12.0

func (n *NamedWindows) String() string

String implements sql.Node

func (*NamedWindows) WithChildren added in v0.12.0

func (n *NamedWindows) WithChildren(nodes ...sql.Node) (sql.Node, error)

WithChildren implements sql.Node

type NoopTriggerRollback added in v0.15.0

type NoopTriggerRollback struct {
	UnaryNode
}

func NewNoopTriggerRollback added in v0.15.0

func NewNoopTriggerRollback(child sql.Node) *NoopTriggerRollback

func (*NoopTriggerRollback) CheckPrivileges added in v0.15.0

func (t *NoopTriggerRollback) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*NoopTriggerRollback) CollationCoercibility added in v0.15.0

func (t *NoopTriggerRollback) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*NoopTriggerRollback) DebugString added in v0.15.0

func (t *NoopTriggerRollback) DebugString() string

func (*NoopTriggerRollback) String added in v0.15.0

func (t *NoopTriggerRollback) String() string

func (*NoopTriggerRollback) WithChildren added in v0.15.0

func (t *NoopTriggerRollback) WithChildren(children ...sql.Node) (sql.Node, error)

type Nothing

type Nothing struct{}
var NothingImpl Nothing

NothingImpl is a node that will return no rows.

func (Nothing) CheckPrivileges added in v0.15.0

func (Nothing) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (Nothing) Children added in v0.15.0

func (Nothing) Children() []sql.Node

func (Nothing) CollationCoercibility added in v0.15.0

func (Nothing) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Nothing) Resolved added in v0.15.0

func (Nothing) Resolved() bool

func (Nothing) RowIter added in v0.15.0

func (Nothing) RowIter(*sql.Context, sql.Row) (sql.RowIter, error)

func (Nothing) Schema added in v0.15.0

func (Nothing) Schema() sql.Schema

func (Nothing) String added in v0.15.0

func (Nothing) String() string

func (Nothing) WithChildren added in v0.15.0

func (n Nothing) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type NotifyFunc

type NotifyFunc func()

NotifyFunc is a function to notify about some event.

type ObjectType added in v0.12.0

type ObjectType byte

ObjectType represents the object type that the GRANT or REVOKE statement will apply to.

const (
	ObjectType_Any ObjectType = iota
	ObjectType_Table
	ObjectType_Function
	ObjectType_Procedure
)

type Offset

type Offset struct {
	UnaryNode
	Offset sql.Expression
}

Offset is a node that skips the first N rows.

func NewOffset

func NewOffset(n sql.Expression, child sql.Node) *Offset

NewOffset creates a new Offset node.

func (*Offset) CheckPrivileges added in v0.12.0

func (o *Offset) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Offset) CollationCoercibility added in v0.15.0

func (o *Offset) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Offset) Expressions added in v0.10.0

func (o *Offset) Expressions() []sql.Expression

Expressions implements sql.Expressioner

func (*Offset) Resolved

func (o *Offset) Resolved() bool

Resolved implements the Resolvable interface.

func (Offset) String

func (o Offset) String() string

func (*Offset) WithChildren

func (o *Offset) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Offset) WithExpressions added in v0.10.0

func (o *Offset) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements sql.Expressioner

type OnScheduleTimestamp added in v0.15.0

type OnScheduleTimestamp struct {
	// contains filtered or unexported fields
}

OnScheduleTimestamp is object used for EVENT ON SCHEDULE { AT / STARTS / ENDS } optional fields only.

func NewOnScheduleTimestamp added in v0.15.0

func NewOnScheduleTimestamp(ts sql.Expression, i []sql.Expression) *OnScheduleTimestamp

NewOnScheduleTimestamp creates OnScheduleTimestamp object used for EVENT ON SCHEDULE { AT / STARTS / ENDS } optional fields only.

func (*OnScheduleTimestamp) Children added in v0.15.0

func (ost *OnScheduleTimestamp) Children() []sql.Expression

func (*OnScheduleTimestamp) Eval added in v0.15.0

func (ost *OnScheduleTimestamp) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

func (*OnScheduleTimestamp) EvalTime added in v0.15.0

func (ost *OnScheduleTimestamp) EvalTime(ctx *sql.Context) (time.Time, error)

EvalTime returns time.Time value converted to UTC evaluating given expressions as expected to be time value and optional interval values. The value returned is time.Time value from timestamp value plus all intervals given.

func (*OnScheduleTimestamp) IsNullable added in v0.15.0

func (ost *OnScheduleTimestamp) IsNullable() bool

func (*OnScheduleTimestamp) Resolved added in v0.15.0

func (ost *OnScheduleTimestamp) Resolved() bool

Resolved implements the sql.Node interface.

func (*OnScheduleTimestamp) String added in v0.15.0

func (ost *OnScheduleTimestamp) String() string

String implements the sql.Node interface.

func (*OnScheduleTimestamp) Type added in v0.15.0

func (ost *OnScheduleTimestamp) Type() sql.Type

func (*OnScheduleTimestamp) WithChildren added in v0.15.0

func (ost *OnScheduleTimestamp) WithChildren(children ...sql.Expression) (sql.Expression, error)

type Open added in v0.15.0

type Open struct {
	Name string
	Pref *expression.ProcedureReference
}

Open represents the OPEN statement, which opens a cursor.

func NewOpen added in v0.15.0

func NewOpen(name string) *Open

NewOpen returns a new *Open node.

func (*Open) CheckPrivileges added in v0.15.0

func (o *Open) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Open) Children added in v0.15.0

func (o *Open) Children() []sql.Node

Children implements the interface sql.Node.

func (*Open) CollationCoercibility added in v0.15.0

func (*Open) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Open) Resolved added in v0.15.0

func (o *Open) Resolved() bool

Resolved implements the interface sql.Node.

func (*Open) Schema added in v0.15.0

func (o *Open) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Open) String added in v0.15.0

func (o *Open) String() string

String implements the interface sql.Node.

func (*Open) WithChildren added in v0.15.0

func (o *Open) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Open) WithParamReference added in v0.15.0

func (o *Open) WithParamReference(pRef *expression.ProcedureReference) sql.Node

WithParamReference implements the interface expression.ProcedureReferencable.

type OrderedDistinct

type OrderedDistinct struct {
	UnaryNode
}

OrderedDistinct is a Distinct node optimized for sorted row sets. It's 2 orders of magnitude faster and uses 2 orders of magnitude less memory.

func NewOrderedDistinct

func NewOrderedDistinct(child sql.Node) *OrderedDistinct

NewOrderedDistinct creates a new OrderedDistinct node.

func (*OrderedDistinct) CheckPrivileges added in v0.12.0

func (d *OrderedDistinct) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*OrderedDistinct) CollationCoercibility added in v0.15.0

func (d *OrderedDistinct) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (OrderedDistinct) DebugString added in v0.15.0

func (d OrderedDistinct) DebugString() string

func (*OrderedDistinct) Resolved

func (d *OrderedDistinct) Resolved() bool

Resolved implements the Resolvable interface.

func (OrderedDistinct) String

func (d OrderedDistinct) String() string

func (*OrderedDistinct) WithChildren

func (d *OrderedDistinct) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type PKAction added in v0.11.0

type PKAction byte
const (
	PrimaryKeyAction_Create PKAction = iota
	PrimaryKeyAction_Drop
)

type PasswordOptions added in v0.12.0

type PasswordOptions struct {
	RequireCurrentOptional bool

	ExpirationTime *int64
	History        *int64
	ReuseInterval  *int64
	FailedAttempts *int64
	LockTime       *int64
}

PasswordOptions states how to handle a user's passwords.

type PrepareInfo added in v0.15.0

type PrepareInfo struct {
}

PrepareInfo is the Info for OKResults returned by Update nodes.

func (PrepareInfo) String added in v0.15.0

func (pi PrepareInfo) String() string

String implements fmt.Stringer

type PrepareQuery added in v0.15.0

type PrepareQuery struct {
	Name  string
	Child sql.Node
}

PrepareQuery is a node that prepares the query

func NewPrepareQuery added in v0.15.0

func NewPrepareQuery(name string, child sql.Node) *PrepareQuery

NewPrepareQuery creates a new PrepareQuery node.

func (*PrepareQuery) CheckPrivileges added in v0.15.0

func (p *PrepareQuery) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*PrepareQuery) Children added in v0.15.0

func (p *PrepareQuery) Children() []sql.Node

Children implements the Node interface.

func (*PrepareQuery) CollationCoercibility added in v0.15.0

func (*PrepareQuery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PrepareQuery) Resolved added in v0.15.0

func (p *PrepareQuery) Resolved() bool

func (*PrepareQuery) RowIter added in v0.15.0

func (p *PrepareQuery) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the Node interface.

func (*PrepareQuery) Schema added in v0.15.0

func (p *PrepareQuery) Schema() sql.Schema

Schema implements the Node interface.

func (*PrepareQuery) String added in v0.15.0

func (p *PrepareQuery) String() string

func (*PrepareQuery) WithChildren added in v0.15.0

func (p *PrepareQuery) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type PrependNode added in v0.15.0

type PrependNode struct {
	UnaryNode
	Row sql.Row
}

PrependNode wraps its child by prepending column values onto any result rows

func (*PrependNode) CheckPrivileges added in v0.15.0

func (p *PrependNode) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*PrependNode) CollationCoercibility added in v0.15.0

func (p *PrependNode) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*PrependNode) DebugString added in v0.15.0

func (p *PrependNode) DebugString() string

func (*PrependNode) String added in v0.15.0

func (p *PrependNode) String() string

func (*PrependNode) WithChildren added in v0.15.0

func (p *PrependNode) WithChildren(children ...sql.Node) (sql.Node, error)

type Privilege added in v0.12.0

type Privilege struct {
	Type    PrivilegeType
	Columns []string
	Dynamic string // PrivilegeType_Dynamic will set this string to the correct lowercased value
}

Privilege specifies a privilege to be used in a GRANT or REVOKE statement.

func (*Privilege) IsValidDynamic added in v0.15.0

func (p *Privilege) IsValidDynamic() bool

IsValidDynamic returns whether the given dynamic privilege is valid. If the privilege is NOT dynamic, or the dynamic privilege is not supported, then this returns false.

func (*Privilege) String added in v0.12.0

func (p *Privilege) String() string

String returns the Privilege as a formatted string.

type PrivilegeLevel added in v0.12.0

type PrivilegeLevel struct {
	Database     string
	TableRoutine string
}

PrivilegeLevel defines the level that a privilege applies to.

func (*PrivilegeLevel) String added in v0.12.0

func (p *PrivilegeLevel) String() string

String returns the PrivilegeLevel as a formatted string.

type PrivilegeType added in v0.12.0

type PrivilegeType byte

PrivilegeType is the type of privilege that is being granted or revoked.

const (
	PrivilegeType_All PrivilegeType = iota
	PrivilegeType_Alter
	PrivilegeType_AlterRoutine
	PrivilegeType_Create
	PrivilegeType_CreateRole
	PrivilegeType_CreateRoutine
	PrivilegeType_CreateTablespace
	PrivilegeType_CreateTemporaryTables
	PrivilegeType_CreateUser
	PrivilegeType_CreateView
	PrivilegeType_Delete
	PrivilegeType_Drop
	PrivilegeType_DropRole
	PrivilegeType_Event
	PrivilegeType_Execute
	PrivilegeType_File
	PrivilegeType_GrantOption
	PrivilegeType_Index
	PrivilegeType_Insert
	PrivilegeType_LockTables
	PrivilegeType_Process
	PrivilegeType_References
	PrivilegeType_Reload
	PrivilegeType_ReplicationClient
	PrivilegeType_ReplicationSlave
	PrivilegeType_Select
	PrivilegeType_ShowDatabases
	PrivilegeType_ShowView
	PrivilegeType_Shutdown
	PrivilegeType_Super
	PrivilegeType_Trigger
	PrivilegeType_Update
	PrivilegeType_Usage
	PrivilegeType_Dynamic
)

type Procedure added in v0.9.0

type Procedure struct {
	Name                  string
	Definer               string
	Params                []ProcedureParam
	SecurityContext       ProcedureSecurityContext
	Comment               string
	Characteristics       []Characteristic
	CreateProcedureString string
	Body                  sql.Node
	CreatedAt             time.Time
	ModifiedAt            time.Time
	ValidationError       error
}

Procedure is a stored procedure that may be executed using the CALL statement.

func NewProcedure added in v0.9.0

func NewProcedure(
	name string,
	definer string,
	params []ProcedureParam,
	securityContext ProcedureSecurityContext,
	comment string,
	characteristics []Characteristic,
	createProcedureString string,
	body sql.Node,
	createdAt time.Time,
	modifiedAt time.Time,
) *Procedure

NewProcedure returns a *Procedure. All names contained within are lowercase, and all methods are case-insensitive.

func (*Procedure) CheckPrivileges added in v0.12.0

func (p *Procedure) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Procedure) Children added in v0.9.0

func (p *Procedure) Children() []sql.Node

Children implements the sql.Node interface.

func (*Procedure) CollationCoercibility added in v0.15.0

func (p *Procedure) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Procedure) DebugString added in v0.9.0

func (p *Procedure) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*Procedure) ExtendVariadic added in v0.12.0

func (p *Procedure) ExtendVariadic(ctx *sql.Context, length int) *Procedure

ExtendVariadic returns a new procedure that has the variadic parameter extended to match the CALL's parameter count.

func (*Procedure) HasVariadicParameter added in v0.12.0

func (p *Procedure) HasVariadicParameter() bool

HasVariadicParameter returns if the last parameter is variadic.

func (*Procedure) IsExternal added in v0.12.0

func (p *Procedure) IsExternal() bool

IsExternal returns whether the stored procedure is external.

func (*Procedure) Resolved added in v0.9.0

func (p *Procedure) Resolved() bool

Resolved implements the sql.Node interface.

func (*Procedure) Schema added in v0.9.0

func (p *Procedure) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Procedure) String added in v0.9.0

func (p *Procedure) String() string

String implements the sql.Node interface.

func (*Procedure) WithChildren added in v0.9.0

func (p *Procedure) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type ProcedureParam added in v0.9.0

type ProcedureParam struct {
	Direction ProcedureParamDirection // Direction is the direction of the parameter.
	Name      string                  // Name is the name of the parameter.
	Type      sql.Type                // Type is the SQL type of the parameter.
	Variadic  bool                    // Variadic states whether the parameter is variadic.
}

ProcedureParam represents the parameter of a stored procedure.

func (ProcedureParam) String added in v0.9.0

func (pp ProcedureParam) String() string

String returns the original SQL representation.

type ProcedureParamDirection added in v0.9.0

type ProcedureParamDirection byte

ProcedureParamDirection represents the use case of the stored procedure parameter.

const (
	// ProcedureParamDirection_In means the parameter passes its contained value to the stored procedure.
	ProcedureParamDirection_In ProcedureParamDirection = iota
	// ProcedureParamDirection_Inout means the parameter passes its contained value to the stored procedure, while also
	// modifying the given variable.
	ProcedureParamDirection_Inout
	// ProcedureParamDirection_Out means the parameter variable will be modified, but will not be read from within the
	// stored procedure.
	ProcedureParamDirection_Out
)

type ProcedureResolvedTable added in v0.9.0

type ProcedureResolvedTable struct {
	ResolvedTable *ResolvedTable
}

ProcedureResolvedTable represents a resolved SQL Table inside of a stored procedure. These are initially resolved to verify that they exist, and are then reloaded when another statement accesses its data. Some integrators return a snapshot of a table during the analysis step as an internal optimization, which is incompatible with stored procedures as they require the latest data at each statement.

func NewProcedureResolvedTable added in v0.9.0

func NewProcedureResolvedTable(rt *ResolvedTable) *ProcedureResolvedTable

NewProcedureResolvedTable returns a *ProcedureResolvedTable.

func (*ProcedureResolvedTable) CheckPrivileges added in v0.12.0

func (t *ProcedureResolvedTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ProcedureResolvedTable) Children added in v0.9.0

func (t *ProcedureResolvedTable) Children() []sql.Node

Children implements the sql.Node interface.

func (*ProcedureResolvedTable) Collation added in v0.14.0

func (t *ProcedureResolvedTable) Collation() sql.CollationID

Collation implements the sql.Table interface.

func (*ProcedureResolvedTable) CollationCoercibility added in v0.15.0

func (t *ProcedureResolvedTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ProcedureResolvedTable) DebugString added in v0.9.0

func (t *ProcedureResolvedTable) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*ProcedureResolvedTable) Name added in v0.9.0

func (t *ProcedureResolvedTable) Name() string

Name implements the sql.Table interface.

func (*ProcedureResolvedTable) NewestTable added in v0.15.0

func (t *ProcedureResolvedTable) NewestTable(ctx *sql.Context) (*ResolvedTable, error)

NewestTable fetches the newest copy of the contained table from the database.

func (*ProcedureResolvedTable) PartitionRows added in v0.9.0

func (t *ProcedureResolvedTable) PartitionRows(ctx *sql.Context, partition sql.Partition) (sql.RowIter, error)

PartitionRows implements the sql.Table interface.

func (*ProcedureResolvedTable) Partitions added in v0.9.0

func (t *ProcedureResolvedTable) Partitions(ctx *sql.Context) (sql.PartitionIter, error)

Partitions implements the sql.Table interface.

func (*ProcedureResolvedTable) Resolved added in v0.9.0

func (t *ProcedureResolvedTable) Resolved() bool

Resolved implements the sql.Node interface.

func (*ProcedureResolvedTable) Schema added in v0.9.0

func (t *ProcedureResolvedTable) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ProcedureResolvedTable) String added in v0.9.0

func (t *ProcedureResolvedTable) String() string

String implements the sql.Node interface.

func (*ProcedureResolvedTable) Underlying added in v0.9.0

func (t *ProcedureResolvedTable) Underlying() sql.Table

Underlying implements the sql.TableWrapper interface.

func (*ProcedureResolvedTable) WithChildren added in v0.9.0

func (t *ProcedureResolvedTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type ProcedureSecurityContext added in v0.9.0

type ProcedureSecurityContext byte

ProcedureSecurityContext determines whether the stored procedure is executed using the privileges of the definer or the invoker.

const (
	// ProcedureSecurityContext_Definer uses the definer's security context.
	ProcedureSecurityContext_Definer ProcedureSecurityContext = iota
	// ProcedureSecurityContext_Invoker uses the invoker's security context.
	ProcedureSecurityContext_Invoker
)

func (ProcedureSecurityContext) String added in v0.9.0

func (pst ProcedureSecurityContext) String() string

String returns the original SQL representation.

type ProcessIndexableTable

type ProcessIndexableTable struct {
	sql.DriverIndexableTable
	OnPartitionDone  NamedNotifyFunc
	OnPartitionStart NamedNotifyFunc
	OnRowNext        NamedNotifyFunc
}

ProcessIndexableTable is a wrapper for sql.Tables inside a query process that support indexing. It notifies the process manager about the status of a query when a partition is processed.

func NewProcessIndexableTable

func NewProcessIndexableTable(t sql.DriverIndexableTable, onPartitionDone, onPartitionStart, OnRowNext NamedNotifyFunc) *ProcessIndexableTable

NewProcessIndexableTable returns a new ProcessIndexableTable.

func (*ProcessIndexableTable) DebugString added in v0.9.0

func (t *ProcessIndexableTable) DebugString() string

func (*ProcessIndexableTable) IndexKeyValues

func (t *ProcessIndexableTable) IndexKeyValues(
	ctx *sql.Context,
	columns []string,
) (sql.PartitionIndexKeyValueIter, error)

IndexKeyValues implements the sql.IndexableTable interface.

func (*ProcessIndexableTable) PartitionRows

func (t *ProcessIndexableTable) PartitionRows(ctx *sql.Context, p sql.Partition) (sql.RowIter, error)

PartitionRows implements the sql.Table interface.

func (*ProcessIndexableTable) Underlying

func (t *ProcessIndexableTable) Underlying() sql.Table

Underlying implements sql.TableWrapper interface.

type ProcessTable

type ProcessTable struct {
	sql.Table
	OnPartitionDone  NamedNotifyFunc
	OnPartitionStart NamedNotifyFunc
	OnRowNext        NamedNotifyFunc
}

ProcessTable is a wrapper for sql.Tables inside a query process. It notifies the process manager about the status of a query when a partition is processed.

func NewProcessTable

func NewProcessTable(t sql.Table, onPartitionDone, onPartitionStart, OnRowNext NamedNotifyFunc) *ProcessTable

NewProcessTable returns a new ProcessTable.

func (*ProcessTable) PartitionRows

func (t *ProcessTable) PartitionRows(ctx *sql.Context, p sql.Partition) (sql.RowIter, error)

PartitionRows implements the sql.Table interface.

func (*ProcessTable) Underlying

func (t *ProcessTable) Underlying() sql.Table

Underlying implements sql.TableWrapper interface.

type Project

type Project struct {
	UnaryNode
	// Expression projected.
	Projections []sql.Expression
}

Project is a projection of certain expression from the children node.

func NewProject

func NewProject(expressions []sql.Expression, child sql.Node) *Project

NewProject creates a new projection.

func (*Project) CheckPrivileges added in v0.12.0

func (p *Project) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Project) CollationCoercibility added in v0.15.0

func (p *Project) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Project) DebugString

func (p *Project) DebugString() string

func (*Project) Expressions

func (p *Project) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*Project) ProjectedExprs added in v0.14.0

func (p *Project) ProjectedExprs() []sql.Expression

ProjectedExprs implements sql.Projector

func (*Project) Resolved

func (p *Project) Resolved() bool

Resolved implements the Resolvable interface.

func (*Project) Schema

func (p *Project) Schema() sql.Schema

Schema implements the Node interface.

func (*Project) String

func (p *Project) String() string

func (*Project) WithChildren

func (p *Project) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Project) WithExpressions

func (p *Project) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

func (*Project) WithProjectedExprs added in v0.14.0

func (p *Project) WithProjectedExprs(exprs ...sql.Expression) (sql.Projector, error)

WithProjectedExprs implements sql.Projector

type QueryProcess

type QueryProcess struct {
	UnaryNode
	Notify NotifyFunc
}

QueryProcess represents a running query process node. It will use a callback to notify when it has finished running. TODO: QueryProcess -> trackedRowIter is required to dispose certain iter caches. Make a proper scheduler interface to perform lifecycle management, caching, and scan attaching

func NewQueryProcess

func NewQueryProcess(node sql.Node, notify NotifyFunc) *QueryProcess

NewQueryProcess creates a new QueryProcess node.

func (*QueryProcess) CheckPrivileges added in v0.12.0

func (p *QueryProcess) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*QueryProcess) Child added in v0.12.0

func (p *QueryProcess) Child() sql.Node

func (*QueryProcess) CollationCoercibility added in v0.15.0

func (p *QueryProcess) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*QueryProcess) DebugString

func (p *QueryProcess) DebugString() string

func (*QueryProcess) ShouldSetFoundRows added in v0.15.0

func (p *QueryProcess) ShouldSetFoundRows() bool

ShouldSetFoundRows returns whether the query process should set the FOUND_ROWS query variable. It should do this for any select except a Limit with a SQL_CALC_FOUND_ROWS modifier, which is handled in the Limit node itself.

func (*QueryProcess) String

func (p *QueryProcess) String() string

func (*QueryProcess) WithChildren

func (p *QueryProcess) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type RangeCurrentRowToCurrentRowFrame added in v0.12.0

type RangeCurrentRowToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRangeCurrentRowToCurrentRowFrame added in v0.12.0

func NewRangeCurrentRowToCurrentRowFrame() *RangeCurrentRowToCurrentRowFrame

func (*RangeCurrentRowToCurrentRowFrame) DebugString added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) DebugString() string

func (*RangeCurrentRowToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) EndCurrentRow() bool

func (*RangeCurrentRowToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RangeCurrentRowToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RangeCurrentRowToCurrentRowFrame) NewFramer added in v0.12.0

func (*RangeCurrentRowToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) StartCurrentRow() bool

func (*RangeCurrentRowToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RangeCurrentRowToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RangeCurrentRowToCurrentRowFrame) String added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) String() string

func (*RangeCurrentRowToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) UnboundedFollowing() bool

func (*RangeCurrentRowToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RangeCurrentRowToCurrentRowFrame) UnboundedPreceding() bool

type RangeCurrentRowToNFollowingFrame added in v0.12.0

type RangeCurrentRowToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeCurrentRowToNFollowingFrame added in v0.12.0

func NewRangeCurrentRowToNFollowingFrame(endNFollowing sql.Expression) *RangeCurrentRowToNFollowingFrame

func (*RangeCurrentRowToNFollowingFrame) DebugString added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) DebugString() string

func (*RangeCurrentRowToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) EndCurrentRow() bool

func (*RangeCurrentRowToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) EndNFollowing() sql.Expression

func (*RangeCurrentRowToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) EndNPreceding() sql.Expression

func (*RangeCurrentRowToNFollowingFrame) NewFramer added in v0.12.0

func (*RangeCurrentRowToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) StartCurrentRow() bool

func (*RangeCurrentRowToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) StartNFollowing() sql.Expression

func (*RangeCurrentRowToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) StartNPreceding() sql.Expression

func (*RangeCurrentRowToNFollowingFrame) String added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) String() string

func (*RangeCurrentRowToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) UnboundedFollowing() bool

func (*RangeCurrentRowToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeCurrentRowToNFollowingFrame) UnboundedPreceding() bool

type RangeCurrentRowToNPrecedingFrame added in v0.12.0

type RangeCurrentRowToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeCurrentRowToNPrecedingFrame added in v0.12.0

func NewRangeCurrentRowToNPrecedingFrame(endNPreceding sql.Expression) *RangeCurrentRowToNPrecedingFrame

func (*RangeCurrentRowToNPrecedingFrame) DebugString added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) DebugString() string

func (*RangeCurrentRowToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) EndCurrentRow() bool

func (*RangeCurrentRowToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RangeCurrentRowToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RangeCurrentRowToNPrecedingFrame) NewFramer added in v0.12.0

func (*RangeCurrentRowToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) StartCurrentRow() bool

func (*RangeCurrentRowToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RangeCurrentRowToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RangeCurrentRowToNPrecedingFrame) String added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) String() string

func (*RangeCurrentRowToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) UnboundedFollowing() bool

func (*RangeCurrentRowToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeCurrentRowToNPrecedingFrame) UnboundedPreceding() bool

type RangeCurrentRowToUnboundedFollowingFrame added in v0.12.0

type RangeCurrentRowToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeCurrentRowToUnboundedFollowingFrame added in v0.12.0

func NewRangeCurrentRowToUnboundedFollowingFrame() *RangeCurrentRowToUnboundedFollowingFrame

func (*RangeCurrentRowToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFrame) DebugString() string

func (*RangeCurrentRowToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RangeCurrentRowToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RangeCurrentRowToUnboundedFollowingFrame) String added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFrame) String() string

func (*RangeCurrentRowToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RangeCurrentRowToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeCurrentRowToUnboundedFollowingFrame) UnboundedPreceding() bool

type RangeNFollowingToCurrentRowFrame added in v0.12.0

type RangeNFollowingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNFollowingToCurrentRowFrame added in v0.12.0

func NewRangeNFollowingToCurrentRowFrame(startNFollowing sql.Expression) *RangeNFollowingToCurrentRowFrame

func (*RangeNFollowingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) DebugString() string

func (*RangeNFollowingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) EndCurrentRow() bool

func (*RangeNFollowingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RangeNFollowingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RangeNFollowingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RangeNFollowingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) StartCurrentRow() bool

func (*RangeNFollowingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RangeNFollowingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RangeNFollowingToCurrentRowFrame) String added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) String() string

func (*RangeNFollowingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) UnboundedFollowing() bool

func (*RangeNFollowingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNFollowingToCurrentRowFrame) UnboundedPreceding() bool

type RangeNFollowingToNFollowingFrame added in v0.12.0

type RangeNFollowingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNFollowingToNFollowingFrame added in v0.12.0

func NewRangeNFollowingToNFollowingFrame(startNFollowing sql.Expression, endNFollowing sql.Expression) *RangeNFollowingToNFollowingFrame

func (*RangeNFollowingToNFollowingFrame) DebugString added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) DebugString() string

func (*RangeNFollowingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) EndCurrentRow() bool

func (*RangeNFollowingToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) EndNFollowing() sql.Expression

func (*RangeNFollowingToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) EndNPreceding() sql.Expression

func (*RangeNFollowingToNFollowingFrame) NewFramer added in v0.12.0

func (*RangeNFollowingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) StartCurrentRow() bool

func (*RangeNFollowingToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) StartNFollowing() sql.Expression

func (*RangeNFollowingToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) StartNPreceding() sql.Expression

func (*RangeNFollowingToNFollowingFrame) String added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) String() string

func (*RangeNFollowingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) UnboundedFollowing() bool

func (*RangeNFollowingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNFollowingToNFollowingFrame) UnboundedPreceding() bool

type RangeNFollowingToNPrecedingFrame added in v0.12.0

type RangeNFollowingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNFollowingToNPrecedingFrame added in v0.12.0

func NewRangeNFollowingToNPrecedingFrame(startNFollowing sql.Expression, endNPreceding sql.Expression) *RangeNFollowingToNPrecedingFrame

func (*RangeNFollowingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) DebugString() string

func (*RangeNFollowingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) EndCurrentRow() bool

func (*RangeNFollowingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RangeNFollowingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RangeNFollowingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RangeNFollowingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) StartCurrentRow() bool

func (*RangeNFollowingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RangeNFollowingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RangeNFollowingToNPrecedingFrame) String added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) String() string

func (*RangeNFollowingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) UnboundedFollowing() bool

func (*RangeNFollowingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNFollowingToNPrecedingFrame) UnboundedPreceding() bool

type RangeNFollowingToUnboundedFollowingFrame added in v0.12.0

type RangeNFollowingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNFollowingToUnboundedFollowingFrame added in v0.12.0

func NewRangeNFollowingToUnboundedFollowingFrame(startNFollowing sql.Expression) *RangeNFollowingToUnboundedFollowingFrame

func (*RangeNFollowingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFrame) DebugString() string

func (*RangeNFollowingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RangeNFollowingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RangeNFollowingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFrame) String() string

func (*RangeNFollowingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RangeNFollowingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNFollowingToUnboundedFollowingFrame) UnboundedPreceding() bool

type RangeNPrecedingToCurrentRowFrame added in v0.12.0

type RangeNPrecedingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNPrecedingToCurrentRowFrame added in v0.12.0

func NewRangeNPrecedingToCurrentRowFrame(startNPreceding sql.Expression) *RangeNPrecedingToCurrentRowFrame

func (*RangeNPrecedingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) DebugString() string

func (*RangeNPrecedingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) EndCurrentRow() bool

func (*RangeNPrecedingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RangeNPrecedingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RangeNPrecedingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RangeNPrecedingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) StartCurrentRow() bool

func (*RangeNPrecedingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RangeNPrecedingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RangeNPrecedingToCurrentRowFrame) String added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) String() string

func (*RangeNPrecedingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) UnboundedFollowing() bool

func (*RangeNPrecedingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNPrecedingToCurrentRowFrame) UnboundedPreceding() bool

type RangeNPrecedingToNFollowingFrame added in v0.12.0

type RangeNPrecedingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNPrecedingToNFollowingFrame added in v0.12.0

func NewRangeNPrecedingToNFollowingFrame(startNPreceding sql.Expression, endNFollowing sql.Expression) *RangeNPrecedingToNFollowingFrame

func (*RangeNPrecedingToNFollowingFrame) DebugString added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) DebugString() string

func (*RangeNPrecedingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) EndCurrentRow() bool

func (*RangeNPrecedingToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) EndNFollowing() sql.Expression

func (*RangeNPrecedingToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) EndNPreceding() sql.Expression

func (*RangeNPrecedingToNFollowingFrame) NewFramer added in v0.12.0

func (*RangeNPrecedingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) StartCurrentRow() bool

func (*RangeNPrecedingToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) StartNFollowing() sql.Expression

func (*RangeNPrecedingToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) StartNPreceding() sql.Expression

func (*RangeNPrecedingToNFollowingFrame) String added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) String() string

func (*RangeNPrecedingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) UnboundedFollowing() bool

func (*RangeNPrecedingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNPrecedingToNFollowingFrame) UnboundedPreceding() bool

type RangeNPrecedingToNPrecedingFrame added in v0.12.0

type RangeNPrecedingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNPrecedingToNPrecedingFrame added in v0.12.0

func NewRangeNPrecedingToNPrecedingFrame(startNPreceding sql.Expression, endNPreceding sql.Expression) *RangeNPrecedingToNPrecedingFrame

func (*RangeNPrecedingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) DebugString() string

func (*RangeNPrecedingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) EndCurrentRow() bool

func (*RangeNPrecedingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RangeNPrecedingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RangeNPrecedingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RangeNPrecedingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) StartCurrentRow() bool

func (*RangeNPrecedingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RangeNPrecedingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RangeNPrecedingToNPrecedingFrame) String added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) String() string

func (*RangeNPrecedingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) UnboundedFollowing() bool

func (*RangeNPrecedingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNPrecedingToNPrecedingFrame) UnboundedPreceding() bool

type RangeNPrecedingToUnboundedFollowingFrame added in v0.12.0

type RangeNPrecedingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeNPrecedingToUnboundedFollowingFrame added in v0.12.0

func NewRangeNPrecedingToUnboundedFollowingFrame(startNPreceding sql.Expression) *RangeNPrecedingToUnboundedFollowingFrame

func (*RangeNPrecedingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFrame) DebugString() string

func (*RangeNPrecedingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RangeNPrecedingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RangeNPrecedingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFrame) String() string

func (*RangeNPrecedingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RangeNPrecedingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeNPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool

type RangeUnboundedPrecedingToCurrentRowFrame added in v0.12.0

type RangeUnboundedPrecedingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRangeUnboundedPrecedingToCurrentRowFrame added in v0.12.0

func NewRangeUnboundedPrecedingToCurrentRowFrame() *RangeUnboundedPrecedingToCurrentRowFrame

func (*RangeUnboundedPrecedingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFrame) DebugString() string

func (*RangeUnboundedPrecedingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFrame) StartCurrentRow() bool

func (*RangeUnboundedPrecedingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToCurrentRowFrame) String added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFrame) String() string

func (*RangeUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing() bool

func (*RangeUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RangeUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding() bool

type RangeUnboundedPrecedingToNFollowingFrame added in v0.12.0

type RangeUnboundedPrecedingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeUnboundedPrecedingToNFollowingFrame added in v0.12.0

func NewRangeUnboundedPrecedingToNFollowingFrame(endNFollowing sql.Expression) *RangeUnboundedPrecedingToNFollowingFrame

func (*RangeUnboundedPrecedingToNFollowingFrame) DebugString added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFrame) DebugString() string

func (*RangeUnboundedPrecedingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) EndNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) EndNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) NewFramer added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFrame) StartCurrentRow() bool

func (*RangeUnboundedPrecedingToNFollowingFrame) StartNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) StartNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToNFollowingFrame) String added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFrame) String() string

func (*RangeUnboundedPrecedingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFrame) UnboundedFollowing() bool

func (*RangeUnboundedPrecedingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeUnboundedPrecedingToNFollowingFrame) UnboundedPreceding() bool

type RangeUnboundedPrecedingToNPrecedingFrame added in v0.12.0

type RangeUnboundedPrecedingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeUnboundedPrecedingToNPrecedingFrame added in v0.12.0

func NewRangeUnboundedPrecedingToNPrecedingFrame(endNPreceding sql.Expression) *RangeUnboundedPrecedingToNPrecedingFrame

func (*RangeUnboundedPrecedingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFrame) DebugString() string

func (*RangeUnboundedPrecedingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFrame) StartCurrentRow() bool

func (*RangeUnboundedPrecedingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToNPrecedingFrame) String added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFrame) String() string

func (*RangeUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing() bool

func (*RangeUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RangeUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding() bool

type RangeUnboundedPrecedingToUnboundedFollowingFrame added in v0.12.0

type RangeUnboundedPrecedingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRangeUnboundedPrecedingToUnboundedFollowingFrame added in v0.12.0

func NewRangeUnboundedPrecedingToUnboundedFollowingFrame() *RangeUnboundedPrecedingToUnboundedFollowingFrame

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) DebugString() string

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RangeUnboundedPrecedingToUnboundedFollowingFrame) String() string

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (*RangeUnboundedPrecedingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

type RecursiveCte added in v0.12.0

type RecursiveCte struct {

	// Columns used to name lazily-loaded schema fields
	Columns []string

	// Working is a handle to our refreshable intermediate table
	Working *RecursiveTable
	// contains filtered or unexported fields
}

RecursiveCte is defined by two subqueries connected with a union:

ex => WITH RECURSIVE [name]([Columns]) as ([Init] UNION [Rec]) ...

[Init] is a non-recursive select statement, and [Rec] selects from the recursive relation [name] until exhaustion. Note that if [Rec] is not recursive, the optimizer will fold the RecursiveCte into a SubqueryAlias.

The node is executed as follows:

  1. First, iterate the [Init] subquery.
  2. Collect the outputs of [Init] in a [temporary] buffer.
  3. When the iterator is exhausted, populate the recursive [working] table with the [temporary] buffer.
  4. Iterate [Rec], collecting outputs in the [temporary] buffer.
  5. Repeat steps (3) and (4) until [temporary] is empty.

A RecursiveCte, its [Init], and its [Rec] have the same projection count and types. [Init] will be resolved before [Rec] or RecursiveCte to share schema types.

func NewRecursiveCte added in v0.12.0

func NewRecursiveCte(initial, recursive sql.Node, name string, outputCols []string, deduplicate bool, l sql.Expression, sf sql.SortFields) *RecursiveCte

func (*RecursiveCte) CheckPrivileges added in v0.12.0

func (r *RecursiveCte) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*RecursiveCte) Children added in v0.12.0

func (r *RecursiveCte) Children() []sql.Node

func (*RecursiveCte) CollationCoercibility added in v0.15.0

func (*RecursiveCte) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RecursiveCte) DebugString added in v0.14.0

func (r *RecursiveCte) DebugString() string

DebugString implements sql.Node

func (*RecursiveCte) Expressions added in v0.14.0

func (r *RecursiveCte) Expressions() []sql.Expression

func (*RecursiveCte) IsNullable added in v0.12.0

func (r *RecursiveCte) IsNullable() bool

IsNullable implements sql.Node

func (*RecursiveCte) Left added in v0.14.0

func (r *RecursiveCte) Left() sql.Node

Left implements sql.BinaryNode

func (*RecursiveCte) Name added in v0.12.0

func (r *RecursiveCte) Name() string

Name implements sql.Nameable

func (*RecursiveCte) Opaque added in v0.14.0

func (r *RecursiveCte) Opaque() bool

func (*RecursiveCte) Resolved added in v0.12.0

func (r *RecursiveCte) Resolved() bool

func (*RecursiveCte) Right added in v0.14.0

func (r *RecursiveCte) Right() sql.Node

Right implements sql.BinaryNode

func (*RecursiveCte) Schema added in v0.12.0

func (r *RecursiveCte) Schema() sql.Schema

Schema implements sql.Node

func (*RecursiveCte) String added in v0.12.0

func (r *RecursiveCte) String() string

String implements sql.Node

func (*RecursiveCte) Type added in v0.12.0

func (r *RecursiveCte) Type() sql.Type

Type implements sql.Node

func (*RecursiveCte) Union added in v0.14.0

func (r *RecursiveCte) Union() *Union

func (*RecursiveCte) WithChildren added in v0.12.0

func (r *RecursiveCte) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements sql.Node

func (*RecursiveCte) WithExpressions added in v0.14.0

func (r *RecursiveCte) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (*RecursiveCte) WithSchema added in v0.12.0

func (r *RecursiveCte) WithSchema(s sql.Schema) *RecursiveCte

WithSchema inherits [Init]'s schema at resolve time

func (*RecursiveCte) WithWorking added in v0.12.0

func (r *RecursiveCte) WithWorking(t *RecursiveTable) *RecursiveCte

WithWorking populates the [working] table with a common schema

type RecursiveTable added in v0.12.0

type RecursiveTable struct {
	Buf []sql.Row
	// contains filtered or unexported fields
}

RecursiveTable is a thin wrapper around an in memory buffer for use with recursiveCteIter.

func NewRecursiveTable added in v0.12.0

func NewRecursiveTable(n string, s sql.Schema) *RecursiveTable

func (*RecursiveTable) CheckPrivileges added in v0.12.0

func (r *RecursiveTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RecursiveTable) Children added in v0.12.0

func (r *RecursiveTable) Children() []sql.Node

func (*RecursiveTable) CollationCoercibility added in v0.15.0

func (*RecursiveTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RecursiveTable) Name added in v0.12.0

func (r *RecursiveTable) Name() string

func (*RecursiveTable) Resolved added in v0.12.0

func (r *RecursiveTable) Resolved() bool

func (*RecursiveTable) Schema added in v0.12.0

func (r *RecursiveTable) Schema() sql.Schema

func (*RecursiveTable) String added in v0.12.0

func (r *RecursiveTable) String() string

func (*RecursiveTable) WithChildren added in v0.12.0

func (r *RecursiveTable) WithChildren(node ...sql.Node) (sql.Node, error)

type ReleaseSavepoint added in v0.10.0

type ReleaseSavepoint struct {
	Name string
	// contains filtered or unexported fields
}

ReleaseSavepoint releases the given savepoint. For sessions that don't implement sql.TransactionSession, this is a no-op.

func NewReleaseSavepoint added in v0.10.0

func NewReleaseSavepoint(name string) *ReleaseSavepoint

NewReleaseSavepoint creates a new ReleaseSavepoint node.

func (ReleaseSavepoint) CheckPrivileges added in v0.12.0

func (ReleaseSavepoint) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (ReleaseSavepoint) Children added in v0.10.0

func (ReleaseSavepoint) Children() []sql.Node

func (*ReleaseSavepoint) CollationCoercibility added in v0.15.0

func (*ReleaseSavepoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (ReleaseSavepoint) Resolved added in v0.10.0

func (ReleaseSavepoint) Resolved() bool

Resolved implements the sql.Node interface.

func (*ReleaseSavepoint) RowIter added in v0.10.0

func (r *ReleaseSavepoint) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (ReleaseSavepoint) Schema added in v0.10.0

func (ReleaseSavepoint) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ReleaseSavepoint) String added in v0.10.0

func (r *ReleaseSavepoint) String() string

func (*ReleaseSavepoint) WithChildren added in v0.10.0

func (r *ReleaseSavepoint) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type Releaser added in v0.15.0

type Releaser struct {
	Child   sql.Node
	Release func()
}

func (*Releaser) CheckPrivileges added in v0.15.0

func (r *Releaser) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Releaser) Children added in v0.15.0

func (r *Releaser) Children() []sql.Node

func (*Releaser) CollationCoercibility added in v0.15.0

func (r *Releaser) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Releaser) Equal added in v0.15.0

func (r *Releaser) Equal(n sql.Node) bool

func (*Releaser) Resolved added in v0.15.0

func (r *Releaser) Resolved() bool

func (*Releaser) Schema added in v0.15.0

func (r *Releaser) Schema() sql.Schema

func (*Releaser) String added in v0.15.0

func (r *Releaser) String() string

func (*Releaser) WithChildren added in v0.15.0

func (r *Releaser) WithChildren(children ...sql.Node) (sql.Node, error)

type RenameColumn

type RenameColumn struct {
	Table         sql.Node
	ColumnName    string
	NewColumnName string
	Checks        sql.CheckConstraints
	// contains filtered or unexported fields
}

func NewRenameColumn

func NewRenameColumn(database sql.Database, table *UnresolvedTable, columnName string, newColumnName string) *RenameColumn

func (*RenameColumn) CheckPrivileges added in v0.12.0

func (r *RenameColumn) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RenameColumn) Children

func (r *RenameColumn) Children() []sql.Node

func (*RenameColumn) CollationCoercibility added in v0.15.0

func (*RenameColumn) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RenameColumn) Database

func (c *RenameColumn) Database() sql.Database

Database implements the sql.Databaser interface.

func (*RenameColumn) DebugString added in v0.12.0

func (r *RenameColumn) DebugString() string

func (*RenameColumn) Expressions added in v0.12.0

func (r *RenameColumn) Expressions() []sql.Expression

func (*RenameColumn) Resolved

func (r *RenameColumn) Resolved() bool

func (*RenameColumn) Schema

func (r *RenameColumn) Schema() sql.Schema

func (*RenameColumn) String

func (r *RenameColumn) String() string

func (*RenameColumn) TargetSchema added in v0.12.0

func (r *RenameColumn) TargetSchema() sql.Schema

func (RenameColumn) WithChildren

func (r RenameColumn) WithChildren(children ...sql.Node) (sql.Node, error)

func (*RenameColumn) WithDatabase

func (r *RenameColumn) WithDatabase(db sql.Database) (sql.Node, error)

func (RenameColumn) WithExpressions added in v0.12.0

func (r RenameColumn) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (RenameColumn) WithTargetSchema added in v0.12.0

func (r RenameColumn) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type RenameTable

type RenameTable struct {
	OldNames []string
	NewNames []string
	// contains filtered or unexported fields
}

func NewRenameTable

func NewRenameTable(db sql.Database, oldNames, newNames []string) *RenameTable

NewRenameTable creates a new RenameTable node

func (*RenameTable) CheckPrivileges added in v0.12.0

func (r *RenameTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RenameTable) Children

func (c *RenameTable) Children() []sql.Node

Children implements the Node interface.

func (*RenameTable) CollationCoercibility added in v0.15.0

func (*RenameTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RenameTable) Database

func (c *RenameTable) Database() sql.Database

Database implements the sql.Databaser interface.

func (*RenameTable) Resolved

func (c *RenameTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*RenameTable) Schema

func (*RenameTable) Schema() sql.Schema

Schema implements the Node interface.

func (*RenameTable) String

func (r *RenameTable) String() string

func (*RenameTable) WithChildren

func (r *RenameTable) WithChildren(children ...sql.Node) (sql.Node, error)

func (*RenameTable) WithDatabase

func (r *RenameTable) WithDatabase(db sql.Database) (sql.Node, error)

type RenameUser added in v0.12.0

type RenameUser struct {
	OldName []UserName
	NewName []UserName
}

RenameUser represents the statement RENAME USER.

func NewRenameUser added in v0.12.0

func NewRenameUser(oldNames []UserName, newNames []UserName) *RenameUser

NewRenameUser returns a new RenameUser node.

func (*RenameUser) CheckPrivileges added in v0.12.0

func (n *RenameUser) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RenameUser) Children added in v0.12.0

func (n *RenameUser) Children() []sql.Node

Children implements the interface sql.Node.

func (*RenameUser) CollationCoercibility added in v0.15.0

func (*RenameUser) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RenameUser) Resolved added in v0.12.0

func (n *RenameUser) Resolved() bool

Resolved implements the interface sql.Node.

func (*RenameUser) RowIter added in v0.12.0

func (n *RenameUser) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*RenameUser) Schema added in v0.12.0

func (n *RenameUser) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*RenameUser) String added in v0.12.0

func (n *RenameUser) String() string

String implements the interface sql.Node.

func (*RenameUser) WithChildren added in v0.12.0

func (n *RenameUser) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type Repeat added in v0.15.0

type Repeat struct {
	*Loop
}

Repeat represents the REPEAT statement, which loops over a set of statements until the condition is true.

func NewRepeat added in v0.15.0

func NewRepeat(label string, condition sql.Expression, block *Block) *Repeat

NewRepeat returns a new *Repeat node.

func (*Repeat) DebugString added in v0.15.0

func (r *Repeat) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*Repeat) String added in v0.15.0

func (r *Repeat) String() string

String implements the interface sql.Node.

func (*Repeat) WithChildren added in v0.15.0

func (r *Repeat) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Repeat) WithExpressions added in v0.15.0

func (r *Repeat) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the interface sql.Node.

type RepresentsBlock added in v0.15.0

type RepresentsBlock interface {
	sql.Node
	// contains filtered or unexported methods
}

RepresentsBlock is an interface that defines whether a node contains a Block node, or contains multiple child statements similar to a block node. As a rule of thumb, if a parent node depends upon a child node, either explicitly or implicitly, then it does not represent a Block.

type RepresentsLabeledBlock added in v0.15.0

type RepresentsLabeledBlock interface {
	RepresentsBlock
	GetBlockLabel(ctx *sql.Context) string
	RepresentsLoop() bool
}

RepresentsLabeledBlock is an interface that defines whether a node represents a Block node, while also carrying a label that may be referenced by statements within the block (such as LEAVE, ITERATE, etc.). Some statements that use labels only look for labels on statements that loop (such as LOOP and REPEAT), so there's an additional function to check whether this also represents a loop.

type RepresentsScope added in v0.15.0

type RepresentsScope interface {
	RepresentsBlock
	// contains filtered or unexported methods
}

RepresentsScope is an interface that defines whether a node represents a new scope. Scopes define boundaries that are used for variable resolution and control flow modification (via condition handling, etc.).

type ResetReplica added in v0.15.0

type ResetReplica struct {
	ReplicaController binlogreplication.BinlogReplicaController
	All               bool
}

ResetReplica is a plan node for the "RESET REPLICA" statement. https://dev.mysql.com/doc/refman/8.0/en/reset-replica.html

func NewResetReplica added in v0.15.0

func NewResetReplica(all bool) *ResetReplica

func (*ResetReplica) CheckPrivileges added in v0.15.0

func (r *ResetReplica) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*ResetReplica) Children added in v0.15.0

func (r *ResetReplica) Children() []sql.Node

func (*ResetReplica) CollationCoercibility added in v0.15.0

func (*ResetReplica) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ResetReplica) Resolved added in v0.15.0

func (r *ResetReplica) Resolved() bool

func (*ResetReplica) Schema added in v0.15.0

func (r *ResetReplica) Schema() sql.Schema

func (*ResetReplica) String added in v0.15.0

func (r *ResetReplica) String() string

func (*ResetReplica) WithBinlogReplicaController added in v0.15.0

func (r *ResetReplica) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*ResetReplica) WithChildren added in v0.15.0

func (r *ResetReplica) WithChildren(children ...sql.Node) (sql.Node, error)

type ResolvedTable

type ResolvedTable struct {
	sql.Table
	Database sql.Database
	AsOf     interface{}
	// contains filtered or unexported fields
}

ResolvedTable represents a resolved SQL Table.

func NewResolvedDualTable added in v0.14.0

func NewResolvedDualTable() *ResolvedTable

NewResolvedDualTable creates a new instance of ResolvedTable.

func NewResolvedTable

func NewResolvedTable(table sql.Table, db sql.Database, asOf interface{}) *ResolvedTable

NewResolvedTable creates a new instance of ResolvedTable.

func (*ResolvedTable) CheckPrivileges added in v0.12.0

func (t *ResolvedTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ResolvedTable) Children

func (*ResolvedTable) Children() []sql.Node

Children implements the Node interface.

func (*ResolvedTable) CollationCoercibility added in v0.15.0

func (*ResolvedTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ResolvedTable) Comment added in v0.15.0

func (t *ResolvedTable) Comment() string

func (*ResolvedTable) DebugString

func (t *ResolvedTable) DebugString() string

func (*ResolvedTable) Resolved

func (*ResolvedTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*ResolvedTable) String

func (t *ResolvedTable) String() string

func (*ResolvedTable) WithChildren

func (t *ResolvedTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*ResolvedTable) WithComment added in v0.15.0

func (t *ResolvedTable) WithComment(s string) sql.Node

func (*ResolvedTable) WithName added in v0.15.0

func (t *ResolvedTable) WithName(s string) sql.Node

func (*ResolvedTable) WithTable added in v0.9.0

func (t *ResolvedTable) WithTable(table sql.Table) (*ResolvedTable, error)

WithTable returns this Node with the given table. The new table should have the same name as the previous table.

type Revoke added in v0.12.0

type Revoke struct {
	Privileges     []Privilege
	ObjectType     ObjectType
	PrivilegeLevel PrivilegeLevel
	Users          []UserName
	MySQLDb        sql.Database
}

Revoke represents the statement REVOKE [privilege...] ON [item] FROM [user...].

func NewRevoke added in v0.12.0

func NewRevoke(privileges []Privilege, objType ObjectType, level PrivilegeLevel, users []UserName, revoker string) (*Revoke, error)

NewRevoke returns a new Revoke node.

func (*Revoke) CheckPrivileges added in v0.12.0

func (n *Revoke) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Revoke) Children added in v0.12.0

func (n *Revoke) Children() []sql.Node

Children implements the interface sql.Node.

func (*Revoke) CollationCoercibility added in v0.15.0

func (*Revoke) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Revoke) Database added in v0.12.0

func (n *Revoke) Database() sql.Database

Database implements the interface sql.Databaser.

func (*Revoke) HandleDatabasePrivileges added in v0.15.0

func (n *Revoke) HandleDatabasePrivileges(user *mysql_db.User, dbName string) error

HandleDatabasePrivileges handles removing database privileges from a user.

func (*Revoke) HandleGlobalPrivileges added in v0.15.0

func (n *Revoke) HandleGlobalPrivileges(user *mysql_db.User) error

HandleGlobalPrivileges handles removing global privileges from a user.

func (*Revoke) HandleTablePrivileges added in v0.15.0

func (n *Revoke) HandleTablePrivileges(user *mysql_db.User, dbName string, tblName string) error

HandleTablePrivileges handles removing table privileges from a user.

func (*Revoke) Resolved added in v0.12.0

func (n *Revoke) Resolved() bool

Resolved implements the interface sql.Node.

func (*Revoke) RowIter added in v0.12.0

func (n *Revoke) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*Revoke) Schema added in v0.12.0

func (n *Revoke) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*Revoke) String added in v0.12.0

func (n *Revoke) String() string

String implements the interface sql.Node.

func (*Revoke) WithChildren added in v0.12.0

func (n *Revoke) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*Revoke) WithDatabase added in v0.12.0

func (n *Revoke) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type RevokeAll added in v0.12.0

type RevokeAll struct {
	Users []UserName
}

RevokeAll represents the statement REVOKE ALL PRIVILEGES.

func NewRevokeAll added in v0.12.0

func NewRevokeAll(users []UserName) *RevokeAll

NewRevokeAll returns a new RevokeAll node.

func (*RevokeAll) CheckPrivileges added in v0.12.0

func (n *RevokeAll) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RevokeAll) Children added in v0.12.0

func (n *RevokeAll) Children() []sql.Node

Children implements the interface sql.Node.

func (*RevokeAll) CollationCoercibility added in v0.15.0

func (*RevokeAll) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RevokeAll) Resolved added in v0.12.0

func (n *RevokeAll) Resolved() bool

Resolved implements the interface sql.Node.

func (*RevokeAll) RowIter added in v0.12.0

func (n *RevokeAll) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*RevokeAll) Schema added in v0.12.0

func (n *RevokeAll) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*RevokeAll) String added in v0.12.0

func (n *RevokeAll) String() string

String implements the interface sql.Node.

func (*RevokeAll) WithChildren added in v0.12.0

func (n *RevokeAll) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type RevokeProxy added in v0.12.0

type RevokeProxy struct {
	On   UserName
	From []UserName
}

RevokeProxy represents the statement REVOKE PROXY.

func NewRevokeProxy added in v0.12.0

func NewRevokeProxy(on UserName, from []UserName) *RevokeProxy

NewRevokeProxy returns a new RevokeProxy node.

func (*RevokeProxy) CheckPrivileges added in v0.12.0

func (n *RevokeProxy) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RevokeProxy) Children added in v0.12.0

func (n *RevokeProxy) Children() []sql.Node

Children implements the interface sql.Node.

func (*RevokeProxy) CollationCoercibility added in v0.15.0

func (*RevokeProxy) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RevokeProxy) Resolved added in v0.12.0

func (n *RevokeProxy) Resolved() bool

Resolved implements the interface sql.Node.

func (*RevokeProxy) RowIter added in v0.12.0

func (n *RevokeProxy) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*RevokeProxy) Schema added in v0.12.0

func (n *RevokeProxy) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*RevokeProxy) String added in v0.12.0

func (n *RevokeProxy) String() string

String implements the interface sql.Node.

func (*RevokeProxy) WithChildren added in v0.12.0

func (n *RevokeProxy) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type RevokeRole added in v0.12.0

type RevokeRole struct {
	Roles       []UserName
	TargetUsers []UserName
	MySQLDb     sql.Database
}

RevokeRole represents the statement REVOKE [role...] FROM [user...].

func NewRevokeRole added in v0.12.0

func NewRevokeRole(roles []UserName, users []UserName) *RevokeRole

NewRevokeRole returns a new RevokeRole node.

func (*RevokeRole) CheckPrivileges added in v0.12.0

func (n *RevokeRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*RevokeRole) Children added in v0.12.0

func (n *RevokeRole) Children() []sql.Node

Children implements the interface sql.Node.

func (*RevokeRole) CollationCoercibility added in v0.15.0

func (*RevokeRole) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*RevokeRole) Database added in v0.12.0

func (n *RevokeRole) Database() sql.Database

Database implements the interface sql.Databaser.

func (*RevokeRole) Resolved added in v0.12.0

func (n *RevokeRole) Resolved() bool

Resolved implements the interface sql.Node.

func (*RevokeRole) RowIter added in v0.12.0

func (n *RevokeRole) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*RevokeRole) Schema added in v0.12.0

func (n *RevokeRole) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*RevokeRole) String added in v0.12.0

func (n *RevokeRole) String() string

String implements the interface sql.Node.

func (*RevokeRole) WithChildren added in v0.12.0

func (n *RevokeRole) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*RevokeRole) WithDatabase added in v0.12.0

func (n *RevokeRole) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type Rollback

type Rollback struct {
	// contains filtered or unexported fields
}

Rollback undoes the changes performed in the current transaction. For compatibility, sessions that don't implement sql.TransactionSession treat this as a no-op.

func NewRollback

func NewRollback() *Rollback

NewRollback creates a new Rollback node.

func (Rollback) CheckPrivileges added in v0.12.0

func (Rollback) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (Rollback) Children

func (Rollback) Children() []sql.Node

func (*Rollback) CollationCoercibility added in v0.15.0

func (*Rollback) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Rollback) Resolved

func (Rollback) Resolved() bool

Resolved implements the sql.Node interface.

func (*Rollback) RowIter

func (r *Rollback) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (Rollback) Schema

func (Rollback) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Rollback) String

func (*Rollback) String() string

func (*Rollback) WithChildren

func (r *Rollback) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type RollbackSavepoint added in v0.10.0

type RollbackSavepoint struct {
	Name string
	// contains filtered or unexported fields
}

RollbackSavepoint rolls back the current transaction to the given savepoint. For sessions that don't implement sql.TransactionSession, this is a no-op.

func NewRollbackSavepoint added in v0.10.0

func NewRollbackSavepoint(name string) *RollbackSavepoint

NewRollbackSavepoint creates a new RollbackSavepoint node.

func (RollbackSavepoint) CheckPrivileges added in v0.12.0

func (RollbackSavepoint) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (RollbackSavepoint) Children added in v0.10.0

func (RollbackSavepoint) Children() []sql.Node

func (*RollbackSavepoint) CollationCoercibility added in v0.15.0

func (*RollbackSavepoint) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (RollbackSavepoint) Resolved added in v0.10.0

func (RollbackSavepoint) Resolved() bool

Resolved implements the sql.Node interface.

func (*RollbackSavepoint) RowIter added in v0.10.0

func (r *RollbackSavepoint) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (RollbackSavepoint) Schema added in v0.10.0

func (RollbackSavepoint) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*RollbackSavepoint) String added in v0.10.0

func (r *RollbackSavepoint) String() string

func (*RollbackSavepoint) WithChildren added in v0.10.0

func (r *RollbackSavepoint) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type RowUpdateAccumulator

type RowUpdateAccumulator struct {
	UnaryNode
	RowUpdateType
}

RowUpdateAccumulator wraps other nodes that update tables, and returns their results as OKResults with the appropriate fields set.

func NewRowUpdateAccumulator

func NewRowUpdateAccumulator(n sql.Node, updateType RowUpdateType) *RowUpdateAccumulator

NewRowUpdateResult returns a new RowUpdateResult with the given node to wrap.

func (RowUpdateAccumulator) CheckPrivileges added in v0.12.0

func (r RowUpdateAccumulator) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (RowUpdateAccumulator) Child added in v0.12.0

func (r RowUpdateAccumulator) Child() sql.Node

func (RowUpdateAccumulator) CollationCoercibility added in v0.15.0

func (r RowUpdateAccumulator) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (RowUpdateAccumulator) DebugString

func (r RowUpdateAccumulator) DebugString() string

func (RowUpdateAccumulator) Schema

func (r RowUpdateAccumulator) Schema() sql.Schema

func (RowUpdateAccumulator) String

func (r RowUpdateAccumulator) String() string

func (RowUpdateAccumulator) WithChildren

func (r RowUpdateAccumulator) WithChildren(children ...sql.Node) (sql.Node, error)

type RowUpdateType

type RowUpdateType int
const (
	UpdateTypeInsert RowUpdateType = iota
	UpdateTypeReplace
	UpdateTypeDuplicateKeyUpdate
	UpdateTypeUpdate
	UpdateTypeDelete
	UpdateTypeJoinUpdate
)

type RowsCurrentRowToCurrentRowFrame added in v0.12.0

type RowsCurrentRowToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRowsCurrentRowToCurrentRowFrame added in v0.12.0

func NewRowsCurrentRowToCurrentRowFrame() *RowsCurrentRowToCurrentRowFrame

func (*RowsCurrentRowToCurrentRowFrame) DebugString added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) DebugString() string

func (*RowsCurrentRowToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) EndCurrentRow() bool

func (*RowsCurrentRowToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RowsCurrentRowToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RowsCurrentRowToCurrentRowFrame) NewFramer added in v0.12.0

func (*RowsCurrentRowToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) StartCurrentRow() bool

func (*RowsCurrentRowToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RowsCurrentRowToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RowsCurrentRowToCurrentRowFrame) String added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) String() string

func (*RowsCurrentRowToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) UnboundedFollowing() bool

func (*RowsCurrentRowToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RowsCurrentRowToCurrentRowFrame) UnboundedPreceding() bool

type RowsCurrentRowToNFollowingFrame added in v0.12.0

type RowsCurrentRowToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsCurrentRowToNFollowingFrame added in v0.12.0

func NewRowsCurrentRowToNFollowingFrame(endNFollowing sql.Expression) *RowsCurrentRowToNFollowingFrame

func (*RowsCurrentRowToNFollowingFrame) DebugString added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) DebugString() string

func (*RowsCurrentRowToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) EndCurrentRow() bool

func (*RowsCurrentRowToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) EndNFollowing() sql.Expression

func (*RowsCurrentRowToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) EndNPreceding() sql.Expression

func (*RowsCurrentRowToNFollowingFrame) NewFramer added in v0.12.0

func (*RowsCurrentRowToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) StartCurrentRow() bool

func (*RowsCurrentRowToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) StartNFollowing() sql.Expression

func (*RowsCurrentRowToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) StartNPreceding() sql.Expression

func (*RowsCurrentRowToNFollowingFrame) String added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) String() string

func (*RowsCurrentRowToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) UnboundedFollowing() bool

func (*RowsCurrentRowToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsCurrentRowToNFollowingFrame) UnboundedPreceding() bool

type RowsCurrentRowToNPrecedingFrame added in v0.12.0

type RowsCurrentRowToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsCurrentRowToNPrecedingFrame added in v0.12.0

func NewRowsCurrentRowToNPrecedingFrame(endNPreceding sql.Expression) *RowsCurrentRowToNPrecedingFrame

func (*RowsCurrentRowToNPrecedingFrame) DebugString added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) DebugString() string

func (*RowsCurrentRowToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) EndCurrentRow() bool

func (*RowsCurrentRowToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RowsCurrentRowToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RowsCurrentRowToNPrecedingFrame) NewFramer added in v0.12.0

func (*RowsCurrentRowToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) StartCurrentRow() bool

func (*RowsCurrentRowToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RowsCurrentRowToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RowsCurrentRowToNPrecedingFrame) String added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) String() string

func (*RowsCurrentRowToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) UnboundedFollowing() bool

func (*RowsCurrentRowToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsCurrentRowToNPrecedingFrame) UnboundedPreceding() bool

type RowsCurrentRowToUnboundedFollowingFrame added in v0.12.0

type RowsCurrentRowToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsCurrentRowToUnboundedFollowingFrame added in v0.12.0

func NewRowsCurrentRowToUnboundedFollowingFrame() *RowsCurrentRowToUnboundedFollowingFrame

func (*RowsCurrentRowToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) DebugString() string

func (*RowsCurrentRowToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) EndCurrentRow() bool

func (*RowsCurrentRowToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RowsCurrentRowToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RowsCurrentRowToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RowsCurrentRowToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RowsCurrentRowToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RowsCurrentRowToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RowsCurrentRowToUnboundedFollowingFrame) String added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) String() string

func (*RowsCurrentRowToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RowsCurrentRowToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsCurrentRowToUnboundedFollowingFrame) UnboundedPreceding() bool

type RowsNFollowingToCurrentRowFrame added in v0.12.0

type RowsNFollowingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNFollowingToCurrentRowFrame added in v0.12.0

func NewRowsNFollowingToCurrentRowFrame(startNFollowing sql.Expression) *RowsNFollowingToCurrentRowFrame

func (*RowsNFollowingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) DebugString() string

func (*RowsNFollowingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) EndCurrentRow() bool

func (*RowsNFollowingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RowsNFollowingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RowsNFollowingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RowsNFollowingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) StartCurrentRow() bool

func (*RowsNFollowingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RowsNFollowingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RowsNFollowingToCurrentRowFrame) String added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) String() string

func (*RowsNFollowingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) UnboundedFollowing() bool

func (*RowsNFollowingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNFollowingToCurrentRowFrame) UnboundedPreceding() bool

type RowsNFollowingToNFollowingFrame added in v0.12.0

type RowsNFollowingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNFollowingToNFollowingFrame added in v0.12.0

func NewRowsNFollowingToNFollowingFrame(startNFollowing sql.Expression, endNFollowing sql.Expression) *RowsNFollowingToNFollowingFrame

func (*RowsNFollowingToNFollowingFrame) DebugString added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) DebugString() string

func (*RowsNFollowingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) EndCurrentRow() bool

func (*RowsNFollowingToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) EndNFollowing() sql.Expression

func (*RowsNFollowingToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) EndNPreceding() sql.Expression

func (*RowsNFollowingToNFollowingFrame) NewFramer added in v0.12.0

func (*RowsNFollowingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) StartCurrentRow() bool

func (*RowsNFollowingToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) StartNFollowing() sql.Expression

func (*RowsNFollowingToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) StartNPreceding() sql.Expression

func (*RowsNFollowingToNFollowingFrame) String added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) String() string

func (*RowsNFollowingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) UnboundedFollowing() bool

func (*RowsNFollowingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNFollowingToNFollowingFrame) UnboundedPreceding() bool

type RowsNFollowingToNPrecedingFrame added in v0.12.0

type RowsNFollowingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNFollowingToNPrecedingFrame added in v0.12.0

func NewRowsNFollowingToNPrecedingFrame(startNFollowing sql.Expression, endNPreceding sql.Expression) *RowsNFollowingToNPrecedingFrame

func (*RowsNFollowingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) DebugString() string

func (*RowsNFollowingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) EndCurrentRow() bool

func (*RowsNFollowingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RowsNFollowingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RowsNFollowingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RowsNFollowingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) StartCurrentRow() bool

func (*RowsNFollowingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RowsNFollowingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RowsNFollowingToNPrecedingFrame) String added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) String() string

func (*RowsNFollowingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) UnboundedFollowing() bool

func (*RowsNFollowingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNFollowingToNPrecedingFrame) UnboundedPreceding() bool

type RowsNFollowingToUnboundedFollowingFrame added in v0.12.0

type RowsNFollowingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNFollowingToUnboundedFollowingFrame added in v0.12.0

func NewRowsNFollowingToUnboundedFollowingFrame(startNFollowing sql.Expression) *RowsNFollowingToUnboundedFollowingFrame

func (*RowsNFollowingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) DebugString() string

func (*RowsNFollowingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) EndCurrentRow() bool

func (*RowsNFollowingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RowsNFollowingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RowsNFollowingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RowsNFollowingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RowsNFollowingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RowsNFollowingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RowsNFollowingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) String() string

func (*RowsNFollowingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RowsNFollowingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNFollowingToUnboundedFollowingFrame) UnboundedPreceding() bool

type RowsNPrecedingToCurrentRowFrame added in v0.12.0

type RowsNPrecedingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNPrecedingToCurrentRowFrame added in v0.12.0

func NewRowsNPrecedingToCurrentRowFrame(startNPreceding sql.Expression) *RowsNPrecedingToCurrentRowFrame

func (*RowsNPrecedingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) DebugString() string

func (*RowsNPrecedingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) EndCurrentRow() bool

func (*RowsNPrecedingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) EndNFollowing() sql.Expression

func (*RowsNPrecedingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) EndNPreceding() sql.Expression

func (*RowsNPrecedingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RowsNPrecedingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) StartCurrentRow() bool

func (*RowsNPrecedingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) StartNFollowing() sql.Expression

func (*RowsNPrecedingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) StartNPreceding() sql.Expression

func (*RowsNPrecedingToCurrentRowFrame) String added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) String() string

func (*RowsNPrecedingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) UnboundedFollowing() bool

func (*RowsNPrecedingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNPrecedingToCurrentRowFrame) UnboundedPreceding() bool

type RowsNPrecedingToNFollowingFrame added in v0.12.0

type RowsNPrecedingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNPrecedingToNFollowingFrame added in v0.12.0

func NewRowsNPrecedingToNFollowingFrame(startNPreceding sql.Expression, endNFollowing sql.Expression) *RowsNPrecedingToNFollowingFrame

func (*RowsNPrecedingToNFollowingFrame) DebugString added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) DebugString() string

func (*RowsNPrecedingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) EndCurrentRow() bool

func (*RowsNPrecedingToNFollowingFrame) EndNFollowing added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) EndNFollowing() sql.Expression

func (*RowsNPrecedingToNFollowingFrame) EndNPreceding added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) EndNPreceding() sql.Expression

func (*RowsNPrecedingToNFollowingFrame) NewFramer added in v0.12.0

func (*RowsNPrecedingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) StartCurrentRow() bool

func (*RowsNPrecedingToNFollowingFrame) StartNFollowing added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) StartNFollowing() sql.Expression

func (*RowsNPrecedingToNFollowingFrame) StartNPreceding added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) StartNPreceding() sql.Expression

func (*RowsNPrecedingToNFollowingFrame) String added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) String() string

func (*RowsNPrecedingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) UnboundedFollowing() bool

func (*RowsNPrecedingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNPrecedingToNFollowingFrame) UnboundedPreceding() bool

type RowsNPrecedingToNPrecedingFrame added in v0.12.0

type RowsNPrecedingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNPrecedingToNPrecedingFrame added in v0.12.0

func NewRowsNPrecedingToNPrecedingFrame(startNPreceding sql.Expression, endNPreceding sql.Expression) *RowsNPrecedingToNPrecedingFrame

func (*RowsNPrecedingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) DebugString() string

func (*RowsNPrecedingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) EndCurrentRow() bool

func (*RowsNPrecedingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) EndNFollowing() sql.Expression

func (*RowsNPrecedingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) EndNPreceding() sql.Expression

func (*RowsNPrecedingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RowsNPrecedingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) StartCurrentRow() bool

func (*RowsNPrecedingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) StartNFollowing() sql.Expression

func (*RowsNPrecedingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) StartNPreceding() sql.Expression

func (*RowsNPrecedingToNPrecedingFrame) String added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) String() string

func (*RowsNPrecedingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) UnboundedFollowing() bool

func (*RowsNPrecedingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNPrecedingToNPrecedingFrame) UnboundedPreceding() bool

type RowsNPrecedingToUnboundedFollowingFrame added in v0.12.0

type RowsNPrecedingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsNPrecedingToUnboundedFollowingFrame added in v0.12.0

func NewRowsNPrecedingToUnboundedFollowingFrame(startNPreceding sql.Expression) *RowsNPrecedingToUnboundedFollowingFrame

func (*RowsNPrecedingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) DebugString() string

func (*RowsNPrecedingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) EndCurrentRow() bool

func (*RowsNPrecedingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RowsNPrecedingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RowsNPrecedingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RowsNPrecedingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) StartCurrentRow() bool

func (*RowsNPrecedingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RowsNPrecedingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RowsNPrecedingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) String() string

func (*RowsNPrecedingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RowsNPrecedingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsNPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool

type RowsUnboundedPrecedingToCurrentRowFrame added in v0.12.0

type RowsUnboundedPrecedingToCurrentRowFrame struct {
	// contains filtered or unexported fields
}

func NewRowsUnboundedPrecedingToCurrentRowFrame added in v0.12.0

func NewRowsUnboundedPrecedingToCurrentRowFrame() *RowsUnboundedPrecedingToCurrentRowFrame

func (*RowsUnboundedPrecedingToCurrentRowFrame) DebugString added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) DebugString() string

func (*RowsUnboundedPrecedingToCurrentRowFrame) EndCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) EndCurrentRow() bool

func (*RowsUnboundedPrecedingToCurrentRowFrame) EndNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToCurrentRowFrame) EndNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToCurrentRowFrame) NewFramer added in v0.12.0

func (*RowsUnboundedPrecedingToCurrentRowFrame) StartCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) StartCurrentRow() bool

func (*RowsUnboundedPrecedingToCurrentRowFrame) StartNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToCurrentRowFrame) StartNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToCurrentRowFrame) String added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) String() string

func (*RowsUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) UnboundedFollowing() bool

func (*RowsUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding added in v0.12.0

func (f *RowsUnboundedPrecedingToCurrentRowFrame) UnboundedPreceding() bool

type RowsUnboundedPrecedingToNFollowingFrame added in v0.12.0

type RowsUnboundedPrecedingToNFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsUnboundedPrecedingToNFollowingFrame added in v0.12.0

func NewRowsUnboundedPrecedingToNFollowingFrame(endNFollowing sql.Expression) *RowsUnboundedPrecedingToNFollowingFrame

func (*RowsUnboundedPrecedingToNFollowingFrame) DebugString added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) DebugString() string

func (*RowsUnboundedPrecedingToNFollowingFrame) EndCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) EndCurrentRow() bool

func (*RowsUnboundedPrecedingToNFollowingFrame) EndNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToNFollowingFrame) EndNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToNFollowingFrame) NewFramer added in v0.12.0

func (*RowsUnboundedPrecedingToNFollowingFrame) StartCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) StartCurrentRow() bool

func (*RowsUnboundedPrecedingToNFollowingFrame) StartNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToNFollowingFrame) StartNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToNFollowingFrame) String added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) String() string

func (*RowsUnboundedPrecedingToNFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) UnboundedFollowing() bool

func (*RowsUnboundedPrecedingToNFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsUnboundedPrecedingToNFollowingFrame) UnboundedPreceding() bool

type RowsUnboundedPrecedingToNPrecedingFrame added in v0.12.0

type RowsUnboundedPrecedingToNPrecedingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsUnboundedPrecedingToNPrecedingFrame added in v0.12.0

func NewRowsUnboundedPrecedingToNPrecedingFrame(endNPreceding sql.Expression) *RowsUnboundedPrecedingToNPrecedingFrame

func (*RowsUnboundedPrecedingToNPrecedingFrame) DebugString added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) DebugString() string

func (*RowsUnboundedPrecedingToNPrecedingFrame) EndCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) EndCurrentRow() bool

func (*RowsUnboundedPrecedingToNPrecedingFrame) EndNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToNPrecedingFrame) EndNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToNPrecedingFrame) NewFramer added in v0.12.0

func (*RowsUnboundedPrecedingToNPrecedingFrame) StartCurrentRow added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) StartCurrentRow() bool

func (*RowsUnboundedPrecedingToNPrecedingFrame) StartNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToNPrecedingFrame) StartNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToNPrecedingFrame) String added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) String() string

func (*RowsUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) UnboundedFollowing() bool

func (*RowsUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsUnboundedPrecedingToNPrecedingFrame) UnboundedPreceding() bool

type RowsUnboundedPrecedingToUnboundedFollowingFrame added in v0.12.0

type RowsUnboundedPrecedingToUnboundedFollowingFrame struct {
	// contains filtered or unexported fields
}

func NewRowsUnboundedPrecedingToUnboundedFollowingFrame added in v0.12.0

func NewRowsUnboundedPrecedingToUnboundedFollowingFrame() *RowsUnboundedPrecedingToUnboundedFollowingFrame

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) DebugString added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) DebugString() string

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) EndCurrentRow added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) EndNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) EndNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) NewFramer added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) StartCurrentRow added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) StartNFollowing added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) StartNPreceding added in v0.12.0

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) String added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) String() string

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedFollowing added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedFollowing() bool

func (*RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedPreceding added in v0.12.0

func (f *RowsUnboundedPrecedingToUnboundedFollowingFrame) UnboundedPreceding() bool

type Set

type Set struct {
	Exprs []sql.Expression
}

Set represents a set statement. This can be variables, but in some instances can also refer to row values.

func NewSet

func NewSet(vars []sql.Expression) *Set

NewSet creates a new Set node.

func (*Set) CheckPrivileges added in v0.12.0

func (s *Set) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Set) Children

func (s *Set) Children() []sql.Node

Children implements the sql.Node interface.

func (*Set) CollationCoercibility added in v0.15.0

func (*Set) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Set) DebugString

func (s *Set) DebugString() string

func (*Set) Expressions

func (s *Set) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*Set) Resolved

func (s *Set) Resolved() bool

Resolved implements the sql.Node interface.

func (*Set) Schema

func (s *Set) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Set) String

func (s *Set) String() string

func (*Set) WithChildren

func (s *Set) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*Set) WithExpressions

func (s *Set) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type ShowCharset added in v0.9.0

type ShowCharset struct {
	CharacterSetTable sql.Node
}

func NewShowCharset added in v0.9.0

func NewShowCharset() *ShowCharset

NewShowCharset returns a new ShowCharset reference.

func (*ShowCharset) CheckPrivileges added in v0.12.0

func (sc *ShowCharset) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCharset) Children added in v0.9.0

func (sc *ShowCharset) Children() []sql.Node

func (*ShowCharset) CollationCoercibility added in v0.15.0

func (*ShowCharset) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCharset) Resolved added in v0.9.0

func (sc *ShowCharset) Resolved() bool

Resolved implements sql.Node interface. The function always returns true.

func (*ShowCharset) RowIter added in v0.9.0

func (sc *ShowCharset) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

func (*ShowCharset) Schema added in v0.9.0

func (sc *ShowCharset) Schema() sql.Schema

Note how this Schema differs in order from the information_schema.character_sets table.

func (*ShowCharset) String added in v0.9.0

func (sc *ShowCharset) String() string

func (*ShowCharset) WithChildren added in v0.9.0

func (sc *ShowCharset) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ShowColumns

type ShowColumns struct {
	UnaryNode
	Full    bool
	Indexes []sql.Index
	// contains filtered or unexported fields
}

ShowColumns shows the columns details of a table.

func NewShowColumns

func NewShowColumns(full bool, child sql.Node) *ShowColumns

NewShowColumns creates a new ShowColumns node.

func (*ShowColumns) CheckPrivileges added in v0.12.0

func (s *ShowColumns) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowColumns) CollationCoercibility added in v0.15.0

func (*ShowColumns) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowColumns) DebugString added in v0.12.0

func (s *ShowColumns) DebugString() string

func (*ShowColumns) Expressions added in v0.12.0

func (s *ShowColumns) Expressions() []sql.Expression

func (*ShowColumns) Resolved added in v0.12.0

func (s *ShowColumns) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowColumns) Schema

func (s *ShowColumns) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowColumns) String

func (s *ShowColumns) String() string

func (*ShowColumns) TargetSchema added in v0.12.0

func (s *ShowColumns) TargetSchema() sql.Schema

func (*ShowColumns) WithChildren

func (s *ShowColumns) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*ShowColumns) WithExpressions added in v0.12.0

func (s *ShowColumns) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (*ShowColumns) WithTargetSchema added in v0.12.0

func (s *ShowColumns) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type ShowCreateDatabase

type ShowCreateDatabase struct {
	IfNotExists bool
	// contains filtered or unexported fields
}

ShowCreateDatabase returns the SQL for creating a database.

func NewShowCreateDatabase

func NewShowCreateDatabase(db sql.Database, ifNotExists bool) *ShowCreateDatabase

NewShowCreateDatabase creates a new ShowCreateDatabase node.

func (*ShowCreateDatabase) CheckPrivileges added in v0.12.0

func (s *ShowCreateDatabase) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCreateDatabase) Children

func (s *ShowCreateDatabase) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowCreateDatabase) CollationCoercibility added in v0.15.0

func (*ShowCreateDatabase) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCreateDatabase) Database

func (s *ShowCreateDatabase) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowCreateDatabase) Resolved

func (s *ShowCreateDatabase) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowCreateDatabase) Schema

func (s *ShowCreateDatabase) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowCreateDatabase) String

func (s *ShowCreateDatabase) String() string

func (*ShowCreateDatabase) WithChildren

func (s *ShowCreateDatabase) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*ShowCreateDatabase) WithDatabase

func (s *ShowCreateDatabase) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ShowCreateEvent added in v0.15.0

type ShowCreateEvent struct {
	EventName string
	// contains filtered or unexported fields
}

func NewShowCreateEvent added in v0.15.0

func NewShowCreateEvent(db sql.Database, event string) *ShowCreateEvent

NewShowCreateEvent creates a new ShowCreateEvent node for SHOW CREATE EVENT statements.

func (*ShowCreateEvent) CheckPrivileges added in v0.15.0

func (s *ShowCreateEvent) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCreateEvent) Children added in v0.15.0

func (s *ShowCreateEvent) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowCreateEvent) CollationCoercibility added in v0.15.0

func (*ShowCreateEvent) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCreateEvent) Database added in v0.15.0

func (s *ShowCreateEvent) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowCreateEvent) Resolved added in v0.15.0

func (s *ShowCreateEvent) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowCreateEvent) RowIter added in v0.15.0

func (s *ShowCreateEvent) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*ShowCreateEvent) Schema added in v0.15.0

func (s *ShowCreateEvent) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowCreateEvent) String added in v0.15.0

func (s *ShowCreateEvent) String() string

String implements the sql.Node interface.

func (*ShowCreateEvent) WithChildren added in v0.15.0

func (s *ShowCreateEvent) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*ShowCreateEvent) WithDatabase added in v0.15.0

func (s *ShowCreateEvent) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ShowCreateProcedure added in v0.12.0

type ShowCreateProcedure struct {
	ProcedureName           string
	ExternalStoredProcedure *sql.ExternalStoredProcedureDetails
	// contains filtered or unexported fields
}

func NewShowCreateProcedure added in v0.12.0

func NewShowCreateProcedure(db sql.Database, procedure string) *ShowCreateProcedure

NewShowCreateProcedure creates a new ShowCreateProcedure node for SHOW CREATE PROCEDURE statements.

func (*ShowCreateProcedure) CheckPrivileges added in v0.12.0

func (s *ShowCreateProcedure) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCreateProcedure) Children added in v0.12.0

func (s *ShowCreateProcedure) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowCreateProcedure) CollationCoercibility added in v0.15.0

func (*ShowCreateProcedure) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCreateProcedure) Database added in v0.12.0

func (s *ShowCreateProcedure) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowCreateProcedure) Resolved added in v0.12.0

func (s *ShowCreateProcedure) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowCreateProcedure) RowIter added in v0.12.0

func (s *ShowCreateProcedure) RowIter(ctx *sql.Context, _ sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*ShowCreateProcedure) Schema added in v0.12.0

func (s *ShowCreateProcedure) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowCreateProcedure) String added in v0.12.0

func (s *ShowCreateProcedure) String() string

String implements the sql.Node interface.

func (*ShowCreateProcedure) WithChildren added in v0.12.0

func (s *ShowCreateProcedure) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*ShowCreateProcedure) WithDatabase added in v0.12.0

func (s *ShowCreateProcedure) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (*ShowCreateProcedure) WithExternalStoredProcedure added in v0.14.0

func (s *ShowCreateProcedure) WithExternalStoredProcedure(procedure sql.ExternalStoredProcedureDetails) sql.Node

WithExternalStoredProcedure returns a new ShowCreateProcedure node with the specified external stored procedure set as the procedure to be shown.

type ShowCreateTable

type ShowCreateTable struct {
	*UnaryNode
	IsView  bool
	Indexes []sql.Index
	Checks  sql.CheckConstraints

	PrimaryKeySchema sql.PrimaryKeySchema
	// contains filtered or unexported fields
}

ShowCreateTable is a node that shows the CREATE TABLE statement for a table.

func NewShowCreateTable

func NewShowCreateTable(table sql.Node, isView bool) *ShowCreateTable

NewShowCreateTable creates a new ShowCreateTable node.

func NewShowCreateTableWithAsOf added in v0.12.0

func NewShowCreateTableWithAsOf(table sql.Node, isView bool, asOf sql.Expression) *ShowCreateTable

NewShowCreateTableWithAsOf creates a new ShowCreateTable node for a specific version of a table.

func (*ShowCreateTable) AsOf added in v0.12.0

func (sc *ShowCreateTable) AsOf() sql.Expression

AsOf implements the Versionable interface.

func (*ShowCreateTable) CheckPrivileges added in v0.12.0

func (sc *ShowCreateTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCreateTable) CollationCoercibility added in v0.15.0

func (*ShowCreateTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCreateTable) Expressions added in v0.12.0

func (sc *ShowCreateTable) Expressions() []sql.Expression

func (*ShowCreateTable) GetTargetSchema added in v0.12.0

func (sc *ShowCreateTable) GetTargetSchema() sql.Schema

GetTargetSchema returns the final resolved target schema of show create table.

func (*ShowCreateTable) Resolved

func (sc *ShowCreateTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*ShowCreateTable) Schema

func (sc *ShowCreateTable) Schema() sql.Schema

Schema implements the Node interface.

func (*ShowCreateTable) String

func (sc *ShowCreateTable) String() string

String implements the fmt.Stringer interface.

func (*ShowCreateTable) TargetSchema added in v0.12.0

func (sc *ShowCreateTable) TargetSchema() sql.Schema

func (*ShowCreateTable) WithAsOf added in v0.15.0

func (sc *ShowCreateTable) WithAsOf(asOf sql.Expression) (sql.Node, error)

WithAsOf implements the Versionable interface.

func (ShowCreateTable) WithChildren

func (sc ShowCreateTable) WithChildren(children ...sql.Node) (sql.Node, error)

func (ShowCreateTable) WithExpressions added in v0.12.0

func (sc ShowCreateTable) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (ShowCreateTable) WithPrimaryKeySchema added in v0.12.0

func (sc ShowCreateTable) WithPrimaryKeySchema(schema sql.PrimaryKeySchema) (sql.Node, error)

func (ShowCreateTable) WithTargetSchema added in v0.12.0

func (sc ShowCreateTable) WithTargetSchema(schema sql.Schema) (sql.Node, error)

type ShowCreateTrigger

type ShowCreateTrigger struct {
	TriggerName string
	// contains filtered or unexported fields
}

func NewShowCreateTrigger

func NewShowCreateTrigger(db sql.Database, trigger string) *ShowCreateTrigger

NewShowCreateTrigger creates a new ShowCreateTrigger node for SHOW CREATE TRIGGER statements.

func (*ShowCreateTrigger) CheckPrivileges added in v0.12.0

func (s *ShowCreateTrigger) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowCreateTrigger) Children

func (s *ShowCreateTrigger) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowCreateTrigger) CollationCoercibility added in v0.15.0

func (*ShowCreateTrigger) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowCreateTrigger) Database

func (s *ShowCreateTrigger) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowCreateTrigger) Resolved

func (s *ShowCreateTrigger) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowCreateTrigger) Schema

func (s *ShowCreateTrigger) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowCreateTrigger) String

func (s *ShowCreateTrigger) String() string

String implements the sql.Node interface.

func (*ShowCreateTrigger) WithChildren

func (s *ShowCreateTrigger) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*ShowCreateTrigger) WithDatabase

func (s *ShowCreateTrigger) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ShowDatabases

type ShowDatabases struct {
	Catalog sql.Catalog
}

ShowDatabases is a node that shows the databases.

func NewShowDatabases

func NewShowDatabases() *ShowDatabases

NewShowDatabases creates a new show databases node.

func (*ShowDatabases) CheckPrivileges added in v0.12.0

func (p *ShowDatabases) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowDatabases) Children

func (*ShowDatabases) Children() []sql.Node

Children implements the Node interface.

func (*ShowDatabases) CollationCoercibility added in v0.15.0

func (*ShowDatabases) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowDatabases) Resolved

func (p *ShowDatabases) Resolved() bool

Resolved implements the Resolvable interface.

func (*ShowDatabases) Schema

func (*ShowDatabases) Schema() sql.Schema

Schema implements the Node interface.

func (ShowDatabases) String

func (p ShowDatabases) String() string

func (*ShowDatabases) WithChildren

func (p *ShowDatabases) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ShowEvents added in v0.15.0

type ShowEvents struct {
	Events []sql.EventDetails
	// contains filtered or unexported fields
}

func NewShowEvents added in v0.15.0

func NewShowEvents(db sql.Database) *ShowEvents

NewShowEvents creates a new ShowEvents node for SHOW EVENTS statements.

func (*ShowEvents) CheckPrivileges added in v0.15.0

func (s *ShowEvents) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowEvents) Children added in v0.15.0

func (s *ShowEvents) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowEvents) CollationCoercibility added in v0.15.0

func (*ShowEvents) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowEvents) Database added in v0.15.0

func (s *ShowEvents) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowEvents) Resolved added in v0.15.0

func (s *ShowEvents) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowEvents) RowIter added in v0.15.0

func (s *ShowEvents) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*ShowEvents) Schema added in v0.15.0

func (s *ShowEvents) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowEvents) String added in v0.15.0

func (s *ShowEvents) String() string

String implements the sql.Node interface.

func (*ShowEvents) WithChildren added in v0.15.0

func (s *ShowEvents) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*ShowEvents) WithDatabase added in v0.15.0

func (s *ShowEvents) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ShowGrants added in v0.9.0

type ShowGrants struct {
	CurrentUser bool
	For         *UserName
	Using       []UserName
	MySQLDb     sql.Database
}

ShowGrants represents the statement SHOW GRANTS.

func NewShowGrants added in v0.9.0

func NewShowGrants(currentUser bool, targetUser *UserName, using []UserName) *ShowGrants

NewShowGrants returns a new ShowGrants node.

func (*ShowGrants) CheckPrivileges added in v0.12.0

func (n *ShowGrants) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowGrants) Children added in v0.9.0

func (n *ShowGrants) Children() []sql.Node

Children implements the interface sql.Node.

func (*ShowGrants) CollationCoercibility added in v0.15.0

func (*ShowGrants) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowGrants) Database added in v0.12.0

func (n *ShowGrants) Database() sql.Database

Database implements the interface sql.Databaser.

func (*ShowGrants) Resolved added in v0.9.0

func (n *ShowGrants) Resolved() bool

Resolved implements the interface sql.Node.

func (*ShowGrants) Schema added in v0.9.0

func (n *ShowGrants) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*ShowGrants) String added in v0.9.0

func (n *ShowGrants) String() string

String implements the interface sql.Node.

func (*ShowGrants) WithChildren added in v0.9.0

func (n *ShowGrants) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*ShowGrants) WithDatabase added in v0.12.0

func (n *ShowGrants) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the interface sql.Databaser.

type ShowIndexes

type ShowIndexes struct {
	UnaryNode
	IndexesToShow []sql.Index
}

ShowIndexes is a node that shows the indexes on a table.

func (*ShowIndexes) CheckPrivileges added in v0.12.0

func (n *ShowIndexes) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowIndexes) CollationCoercibility added in v0.15.0

func (*ShowIndexes) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowIndexes) Schema

func (n *ShowIndexes) Schema() sql.Schema

Schema implements the Node interface.

func (*ShowIndexes) String

func (n *ShowIndexes) String() string

String implements the fmt.Stringer interface.

func (*ShowIndexes) WithChildren

func (n *ShowIndexes) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ShowPrivileges added in v0.12.0

type ShowPrivileges struct{}

ShowPrivileges represents the statement SHOW PRIVILEGES.

func NewShowPrivileges added in v0.12.0

func NewShowPrivileges() *ShowPrivileges

NewShowPrivileges returns a new ShowPrivileges node.

func (*ShowPrivileges) CheckPrivileges added in v0.12.0

func (n *ShowPrivileges) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowPrivileges) Children added in v0.12.0

func (n *ShowPrivileges) Children() []sql.Node

Children implements the interface sql.Node.

func (*ShowPrivileges) CollationCoercibility added in v0.15.0

func (*ShowPrivileges) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowPrivileges) Resolved added in v0.12.0

func (n *ShowPrivileges) Resolved() bool

Resolved implements the interface sql.Node.

func (*ShowPrivileges) RowIter added in v0.12.0

func (n *ShowPrivileges) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the interface sql.Node.

func (*ShowPrivileges) Schema added in v0.12.0

func (n *ShowPrivileges) Schema() sql.Schema

Schema implements the interface sql.Node.

func (*ShowPrivileges) String added in v0.12.0

func (n *ShowPrivileges) String() string

String implements the interface sql.Node.

func (*ShowPrivileges) WithChildren added in v0.12.0

func (n *ShowPrivileges) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

type ShowProcessList

type ShowProcessList struct {
	Database string
}

ShowProcessList shows a list of all current running processes.

func NewShowProcessList

func NewShowProcessList() *ShowProcessList

NewShowProcessList creates a new ProcessList node.

func (*ShowProcessList) CheckPrivileges added in v0.12.0

func (p *ShowProcessList) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowProcessList) Children

func (p *ShowProcessList) Children() []sql.Node

Children implements the Node interface.

func (*ShowProcessList) CollationCoercibility added in v0.15.0

func (*ShowProcessList) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowProcessList) Resolved

func (p *ShowProcessList) Resolved() bool

Resolved implements the Node interface.

func (*ShowProcessList) Schema

func (p *ShowProcessList) Schema() sql.Schema

Schema implements the Node interface.

func (*ShowProcessList) String

func (p *ShowProcessList) String() string

func (*ShowProcessList) WithChildren

func (p *ShowProcessList) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ShowReplicaStatus added in v0.15.0

type ShowReplicaStatus struct {
	ReplicaController binlogreplication.BinlogReplicaController
}

ShowReplicaStatus is the plan node for the "SHOW REPLICA STATUS" statement. https://dev.mysql.com/doc/refman/8.0/en/show-replica-status.html

func NewShowReplicaStatus added in v0.15.0

func NewShowReplicaStatus() *ShowReplicaStatus

func (*ShowReplicaStatus) CheckPrivileges added in v0.15.0

func (s *ShowReplicaStatus) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*ShowReplicaStatus) Children added in v0.15.0

func (s *ShowReplicaStatus) Children() []sql.Node

func (*ShowReplicaStatus) CollationCoercibility added in v0.15.0

func (*ShowReplicaStatus) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowReplicaStatus) Resolved added in v0.15.0

func (s *ShowReplicaStatus) Resolved() bool

func (*ShowReplicaStatus) Schema added in v0.15.0

func (s *ShowReplicaStatus) Schema() sql.Schema

func (*ShowReplicaStatus) String added in v0.15.0

func (s *ShowReplicaStatus) String() string

func (*ShowReplicaStatus) WithBinlogReplicaController added in v0.15.0

func (s *ShowReplicaStatus) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*ShowReplicaStatus) WithChildren added in v0.15.0

func (s *ShowReplicaStatus) WithChildren(children ...sql.Node) (sql.Node, error)

type ShowStatus added in v0.11.0

type ShowStatus struct {
	Modifier ShowStatusModifier
}

ShowStatus implements the SHOW STATUS MySQL command. TODO: This is just a stub implementation that returns an empty set. The actual functionality needs to be implemented in the future.

func NewShowStatus added in v0.11.0

func NewShowStatus(modifier ShowStatusModifier) *ShowStatus

NewShowStatus returns a new ShowStatus reference.

func (*ShowStatus) CheckPrivileges added in v0.12.0

func (s *ShowStatus) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowStatus) Children added in v0.11.0

func (s *ShowStatus) Children() []sql.Node

Children implements sql.Node interface.

func (*ShowStatus) CollationCoercibility added in v0.15.0

func (*ShowStatus) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowStatus) Resolved added in v0.11.0

func (s *ShowStatus) Resolved() bool

Resolved implements sql.Node interface.

func (*ShowStatus) RowIter added in v0.11.0

func (s *ShowStatus) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements sql.Node interface.

func (*ShowStatus) Schema added in v0.11.0

func (s *ShowStatus) Schema() sql.Schema

Schema implements sql.Node interface.

func (*ShowStatus) String added in v0.11.0

func (s *ShowStatus) String() string

String implements sql.Node interface.

func (*ShowStatus) WithChildren added in v0.11.0

func (s *ShowStatus) WithChildren(node ...sql.Node) (sql.Node, error)

WithChildren implements sql.Node interface.

type ShowStatusModifier added in v0.11.0

type ShowStatusModifier byte
const (
	ShowStatusModifier_Session ShowStatusModifier = iota
	ShowStatusModifier_Global
)

type ShowTableStatus

type ShowTableStatus struct {
	Catalog sql.Catalog
	// contains filtered or unexported fields
}

ShowTableStatus returns the status of the tables in a database.

func NewShowTableStatus

func NewShowTableStatus(db sql.Database) *ShowTableStatus

NewShowTableStatus creates a new ShowTableStatus node.

func (*ShowTableStatus) CheckPrivileges added in v0.12.0

func (s *ShowTableStatus) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowTableStatus) Children

func (s *ShowTableStatus) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowTableStatus) CollationCoercibility added in v0.15.0

func (*ShowTableStatus) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowTableStatus) Database added in v0.9.0

func (s *ShowTableStatus) Database() sql.Database

func (*ShowTableStatus) Resolved

func (s *ShowTableStatus) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowTableStatus) Schema

func (s *ShowTableStatus) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowTableStatus) String

func (s *ShowTableStatus) String() string

func (*ShowTableStatus) WithChildren

func (s *ShowTableStatus) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*ShowTableStatus) WithDatabase added in v0.9.0

func (s *ShowTableStatus) WithDatabase(db sql.Database) (sql.Node, error)

type ShowTables

type ShowTables struct {
	Full bool
	// contains filtered or unexported fields
}

ShowTables is a node that shows the database tables.

func NewShowTables

func NewShowTables(database sql.Database, full bool, asOf sql.Expression) *ShowTables

NewShowTables creates a new show tables node given a database.

func (*ShowTables) AsOf

func (p *ShowTables) AsOf() sql.Expression

AsOf implements the Versionable interface.

func (*ShowTables) CheckPrivileges added in v0.12.0

func (p *ShowTables) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowTables) Children

func (*ShowTables) Children() []sql.Node

Children implements the Node interface.

func (*ShowTables) CollationCoercibility added in v0.15.0

func (*ShowTables) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowTables) Database

func (p *ShowTables) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowTables) Expressions

func (p *ShowTables) Expressions() []sql.Expression

Expressions implements sql.Expressioner

func (*ShowTables) Resolved

func (p *ShowTables) Resolved() bool

Resolved implements the Resolvable interface.

func (*ShowTables) Schema

func (p *ShowTables) Schema() sql.Schema

Schema implements the Node interface.

func (ShowTables) String

func (p ShowTables) String() string

func (*ShowTables) WithAsOf added in v0.15.0

func (p *ShowTables) WithAsOf(asOf sql.Expression) (sql.Node, error)

WithAsOf implements the Versionable interface.

func (*ShowTables) WithChildren

func (p *ShowTables) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*ShowTables) WithDatabase

func (p *ShowTables) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

func (*ShowTables) WithExpressions

func (p *ShowTables) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements sql.Expressioner

type ShowTriggers

type ShowTriggers struct {
	Triggers []*CreateTrigger
	// contains filtered or unexported fields
}

func NewShowTriggers

func NewShowTriggers(db sql.Database) *ShowTriggers

NewShowCreateTrigger creates a new ShowCreateTrigger node for SHOW TRIGGER statements.

func (*ShowTriggers) CheckPrivileges added in v0.12.0

func (s *ShowTriggers) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowTriggers) Children

func (s *ShowTriggers) Children() []sql.Node

Children implements the sql.Node interface.

func (*ShowTriggers) CollationCoercibility added in v0.15.0

func (*ShowTriggers) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowTriggers) Database

func (s *ShowTriggers) Database() sql.Database

Database implements the sql.Databaser interface.

func (*ShowTriggers) Resolved

func (s *ShowTriggers) Resolved() bool

Resolved implements the sql.Node interface.

func (*ShowTriggers) Schema

func (s *ShowTriggers) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*ShowTriggers) String

func (s *ShowTriggers) String() string

String implements the sql.Node interface.

func (*ShowTriggers) WithChildren

func (s *ShowTriggers) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (*ShowTriggers) WithDatabase

func (s *ShowTriggers) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type ShowVariables

type ShowVariables struct {
	Filter sql.Expression
	Global bool
}

ShowVariables is a node that shows the global and session variables

func NewShowVariables

func NewShowVariables(filter sql.Expression, isGlobal bool) *ShowVariables

NewShowVariables returns a new ShowVariables reference.

func (*ShowVariables) CheckPrivileges added in v0.12.0

func (sv *ShowVariables) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*ShowVariables) Children

func (*ShowVariables) Children() []sql.Node

Children implements sql.Node interface. The function always returns nil.

func (*ShowVariables) CollationCoercibility added in v0.15.0

func (*ShowVariables) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*ShowVariables) Resolved

func (sv *ShowVariables) Resolved() bool

Resolved implements sql.Node interface. The function always returns true.

func (*ShowVariables) Schema

func (*ShowVariables) Schema() sql.Schema

Schema returns a new Schema reference for "SHOW VARIABLES" query.

func (*ShowVariables) String

func (sv *ShowVariables) String() string

String implements the fmt.Stringer interface.

func (*ShowVariables) WithChildren

func (sv *ShowVariables) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type ShowWarnings

type ShowWarnings []*sql.Warning

ShowWarnings is a node that shows the session warnings

func (ShowWarnings) CheckPrivileges added in v0.12.0

func (sw ShowWarnings) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (ShowWarnings) Children

func (ShowWarnings) Children() []sql.Node

Children implements sql.Node interface. The function always returns nil.

func (ShowWarnings) CollationCoercibility added in v0.15.0

func (ShowWarnings) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (ShowWarnings) Resolved

func (ShowWarnings) Resolved() bool

Resolved implements sql.Node interface. The function always returns true.

func (ShowWarnings) Schema

func (ShowWarnings) Schema() sql.Schema

Schema returns a new Schema reference for "SHOW VARIABLES" query.

func (ShowWarnings) String

func (ShowWarnings) String() string

String implements the fmt.Stringer interface.

func (ShowWarnings) WithChildren

func (sw ShowWarnings) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type Signal added in v0.9.0

type Signal struct {
	SqlStateValue string // Will always be a string with length 5
	Info          map[SignalConditionItemName]SignalInfo
}

Signal represents the SIGNAL statement with a set SQLSTATE.

func NewSignal added in v0.9.0

func NewSignal(sqlstate string, info map[SignalConditionItemName]SignalInfo) *Signal

NewSignal returns a *Signal node.

func (*Signal) CheckPrivileges added in v0.12.0

func (s *Signal) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Signal) Children added in v0.9.0

func (s *Signal) Children() []sql.Node

Children implements the sql.Node interface.

func (*Signal) CollationCoercibility added in v0.15.0

func (*Signal) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Signal) DebugString added in v0.15.0

func (s *Signal) DebugString() string

DebugString implements the sql.DebugStringer interface.

func (*Signal) Expressions added in v0.15.0

func (s *Signal) Expressions() []sql.Expression

func (*Signal) Resolved added in v0.9.0

func (s *Signal) Resolved() bool

Resolved implements the sql.Node interface.

func (*Signal) RowIter added in v0.9.0

func (s *Signal) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*Signal) Schema added in v0.9.0

func (s *Signal) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Signal) String added in v0.9.0

func (s *Signal) String() string

String implements the sql.Node interface.

func (*Signal) WithChildren added in v0.9.0

func (s *Signal) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

func (Signal) WithExpressions added in v0.15.0

func (s Signal) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

type SignalConditionItemName added in v0.9.0

type SignalConditionItemName string

SignalConditionItemName represents the item name for the set conditions of a SIGNAL statement.

const (
	SignalConditionItemName_ClassOrigin       SignalConditionItemName = "class_origin"
	SignalConditionItemName_SubclassOrigin    SignalConditionItemName = "subclass_origin"
	SignalConditionItemName_MessageText       SignalConditionItemName = "message_text"
	SignalConditionItemName_MysqlErrno        SignalConditionItemName = "mysql_errno"
	SignalConditionItemName_ConstraintCatalog SignalConditionItemName = "constraint_catalog"
	SignalConditionItemName_ConstraintSchema  SignalConditionItemName = "constraint_schema"
	SignalConditionItemName_ConstraintName    SignalConditionItemName = "constraint_name"
	SignalConditionItemName_CatalogName       SignalConditionItemName = "catalog_name"
	SignalConditionItemName_SchemaName        SignalConditionItemName = "schema_name"
	SignalConditionItemName_TableName         SignalConditionItemName = "table_name"
	SignalConditionItemName_ColumnName        SignalConditionItemName = "column_name"
	SignalConditionItemName_CursorName        SignalConditionItemName = "cursor_name"
)

type SignalInfo added in v0.9.0

type SignalInfo struct {
	ConditionItemName SignalConditionItemName
	IntValue          int64
	StrValue          string
	ExprVal           sql.Expression
}

SignalInfo represents a piece of information for a SIGNAL statement.

func (SignalInfo) DebugString added in v0.15.0

func (s SignalInfo) DebugString() string

func (SignalInfo) String added in v0.9.0

func (s SignalInfo) String() string

type SignalName added in v0.9.0

type SignalName struct {
	Signal *Signal
	Name   string
}

SignalName represents the SIGNAL statement with a condition name.

func NewSignalName added in v0.9.0

func NewSignalName(name string, info map[SignalConditionItemName]SignalInfo) *SignalName

NewSignalName returns a *SignalName node.

func (*SignalName) CheckPrivileges added in v0.12.0

func (s *SignalName) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*SignalName) Children added in v0.9.0

func (s *SignalName) Children() []sql.Node

Children implements the sql.Node interface.

func (*SignalName) CollationCoercibility added in v0.15.0

func (*SignalName) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*SignalName) Resolved added in v0.9.0

func (s *SignalName) Resolved() bool

Resolved implements the sql.Node interface.

func (*SignalName) RowIter added in v0.9.0

func (s *SignalName) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*SignalName) Schema added in v0.9.0

func (s *SignalName) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*SignalName) String added in v0.9.0

func (s *SignalName) String() string

String implements the sql.Node interface.

func (*SignalName) WithChildren added in v0.9.0

func (s *SignalName) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type SingleDropView

type SingleDropView struct {
	ViewName string
	// contains filtered or unexported fields
}

func NewSingleDropView

func NewSingleDropView(
	database sql.Database,
	viewName string,
) *SingleDropView

NewSingleDropView creates a SingleDropView.

func (*SingleDropView) CheckPrivileges added in v0.12.0

func (dv *SingleDropView) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*SingleDropView) Children

func (dv *SingleDropView) Children() []sql.Node

Children implements the Node interface. It always returns nil.

func (*SingleDropView) CollationCoercibility added in v0.15.0

func (*SingleDropView) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*SingleDropView) Database

func (dv *SingleDropView) Database() sql.Database

Database implements the sql.Databaser interface. It returns the node's database.

func (*SingleDropView) Resolved

func (dv *SingleDropView) Resolved() bool

Resolved implements the Node interface. This node is resolved if and only if its database is resolved.

func (*SingleDropView) RowIter

func (dv *SingleDropView) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the Node interface. It always returns an empty iterator.

func (*SingleDropView) Schema

func (dv *SingleDropView) Schema() sql.Schema

Schema implements the Node interface. It always returns nil.

func (*SingleDropView) String

func (dv *SingleDropView) String() string

String implements the fmt.Stringer interface, using sql.TreePrinter to generate the string.

func (*SingleDropView) WithChildren

func (dv *SingleDropView) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface. It only succeeds if the length of the specified children equals 0.

func (*SingleDropView) WithDatabase

func (dv *SingleDropView) WithDatabase(database sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface, and it returns a copy of this node with the specified database.

type Sort

type Sort struct {
	UnaryNode
	SortFields sql.SortFields
}

Sort is the sort node.

func NewSort

func NewSort(sortFields []sql.SortField, child sql.Node) *Sort

NewSort creates a new Sort node.

func (*Sort) CheckPrivileges added in v0.12.0

func (s *Sort) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Sort) CollationCoercibility added in v0.15.0

func (s *Sort) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Sort) DebugString

func (s *Sort) DebugString() string

func (*Sort) Expressions

func (s *Sort) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*Sort) Resolved

func (s *Sort) Resolved() bool

Resolved implements the Resolvable interface.

func (*Sort) String

func (s *Sort) String() string

func (*Sort) WithChildren

func (s *Sort) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Sort) WithExpressions

func (s *Sort) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type StartReplica added in v0.15.0

type StartReplica struct {
	ReplicaController binlogreplication.BinlogReplicaController
}

StartReplica is a plan node for the "START REPLICA" statement. https://dev.mysql.com/doc/refman/8.0/en/start-replica.html

func NewStartReplica added in v0.15.0

func NewStartReplica() *StartReplica

func (*StartReplica) CheckPrivileges added in v0.15.0

func (s *StartReplica) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*StartReplica) Children added in v0.15.0

func (s *StartReplica) Children() []sql.Node

func (*StartReplica) CollationCoercibility added in v0.15.0

func (*StartReplica) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*StartReplica) Resolved added in v0.15.0

func (s *StartReplica) Resolved() bool

func (*StartReplica) Schema added in v0.15.0

func (s *StartReplica) Schema() sql.Schema

func (*StartReplica) String added in v0.15.0

func (s *StartReplica) String() string

func (*StartReplica) WithBinlogReplicaController added in v0.15.0

func (s *StartReplica) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*StartReplica) WithChildren added in v0.15.0

func (s *StartReplica) WithChildren(children ...sql.Node) (sql.Node, error)

type StartTransaction added in v0.10.0

type StartTransaction struct {
	TransChar sql.TransactionCharacteristic
	// contains filtered or unexported fields
}

StartTransaction explicitly starts a transaction. Transactions also start before any statement execution that doesn't have a transaction. Starting a transaction implicitly commits any in-progress one.

func NewStartTransaction added in v0.10.0

func NewStartTransaction(transactionChar sql.TransactionCharacteristic) *StartTransaction

NewStartTransaction creates a new StartTransaction node.

func (StartTransaction) CheckPrivileges added in v0.12.0

func (StartTransaction) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (StartTransaction) Children added in v0.10.0

func (StartTransaction) Children() []sql.Node

func (*StartTransaction) CollationCoercibility added in v0.15.0

func (*StartTransaction) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (StartTransaction) Resolved added in v0.10.0

func (StartTransaction) Resolved() bool

Resolved implements the sql.Node interface.

func (*StartTransaction) RowIter added in v0.10.0

func (s *StartTransaction) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (StartTransaction) Schema added in v0.10.0

func (StartTransaction) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*StartTransaction) String added in v0.10.0

func (s *StartTransaction) String() string

func (*StartTransaction) WithChildren added in v0.10.0

func (s *StartTransaction) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type StopReplica added in v0.15.0

type StopReplica struct {
	ReplicaController binlogreplication.BinlogReplicaController
}

StopReplica is the plan node for the "STOP REPLICA" statement. https://dev.mysql.com/doc/refman/8.0/en/stop-replica.html

func NewStopReplica added in v0.15.0

func NewStopReplica() *StopReplica

func (*StopReplica) CheckPrivileges added in v0.15.0

func (s *StopReplica) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

func (*StopReplica) Children added in v0.15.0

func (s *StopReplica) Children() []sql.Node

func (*StopReplica) CollationCoercibility added in v0.15.0

func (*StopReplica) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*StopReplica) Resolved added in v0.15.0

func (s *StopReplica) Resolved() bool

func (*StopReplica) Schema added in v0.15.0

func (s *StopReplica) Schema() sql.Schema

func (*StopReplica) String added in v0.15.0

func (s *StopReplica) String() string

func (*StopReplica) WithBinlogReplicaController added in v0.15.0

func (s *StopReplica) WithBinlogReplicaController(controller binlogreplication.BinlogReplicaController) sql.Node

WithBinlogReplicaController implements the BinlogReplicaControllerCommand interface.

func (*StopReplica) WithChildren added in v0.15.0

func (s *StopReplica) WithChildren(children ...sql.Node) (sql.Node, error)

type StripRowNode added in v0.9.0

type StripRowNode struct {
	UnaryNode
	NumCols int
}

func (*StripRowNode) CheckPrivileges added in v0.12.0

func (srn *StripRowNode) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*StripRowNode) CollationCoercibility added in v0.15.0

func (srn *StripRowNode) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*StripRowNode) DebugString added in v0.9.0

func (srn *StripRowNode) DebugString() string

func (*StripRowNode) String added in v0.9.0

func (srn *StripRowNode) String() string

func (*StripRowNode) WithChildren added in v0.9.0

func (srn *StripRowNode) WithChildren(children ...sql.Node) (sql.Node, error)

type Subquery

type Subquery struct {
	// The subquery to execute for each row in the outer result set
	Query sql.Node
	// The original verbatim select statement for this subquery
	QueryString string
	// contains filtered or unexported fields
}

Subquery is as an expression whose value is derived by executing a subquery. It must be executed for every row in the outer result set. It's in the plan package instead of the expression package because it functions more like a plan Node than an expression.

func NewSubquery

func NewSubquery(node sql.Node, queryString string) *Subquery

NewSubquery returns a new subquery expression.

func (*Subquery) CanCacheResults added in v0.15.0

func (s *Subquery) CanCacheResults() bool

func (*Subquery) Children

func (s *Subquery) Children() []sql.Expression

Children implements the Expression interface.

func (*Subquery) CollationCoercibility added in v0.15.0

func (s *Subquery) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Subquery) DebugString

func (s *Subquery) DebugString() string

func (*Subquery) Dispose

func (s *Subquery) Dispose()

Dispose implements sql.Disposable

func (*Subquery) Eval

func (s *Subquery) Eval(ctx *sql.Context, row sql.Row) (interface{}, error)

Eval implements the Expression interface.

func (*Subquery) EvalMultiple

func (s *Subquery) EvalMultiple(ctx *sql.Context, row sql.Row) ([]interface{}, error)

EvalMultiple returns all rows returned by a subquery.

func (*Subquery) HasResultRow added in v0.11.0

func (s *Subquery) HasResultRow(ctx *sql.Context, row sql.Row) (bool, error)

HasResultRow returns whether the subquery has a result set > 0.

func (*Subquery) HashMultiple

func (s *Subquery) HashMultiple(ctx *sql.Context, row sql.Row) (sql.KeyValueCache, error)

HashMultiple returns all rows returned by a subquery, backed by a sql.KeyValueCache. Keys are constructed using the 64-bit hash of the values stored.

func (*Subquery) IsNonDeterministic

func (s *Subquery) IsNonDeterministic() bool

func (*Subquery) IsNullable

func (s *Subquery) IsNullable() bool

IsNullable implements the Expression interface.

func (*Subquery) NodeChildren added in v0.15.0

func (s *Subquery) NodeChildren() []sql.Node

NodeChildren implements the sql.ExpressionWithNodes interface.

func (*Subquery) Resolved

func (s *Subquery) Resolved() bool

Resolved implements the Expression interface.

func (*Subquery) String

func (s *Subquery) String() string

func (*Subquery) Type

func (s *Subquery) Type() sql.Type

Type implements the Expression interface.

func (*Subquery) WithCachedResults

func (s *Subquery) WithCachedResults() *Subquery

WithCachedResults returns the subquery with CanCacheResults set to true.

func (*Subquery) WithChildren

func (s *Subquery) WithChildren(children ...sql.Expression) (sql.Expression, error)

WithChildren implements the Expression interface.

func (*Subquery) WithExecBuilder added in v0.15.0

func (s *Subquery) WithExecBuilder(b sql.NodeExecBuilder) *Subquery

WithExecBuilder returns the subquery with a recursive execution builder.

func (*Subquery) WithNodeChildren added in v0.15.0

func (s *Subquery) WithNodeChildren(children ...sql.Node) (sql.ExpressionWithNodes, error)

WithNodeChildren implements the sql.ExpressionWithNodes interface.

func (*Subquery) WithQuery

func (s *Subquery) WithQuery(node sql.Node) *Subquery

WithQuery returns the subquery with the query node changed.

type SubqueryAlias

type SubqueryAlias struct {
	UnaryNode
	Columns []string

	TextDefinition string
	// OuterScopeVisibility is true when a SubqueryAlias (i.e. derived table) is contained in a subquery
	// expression and is eligible to have visibility to outer scopes of the query.
	OuterScopeVisibility bool
	CanCacheResults      bool
	// contains filtered or unexported fields
}

SubqueryAlias is a node that gives a subquery a name.

func NewSubqueryAlias

func NewSubqueryAlias(name, textDefinition string, node sql.Node) *SubqueryAlias

NewSubqueryAlias creates a new SubqueryAlias node.

func (*SubqueryAlias) AsView

func (sq *SubqueryAlias) AsView(createViewStmt string) *sql.View

AsView returns the view wrapper for this subquery

func (*SubqueryAlias) CheckPrivileges added in v0.12.0

func (sq *SubqueryAlias) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*SubqueryAlias) CollationCoercibility added in v0.15.0

func (sq *SubqueryAlias) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*SubqueryAlias) DebugString

func (sq *SubqueryAlias) DebugString() string

func (*SubqueryAlias) Name

func (sq *SubqueryAlias) Name() string

Name implements the Table interface.

func (*SubqueryAlias) Opaque

func (sq *SubqueryAlias) Opaque() bool

Opaque implements the OpaqueNode interface.

func (*SubqueryAlias) Schema

func (sq *SubqueryAlias) Schema() sql.Schema

Schema implements the Node interface.

func (*SubqueryAlias) String

func (sq *SubqueryAlias) String() string

func (*SubqueryAlias) WithCachedResults added in v0.14.0

func (sq *SubqueryAlias) WithCachedResults() *SubqueryAlias

func (*SubqueryAlias) WithChild added in v0.15.0

func (sq *SubqueryAlias) WithChild(n sql.Node) *SubqueryAlias

func (*SubqueryAlias) WithChildren

func (sq *SubqueryAlias) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*SubqueryAlias) WithColumns added in v0.9.0

func (sq *SubqueryAlias) WithColumns(columns []string) *SubqueryAlias

func (*SubqueryAlias) WithName added in v0.9.0

func (sq *SubqueryAlias) WithName(name string) *SubqueryAlias

type TLSOptions added in v0.12.0

type TLSOptions struct {
	SSL     bool
	X509    bool
	Cipher  string
	Issuer  string
	Subject string
}

TLSOptions represents a user's TLS options.

type TableAlias

type TableAlias struct {
	*UnaryNode
	// contains filtered or unexported fields
}

TableAlias is a node that acts as a table with a given name.

func NewTableAlias

func NewTableAlias(name string, node sql.Node) *TableAlias

NewTableAlias returns a new Table alias node.

func (*TableAlias) CheckPrivileges added in v0.12.0

func (t *TableAlias) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TableAlias) CollationCoercibility added in v0.15.0

func (t *TableAlias) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TableAlias) Comment added in v0.15.0

func (t *TableAlias) Comment() string

func (TableAlias) DebugString

func (t TableAlias) DebugString() string

func (*TableAlias) Name

func (t *TableAlias) Name() string

Name implements the Nameable interface.

func (*TableAlias) Schema

func (t *TableAlias) Schema() sql.Schema

Schema implements the Node interface. TableAlias alters the schema of its child element to rename the source of columns to the alias.

func (TableAlias) String

func (t TableAlias) String() string

func (*TableAlias) WithChildren

func (t *TableAlias) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*TableAlias) WithComment added in v0.15.0

func (t *TableAlias) WithComment(s string) sql.Node

func (TableAlias) WithName added in v0.9.0

func (t TableAlias) WithName(name string) sql.Node

type TableCopier added in v0.11.0

type TableCopier struct {
	Source      sql.Node
	Destination sql.Node
	// contains filtered or unexported fields
}

TableCopier is a supporting node that allows for the optimization of copying tables. It should be used in two cases. 1) CREATE TABLE SELECT * 2) INSERT INTO SELECT * where the inserted table is empty. // TODO: Implement this optimization

func NewTableCopier added in v0.11.0

func NewTableCopier(db sql.Database, createTableNode sql.Node, source sql.Node, prop CopierProps) *TableCopier

func (*TableCopier) CheckPrivileges added in v0.12.0

func (tc *TableCopier) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TableCopier) Children added in v0.11.0

func (tc *TableCopier) Children() []sql.Node

func (*TableCopier) CollationCoercibility added in v0.15.0

func (*TableCopier) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TableCopier) CopyTableOver added in v0.15.0

func (tc *TableCopier) CopyTableOver(ctx *sql.Context, sourceTable string, destinationTable string) (sql.RowIter, error)

CopyTableOver is used when we can guarantee the Destination table will have the same data as the source table.

func (*TableCopier) Database added in v0.11.0

func (tc *TableCopier) Database() sql.Database

func (*TableCopier) ProcessCreateTable added in v0.15.0

func (tc *TableCopier) ProcessCreateTable(ctx *sql.Context, b sql.NodeExecBuilder, row sql.Row) (sql.RowIter, error)

func (*TableCopier) Resolved added in v0.11.0

func (tc *TableCopier) Resolved() bool

func (*TableCopier) Schema added in v0.11.0

func (tc *TableCopier) Schema() sql.Schema

func (*TableCopier) String added in v0.11.0

func (tc *TableCopier) String() string

func (*TableCopier) WithChildren added in v0.11.0

func (tc *TableCopier) WithChildren(...sql.Node) (sql.Node, error)

func (*TableCopier) WithDatabase added in v0.11.0

func (tc *TableCopier) WithDatabase(db sql.Database) (sql.Node, error)

type TableLock

type TableLock struct {
	Table sql.Node
	// Write if it's true, read if it's false.
	Write bool
}

TableLock is a read or write lock on a table.

type TableSpec added in v0.9.0

type TableSpec struct {
	Schema    sql.PrimaryKeySchema
	FkDefs    []*sql.ForeignKeyConstraint
	ChDefs    []*sql.CheckConstraint
	IdxDefs   []*IndexDefinition
	Collation sql.CollationID
}

TableSpec is a node describing the schema of a table.

func (*TableSpec) WithCheckConstraints added in v0.9.0

func (c *TableSpec) WithCheckConstraints(chDefs []*sql.CheckConstraint) *TableSpec

func (*TableSpec) WithForeignKeys added in v0.9.0

func (c *TableSpec) WithForeignKeys(fkDefs []*sql.ForeignKeyConstraint) *TableSpec

func (*TableSpec) WithIndices added in v0.9.0

func (c *TableSpec) WithIndices(idxDefs []*IndexDefinition) *TableSpec

func (*TableSpec) WithSchema added in v0.9.0

func (c *TableSpec) WithSchema(schema sql.PrimaryKeySchema) *TableSpec

type TempTableOption added in v0.11.0

type TempTableOption bool
const (
	IsTempTable       TempTableOption = true
	IsTempTableAbsent TempTableOption = false
)

type TopN added in v0.12.0

type TopN struct {
	UnaryNode
	Limit         sql.Expression
	Fields        sql.SortFields
	CalcFoundRows bool
}

TopN was a sort node that has a limit. It doesn't need to buffer everything, but can calculate the top n on the fly.

func NewTopN added in v0.12.0

func NewTopN(fields sql.SortFields, limit sql.Expression, child sql.Node) *TopN

NewTopN creates a new TopN node.

func (*TopN) CheckPrivileges added in v0.12.0

func (n *TopN) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TopN) CollationCoercibility added in v0.15.0

func (n *TopN) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TopN) DebugString added in v0.12.0

func (n *TopN) DebugString() string

func (*TopN) Expressions added in v0.12.0

func (n *TopN) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*TopN) Resolved added in v0.12.0

func (n *TopN) Resolved() bool

Resolved implements the Resolvable interface.

func (*TopN) String added in v0.12.0

func (n *TopN) String() string

func (TopN) WithCalcFoundRows added in v0.12.0

func (n TopN) WithCalcFoundRows(v bool) *TopN

func (*TopN) WithChildren added in v0.12.0

func (n *TopN) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*TopN) WithExpressions added in v0.12.0

func (n *TopN) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type TransactionCommittingNode added in v0.12.0

type TransactionCommittingNode struct {
	UnaryNode
}

TransactionCommittingNode implements autocommit logic. It wraps relevant queries and ensures the database commits the transaction.

func NewTransactionCommittingNode added in v0.12.0

func NewTransactionCommittingNode(child sql.Node) *TransactionCommittingNode

NewTransactionCommittingNode returns a TransactionCommittingNode.

func (*TransactionCommittingNode) CheckPrivileges added in v0.12.0

func (t *TransactionCommittingNode) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the sql.Node interface.

func (*TransactionCommittingNode) Child added in v0.12.0

func (t *TransactionCommittingNode) Child() sql.Node

Child implements the sql.UnaryNode interface.

func (*TransactionCommittingNode) CollationCoercibility added in v0.15.0

func (*TransactionCommittingNode) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TransactionCommittingNode) DebugString added in v0.15.0

func (t *TransactionCommittingNode) DebugString() string

String implements the sql.Node interface.

func (*TransactionCommittingNode) String added in v0.12.0

func (t *TransactionCommittingNode) String() string

String implements the sql.Node interface.

func (*TransactionCommittingNode) WithChildren added in v0.12.0

func (t *TransactionCommittingNode) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type TransformedNamedNode added in v0.11.0

type TransformedNamedNode struct {
	UnaryNode
	// contains filtered or unexported fields
}

func NewTransformedNamedNode added in v0.11.0

func NewTransformedNamedNode(child sql.Node, name string) *TransformedNamedNode

TransformedNamedNode is a wrapper for arbitrary logic to represent a table factor assembled from other nodes at some point in by the analyzer. See e.g., Concat.

func (*TransformedNamedNode) CheckPrivileges added in v0.12.0

func (n *TransformedNamedNode) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TransformedNamedNode) CollationCoercibility added in v0.15.0

func (n *TransformedNamedNode) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TransformedNamedNode) DebugString added in v0.11.0

func (n *TransformedNamedNode) DebugString() string

func (*TransformedNamedNode) Name added in v0.11.0

func (n *TransformedNamedNode) Name() string

func (*TransformedNamedNode) Schema added in v0.11.0

func (n *TransformedNamedNode) Schema() sql.Schema

func (*TransformedNamedNode) String added in v0.11.0

func (n *TransformedNamedNode) String() string

func (*TransformedNamedNode) WithChildren added in v0.11.0

func (n *TransformedNamedNode) WithChildren(children ...sql.Node) (sql.Node, error)

type TriggerBeginEndBlock added in v0.9.0

type TriggerBeginEndBlock struct {
	*BeginEndBlock
}

TriggerBeginEndBlock represents a BEGIN/END block specific to TRIGGER execution, which has special considerations regarding logic execution through the RowIter function.

func NewTriggerBeginEndBlock added in v0.9.0

func NewTriggerBeginEndBlock(block *BeginEndBlock) *TriggerBeginEndBlock

NewTriggerBeginEndBlock creates a new *TriggerBeginEndBlock node.

func (*TriggerBeginEndBlock) CheckPrivileges added in v0.12.0

func (b *TriggerBeginEndBlock) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TriggerBeginEndBlock) WithChildren added in v0.9.0

func (b *TriggerBeginEndBlock) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type TriggerEvent

type TriggerEvent string

type TriggerExecutor

type TriggerExecutor struct {
	BinaryNode        // Left = wrapped node, Right = trigger execution logic
	TriggerEvent      TriggerEvent
	TriggerTime       TriggerTime
	TriggerDefinition sql.TriggerDefinition
}

TriggerExecutor is node that wraps, or is wrapped by, an INSERT, UPDATE, or DELETE node to execute defined trigger logic either before or after that operation. When a table has multiple triggers defined, TriggerExecutor nodes can wrap each other as well.

func NewTriggerExecutor

func NewTriggerExecutor(child, triggerLogic sql.Node, triggerEvent TriggerEvent, triggerTime TriggerTime, triggerDefinition sql.TriggerDefinition) *TriggerExecutor

func (*TriggerExecutor) CheckPrivileges added in v0.12.0

func (t *TriggerExecutor) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TriggerExecutor) CollationCoercibility added in v0.15.0

func (t *TriggerExecutor) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TriggerExecutor) DebugString

func (t *TriggerExecutor) DebugString() string

func (*TriggerExecutor) Schema

func (t *TriggerExecutor) Schema() sql.Schema

func (*TriggerExecutor) String

func (t *TriggerExecutor) String() string

func (*TriggerExecutor) WithChildren

func (t *TriggerExecutor) WithChildren(children ...sql.Node) (sql.Node, error)

type TriggerOrder

type TriggerOrder struct {
	PrecedesOrFollows string // PrecedesStr, FollowsStr
	OtherTriggerName  string
}

type TriggerRollback added in v0.12.0

type TriggerRollback struct {
	UnaryNode
}

TriggerRollback is a node that wraps the entire tree iff it contains a trigger, creates a savepoint, and performs a rollback if something went wrong during execution

func NewTriggerRollback added in v0.12.0

func NewTriggerRollback(child sql.Node) *TriggerRollback

func (*TriggerRollback) CheckPrivileges added in v0.12.0

func (t *TriggerRollback) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*TriggerRollback) CollationCoercibility added in v0.15.0

func (t *TriggerRollback) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*TriggerRollback) DebugString added in v0.15.0

func (t *TriggerRollback) DebugString() string

func (*TriggerRollback) String added in v0.12.0

func (t *TriggerRollback) String() string

func (*TriggerRollback) WithChildren added in v0.12.0

func (t *TriggerRollback) WithChildren(children ...sql.Node) (sql.Node, error)

type TriggerTime

type TriggerTime string
const (
	BeforeTrigger TriggerTime = "before"
	AfterTrigger              = "after"
)

type Truncate

type Truncate struct {
	UnaryNode
	// contains filtered or unexported fields
}

Truncate is a node describing the deletion of all rows from some table.

func NewTruncate

func NewTruncate(db string, table sql.Node) *Truncate

NewTruncate creates a Truncate node.

func (*Truncate) CheckPrivileges added in v0.12.0

func (p *Truncate) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Truncate) CollationCoercibility added in v0.15.0

func (*Truncate) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Truncate) DatabaseName

func (p *Truncate) DatabaseName() string

DatabaseName returns the name of the database that this operation is being performed in.

func (Truncate) DebugString

func (p Truncate) DebugString() string

DebugString implements the DebugStringer interface.

func (*Truncate) Schema

func (p *Truncate) Schema() sql.Schema

Schema implements the Node interface.

func (Truncate) String

func (p Truncate) String() string

String implements the Node interface.

func (*Truncate) WithChildren

func (p *Truncate) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type UnaryNode

type UnaryNode struct {
	Child sql.Node
}

UnaryNode is a node that has only one child.

func (UnaryNode) Children

func (n UnaryNode) Children() []sql.Node

Children implements the Node interface.

func (UnaryNode) Resolved

func (n UnaryNode) Resolved() bool

Resolved implements the Resolvable interface.

func (*UnaryNode) Schema

func (n *UnaryNode) Schema() sql.Schema

Schema implements the Node interface.

type Union

type Union struct {
	BinaryNode
	Distinct   bool
	Limit      sql.Expression
	SortFields sql.SortFields
}

Union is a node that returns everything in Left and then everything in Right

func NewUnion

func NewUnion(left, right sql.Node, distinct bool, limit sql.Expression, sortFields sql.SortFields) *Union

NewUnion creates a new Union node with the given children.

func (*Union) CheckPrivileges added in v0.12.0

func (u *Union) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Union) CollationCoercibility added in v0.15.0

func (*Union) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (Union) DebugString

func (u Union) DebugString() string

func (*Union) Expressions added in v0.14.0

func (u *Union) Expressions() []sql.Expression

func (*Union) Opaque

func (u *Union) Opaque() bool

Opaque implements the sql.OpaqueNode interface. Like SubqueryAlias, the selects in a Union must be evaluated in isolation.

func (*Union) Resolved added in v0.14.0

func (u *Union) Resolved() bool

func (*Union) Schema

func (u *Union) Schema() sql.Schema

func (Union) String

func (u Union) String() string

func (*Union) WithChildren

func (u *Union) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Union) WithDistinct added in v0.14.0

func (u *Union) WithDistinct(b bool) *Union

func (*Union) WithExpressions added in v0.14.0

func (u *Union) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

func (*Union) WithLimit added in v0.14.0

func (u *Union) WithLimit(e sql.Expression) *Union

type UnlockTables

type UnlockTables struct {
	Catalog sql.Catalog
}

UnlockTables will release all locks for the current session.

func NewUnlockTables

func NewUnlockTables() *UnlockTables

NewUnlockTables returns a new UnlockTables node.

func (*UnlockTables) CheckPrivileges added in v0.12.0

func (t *UnlockTables) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*UnlockTables) Children

func (t *UnlockTables) Children() []sql.Node

Children implements the sql.Node interface.

func (*UnlockTables) CollationCoercibility added in v0.15.0

func (*UnlockTables) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*UnlockTables) Resolved

func (t *UnlockTables) Resolved() bool

Resolved implements the sql.Node interface.

func (*UnlockTables) RowIter

func (t *UnlockTables) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (*UnlockTables) Schema

func (t *UnlockTables) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*UnlockTables) String

func (t *UnlockTables) String() string

func (*UnlockTables) WithChildren

func (t *UnlockTables) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

type UnresolvedTable

type UnresolvedTable struct {
	// contains filtered or unexported fields
}

UnresolvedTable is a table that has not been resolved yet but whose name is known.

func NewUnresolvedTable

func NewUnresolvedTable(name, db string) *UnresolvedTable

NewUnresolvedTable creates a new Unresolved table.

func NewUnresolvedTableAsOf

func NewUnresolvedTableAsOf(name, db string, asOf sql.Expression) *UnresolvedTable

NewUnresolvedTableAsOf creates a new Unresolved table with an AS OF expression.

func (*UnresolvedTable) AsOf

func (t *UnresolvedTable) AsOf() sql.Expression

AsOf implements sql.UnresolvedTable

func (*UnresolvedTable) CheckPrivileges added in v0.12.0

func (t *UnresolvedTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*UnresolvedTable) Children

func (*UnresolvedTable) Children() []sql.Node

Children implements the Node interface.

func (*UnresolvedTable) CollationCoercibility added in v0.15.0

func (*UnresolvedTable) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*UnresolvedTable) Comment added in v0.15.0

func (t *UnresolvedTable) Comment() string

func (*UnresolvedTable) Database

func (t *UnresolvedTable) Database() string

Database implements sql.UnresolvedTable

func (*UnresolvedTable) Expressions added in v0.11.0

func (t *UnresolvedTable) Expressions() []sql.Expression

func (*UnresolvedTable) Name

func (t *UnresolvedTable) Name() string

Name implements the Nameable interface.

func (*UnresolvedTable) Resolved

func (*UnresolvedTable) Resolved() bool

Resolved implements the Resolvable interface.

func (*UnresolvedTable) RowIter

func (*UnresolvedTable) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the RowIter interface.

func (*UnresolvedTable) Schema

func (*UnresolvedTable) Schema() sql.Schema

Schema implements the Node interface.

func (UnresolvedTable) String

func (t UnresolvedTable) String() string

func (*UnresolvedTable) WithAsOf

func (t *UnresolvedTable) WithAsOf(asOf sql.Expression) (sql.Node, error)

WithAsOf implements sql.UnresolvedTable

func (*UnresolvedTable) WithChildren

func (t *UnresolvedTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*UnresolvedTable) WithComment added in v0.15.0

func (t *UnresolvedTable) WithComment(s string) sql.Node

func (*UnresolvedTable) WithDatabase

func (t *UnresolvedTable) WithDatabase(database string) (*UnresolvedTable, error)

WithDatabase returns a copy of this unresolved table with its Database field set to the given value. Analagous to WithChildren.

func (*UnresolvedTable) WithExpressions added in v0.11.0

func (t *UnresolvedTable) WithExpressions(expressions ...sql.Expression) (sql.Node, error)

type Update

type Update struct {
	UnaryNode
	Checks sql.CheckConstraints
	Ignore bool
}

Update is a node for updating rows on tables.

func NewUpdate

func NewUpdate(n sql.Node, ignore bool, updateExprs []sql.Expression) *Update

NewUpdate creates an Update node.

func (*Update) CheckPrivileges added in v0.12.0

func (u *Update) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Update) CollationCoercibility added in v0.15.0

func (*Update) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Update) Database added in v0.9.0

func (u *Update) Database() string

func (*Update) DebugString

func (u *Update) DebugString() string

func (*Update) Expressions added in v0.10.0

func (u *Update) Expressions() []sql.Expression

func (*Update) Resolved added in v0.10.0

func (u *Update) Resolved() bool

func (*Update) String

func (u *Update) String() string

func (*Update) WithChildren

func (u *Update) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (Update) WithExpressions added in v0.10.0

func (u Update) WithExpressions(newExprs ...sql.Expression) (sql.Node, error)

type UpdateInfo

type UpdateInfo struct {
	Matched, Updated, Warnings int
}

UpdateInfo is the Info for OKResults returned by Update nodes.

func (UpdateInfo) String

func (ui UpdateInfo) String() string

String implements fmt.Stringer

type UpdateJoin added in v0.11.0

type UpdateJoin struct {
	Updaters map[string]sql.RowUpdater
	UnaryNode
}

func NewUpdateJoin added in v0.11.0

func NewUpdateJoin(editorMap map[string]sql.RowUpdater, child sql.Node) *UpdateJoin

NewUpdateJoin returns an *UpdateJoin node.

func (*UpdateJoin) CheckPrivileges added in v0.12.0

func (u *UpdateJoin) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*UpdateJoin) CollationCoercibility added in v0.15.0

func (u *UpdateJoin) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*UpdateJoin) GetUpdatable added in v0.11.0

func (u *UpdateJoin) GetUpdatable() sql.UpdatableTable

GetUpdatable returns an updateJoinTable which implements sql.UpdatableTable.

func (*UpdateJoin) String added in v0.11.0

func (u *UpdateJoin) String() string

String implements the sql.Node interface.

func (*UpdateJoin) WithChildren added in v0.11.0

func (u *UpdateJoin) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the sql.Node interface.

type UpdateSource

type UpdateSource struct {
	UnaryNode
	UpdateExprs []sql.Expression
	Ignore      bool
}

UpdateSource is the source of updates for an Update node. Its schema is the concatenation of the old and new rows, before and after being updated.

func NewUpdateSource

func NewUpdateSource(node sql.Node, ignore bool, updateExprs []sql.Expression) *UpdateSource

NewUpdateSource returns a new UpdateSource from the node and expressions given.

func (*UpdateSource) CheckPrivileges added in v0.12.0

func (u *UpdateSource) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*UpdateSource) CollationCoercibility added in v0.15.0

func (u *UpdateSource) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*UpdateSource) DebugString

func (u *UpdateSource) DebugString() string

func (*UpdateSource) Expressions

func (u *UpdateSource) Expressions() []sql.Expression

Expressions implements the sql.Expressioner interface.

func (*UpdateSource) GetChildSchema added in v0.15.0

func (u *UpdateSource) GetChildSchema() (sql.Schema, error)

func (*UpdateSource) Resolved

func (u *UpdateSource) Resolved() bool

Resolved implements the Resolvable interface.

func (*UpdateSource) Schema

func (u *UpdateSource) Schema() sql.Schema

Schema implements sql.Node. The schema of an update is a concatenation of the old and new rows.

func (*UpdateSource) String

func (u *UpdateSource) String() string

func (*UpdateSource) WithChildren

func (u *UpdateSource) WithChildren(children ...sql.Node) (sql.Node, error)

func (*UpdateSource) WithExpressions

func (u *UpdateSource) WithExpressions(newExprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the sql.Expressioner interface.

type Use

type Use struct {
	Catalog sql.Catalog
	// contains filtered or unexported fields
}

Use changes the current database.

func NewUse

func NewUse(db sql.Database) *Use

NewUse creates a new Use node.

func (*Use) CheckPrivileges added in v0.12.0

func (u *Use) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (Use) Children

func (Use) Children() []sql.Node

Children implements the sql.Node interface.

func (*Use) CollationCoercibility added in v0.15.0

func (*Use) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Use) Database

func (u *Use) Database() sql.Database

Database implements the sql.Databaser interface.

func (*Use) Resolved

func (u *Use) Resolved() bool

Resolved implements the sql.Node interface.

func (*Use) RowIter

func (u *Use) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the sql.Node interface.

func (Use) Schema

func (Use) Schema() sql.Schema

Schema implements the sql.Node interface.

func (*Use) String

func (u *Use) String() string

String implements the sql.Node interface.

func (*Use) WithChildren

func (u *Use) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Use) WithDatabase

func (u *Use) WithDatabase(db sql.Database) (sql.Node, error)

WithDatabase implements the sql.Databaser interface.

type UserName added in v0.12.0

type UserName struct {
	Name    string
	Host    string
	AnyHost bool
}

UserName represents either a user or role name.

func (*UserName) String added in v0.12.0

func (un *UserName) String(quote string) string

String returns the UserName as a formatted string using the quotes given. Using the default root account with the backtick as the quote, root@localhost would become `root`@`localhost`. Different quotes are used in different places in MySQL. In addition, if the quote is used in a section as part of the name, it is escaped by doubling the quote (which also mimics MySQL behavior).

type ValueDerivedTable added in v0.9.0

type ValueDerivedTable struct {
	*Values
	// contains filtered or unexported fields
}

func NewValueDerivedTable added in v0.9.0

func NewValueDerivedTable(values *Values, name string) *ValueDerivedTable

func (*ValueDerivedTable) DebugString added in v0.9.0

func (v *ValueDerivedTable) DebugString() string

func (*ValueDerivedTable) Name added in v0.9.0

func (v *ValueDerivedTable) Name() string

Name implements sql.Nameable

func (*ValueDerivedTable) Schema added in v0.9.0

func (v *ValueDerivedTable) Schema() sql.Schema

Schema implements the Node interface.

func (*ValueDerivedTable) String added in v0.9.0

func (v *ValueDerivedTable) String() string

func (*ValueDerivedTable) WithChildren added in v0.12.0

func (v *ValueDerivedTable) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (ValueDerivedTable) WithColumns added in v0.9.0

func (v ValueDerivedTable) WithColumns(columns []string) *ValueDerivedTable

func (*ValueDerivedTable) WithExpressions added in v0.9.0

func (v *ValueDerivedTable) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type Values

type Values struct {
	ExpressionTuples [][]sql.Expression
}

Values represents a set of tuples of expressions.

func NewValues

func NewValues(tuples [][]sql.Expression) *Values

NewValues creates a Values node with the given tuples.

func (*Values) CheckPrivileges added in v0.12.0

func (p *Values) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Values) Children

func (p *Values) Children() []sql.Node

Children implements the Node interface.

func (*Values) CollationCoercibility added in v0.15.0

func (*Values) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Values) DebugString

func (p *Values) DebugString() string

func (*Values) Expressions

func (p *Values) Expressions() []sql.Expression

Expressions implements the Expressioner interface.

func (*Values) Resolved

func (p *Values) Resolved() bool

Resolved implements the Resolvable interface.

func (*Values) RowIter

func (p *Values) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

RowIter implements the Node interface.

func (*Values) Schema

func (p *Values) Schema() sql.Schema

Schema implements the Node interface.

func (*Values) String

func (p *Values) String() string

func (*Values) WithChildren

func (p *Values) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the Node interface.

func (*Values) WithExpressions

func (p *Values) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the Expressioner interface.

type Versionable added in v0.15.0

type Versionable interface {
	sql.Node
	// AsOf returns this table's asof expression.
	AsOf() sql.Expression
	// WithAsOf returns a copy of this versioned table with its AsOf
	// field set to the given value. Analogous to WithChildren.
	WithAsOf(asOf sql.Expression) (sql.Node, error)
}

Versionable represents a plan that contains an AsOf expression.

type While added in v0.15.0

type While struct {
	*Loop
}

While represents the WHILE statement, which loops over a set of statements while the condition is true.

func NewWhile added in v0.15.0

func NewWhile(label string, condition sql.Expression, block *Block) *While

NewWhile returns a new *While node.

func (*While) DebugString added in v0.15.0

func (w *While) DebugString() string

DebugString implements the interface sql.DebugStringer.

func (*While) String added in v0.15.0

func (w *While) String() string

String implements the interface sql.Node.

func (*While) WithChildren added in v0.15.0

func (w *While) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements the interface sql.Node.

func (*While) WithExpressions added in v0.15.0

func (w *While) WithExpressions(exprs ...sql.Expression) (sql.Node, error)

WithExpressions implements the interface sql.Node.

type Window added in v0.9.0

type Window struct {
	SelectExprs []sql.Expression
	UnaryNode
}

func NewWindow added in v0.9.0

func NewWindow(selectExprs []sql.Expression, node sql.Node) *Window

func (*Window) CheckPrivileges added in v0.12.0

func (w *Window) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*Window) CollationCoercibility added in v0.15.0

func (w *Window) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*Window) DebugString added in v0.9.0

func (w *Window) DebugString() string

func (*Window) Expressions added in v0.9.0

func (w *Window) Expressions() []sql.Expression

Expressions implements sql.Expressioner

func (*Window) ProjectedExprs added in v0.14.0

func (w *Window) ProjectedExprs() []sql.Expression

ProjectedExprs implements sql.Projector

func (*Window) Resolved added in v0.9.0

func (w *Window) Resolved() bool

Resolved implements sql.Node

func (*Window) Schema added in v0.9.0

func (w *Window) Schema() sql.Schema

Schema implements sql.Node

func (*Window) String added in v0.9.0

func (w *Window) String() string

func (*Window) WithChildren added in v0.9.0

func (w *Window) WithChildren(children ...sql.Node) (sql.Node, error)

WithChildren implements sql.Node

func (*Window) WithExpressions added in v0.9.0

func (w *Window) WithExpressions(e ...sql.Expression) (sql.Node, error)

WithExpressions implements sql.Expressioner

func (*Window) WithProjectedExprs added in v0.14.0

func (w *Window) WithProjectedExprs(exprs ...sql.Expression) (sql.Projector, error)

WithProjectedExprs implements sql.Projector

type With added in v0.9.0

type With struct {
	UnaryNode
	CTEs      []*CommonTableExpression
	Recursive bool
}

With is a node to wrap the top-level node in a query plan so that any common table expressions can be applied in analysis. It is removed during analysis.

func NewWith added in v0.9.0

func NewWith(child sql.Node, ctes []*CommonTableExpression, recursive bool) *With

func (*With) CheckPrivileges added in v0.12.0

func (w *With) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool

CheckPrivileges implements the interface sql.Node.

func (*With) CollationCoercibility added in v0.15.0

func (w *With) CollationCoercibility(ctx *sql.Context) (collation sql.CollationID, coercibility byte)

CollationCoercibility implements the interface sql.CollationCoercible.

func (*With) DebugString added in v0.9.0

func (w *With) DebugString() string

func (*With) DisjointedChildren added in v0.15.0

func (w *With) DisjointedChildren() [][]sql.Node

DisjointedChildren implements the interface DisjointedChildrenNode.

func (*With) RowIter added in v0.9.0

func (w *With) RowIter(ctx *sql.Context, row sql.Row) (sql.RowIter, error)

func (*With) String added in v0.9.0

func (w *With) String() string

func (*With) WithChildren added in v0.9.0

func (w *With) WithChildren(children ...sql.Node) (sql.Node, error)

func (*With) WithDisjointedChildren added in v0.15.0

func (w *With) WithDisjointedChildren(children [][]sql.Node) (sql.Node, error)

WithDisjointedChildren implements the interface DisjointedChildrenNode.

Source Files

Jump to

Keyboard shortcuts

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