Documentation ¶
Index ¶
- Variables
- type AlterRole
- func (c *AlterRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *AlterRole) Children() []sql.Node
- func (c *AlterRole) IsReadOnly() bool
- func (c *AlterRole) Resolved() bool
- func (c *AlterRole) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *AlterRole) Schema() sql.Schema
- func (c *AlterRole) String() string
- func (c *AlterRole) WithChildren(children ...sql.Node) (sql.Node, error)
- func (c *AlterRole) WithResolvedChildren(children []any) (any, error)
- type ContextRootFinalizer
- func (rf *ContextRootFinalizer) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (rf *ContextRootFinalizer) Child() sql.Node
- func (rf *ContextRootFinalizer) Children() []sql.Node
- func (rf *ContextRootFinalizer) DebugString() string
- func (rf *ContextRootFinalizer) IsReadOnly() bool
- func (rf *ContextRootFinalizer) Resolved() bool
- func (rf *ContextRootFinalizer) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (rf *ContextRootFinalizer) Schema() sql.Schema
- func (rf *ContextRootFinalizer) String() string
- func (rf *ContextRootFinalizer) WithChildren(children ...sql.Node) (sql.Node, error)
- type CopyFrom
- func (cf *CopyFrom) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (cf *CopyFrom) Children() []sql.Node
- func (cf *CopyFrom) IsReadOnly() bool
- func (cf *CopyFrom) Resolved() bool
- func (cf *CopyFrom) RowIter(ctx *sql.Context, _ sql.Row) (_ sql.RowIter, err error)
- func (cf *CopyFrom) Schema() sql.Schema
- func (cf *CopyFrom) String() string
- func (cf *CopyFrom) Validate(ctx *sql.Context) error
- func (cf *CopyFrom) WithChildren(children ...sql.Node) (sql.Node, error)
- func (cf *CopyFrom) WithResolvedChildren(children []any) (any, error)
- type CreateRole
- func (c *CreateRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *CreateRole) Children() []sql.Node
- func (c *CreateRole) IsReadOnly() bool
- func (c *CreateRole) Resolved() bool
- func (c *CreateRole) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *CreateRole) Schema() sql.Schema
- func (c *CreateRole) String() string
- func (c *CreateRole) WithChildren(children ...sql.Node) (sql.Node, error)
- func (c *CreateRole) WithResolvedChildren(children []any) (any, error)
- type CreateSequence
- func (c *CreateSequence) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *CreateSequence) Children() []sql.Node
- func (c *CreateSequence) IsReadOnly() bool
- func (c *CreateSequence) Resolved() bool
- func (c *CreateSequence) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *CreateSequence) Schema() sql.Schema
- func (c *CreateSequence) String() string
- func (c *CreateSequence) WithChildren(children ...sql.Node) (sql.Node, error)
- func (c *CreateSequence) WithResolvedChildren(children []any) (any, error)
- type CreateTable
- func (c *CreateTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *CreateTable) Children() []sql.Node
- func (c *CreateTable) IsReadOnly() bool
- func (c *CreateTable) Resolved() bool
- func (c *CreateTable) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *CreateTable) Schema() sql.Schema
- func (c *CreateTable) String() string
- func (c *CreateTable) WithChildren(children ...sql.Node) (sql.Node, error)
- type DiscardStatement
- func (d DiscardStatement) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (d DiscardStatement) Children() []sql.Node
- func (d DiscardStatement) IsReadOnly() bool
- func (d DiscardStatement) Resolved() bool
- func (d DiscardStatement) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (d DiscardStatement) Schema() sql.Schema
- func (d DiscardStatement) String() string
- func (d DiscardStatement) WithChildren(children ...sql.Node) (sql.Node, error)
- func (d DiscardStatement) WithResolvedChildren(children []any) (any, error)
- type DropRole
- func (c *DropRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *DropRole) Children() []sql.Node
- func (c *DropRole) IsReadOnly() bool
- func (c *DropRole) Resolved() bool
- func (c *DropRole) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *DropRole) Schema() sql.Schema
- func (c *DropRole) String() string
- func (c *DropRole) WithChildren(children ...sql.Node) (sql.Node, error)
- func (c *DropRole) WithResolvedChildren(children []any) (any, error)
- type DropSequence
- func (c *DropSequence) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
- func (c *DropSequence) Children() []sql.Node
- func (c *DropSequence) IsReadOnly() bool
- func (c *DropSequence) Resolved() bool
- func (c *DropSequence) RowIter(ctx *sql.Context, r sql.Row) (sql.RowIter, error)
- func (c *DropSequence) Schema() sql.Schema
- func (c *DropSequence) String() string
- func (c *DropSequence) WithChildren(children ...sql.Node) (sql.Node, error)
- func (c *DropSequence) WithResolvedChildren(children []any) (any, error)
Constants ¶
This section is empty.
Variables ¶
var ErrVitessChildCount = errors.NewKind("invalid vitess child count, expected `%d` but got `%d`")
ErrVitessChildCount is returned by WithResolvedChildren to indicate that the expected child count is incorrect.
Functions ¶
This section is empty.
Types ¶
type AlterRole ¶ added in v0.13.0
AlterRole handles the ALTER ROLE and ALTER USER statements (ALTER USER is an alias).
func (*AlterRole) CheckPrivileges ¶ added in v0.13.0
func (c *AlterRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*AlterRole) IsReadOnly ¶ added in v0.13.0
IsReadOnly implements the interface sql.ExecSourceRel.
func (*AlterRole) WithChildren ¶ added in v0.13.0
WithChildren implements the interface sql.ExecSourceRel.
type ContextRootFinalizer ¶
type ContextRootFinalizer struct {
// contains filtered or unexported fields
}
ContextRootFinalizer is a node that finalizes any changes persisted within the context.
func NewContextRootFinalizer ¶
func NewContextRootFinalizer(child sql.Node) *ContextRootFinalizer
NewContextRootFinalizer returns a new *ContextRootFinalizer.
func (*ContextRootFinalizer) CheckPrivileges ¶
func (rf *ContextRootFinalizer) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) Child ¶
func (rf *ContextRootFinalizer) Child() sql.Node
Child returns the single child of this node
func (*ContextRootFinalizer) Children ¶
func (rf *ContextRootFinalizer) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) DebugString ¶
func (rf *ContextRootFinalizer) DebugString() string
func (*ContextRootFinalizer) IsReadOnly ¶
func (rf *ContextRootFinalizer) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) Resolved ¶
func (rf *ContextRootFinalizer) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) Schema ¶
func (rf *ContextRootFinalizer) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) String ¶
func (rf *ContextRootFinalizer) String() string
String implements the interface sql.ExecSourceRel.
func (*ContextRootFinalizer) WithChildren ¶
WithChildren implements the interface sql.ExecSourceRel.
type CopyFrom ¶ added in v0.12.0
type CopyFrom struct { DatabaseName string TableName doltdb.TableName File string Stdin bool Columns tree.NameList CopyOptions tree.CopyOptions }
CopyFrom handles the COPY ... FROM ... statement.
func NewCopyFrom ¶ added in v0.12.0
func NewCopyFrom(databaseName string, tableName doltdb.TableName, options tree.CopyOptions, fileName string, stdin bool, columns tree.NameList) *CopyFrom
NewCopyFrom returns a new *CopyFrom.
func (*CopyFrom) CheckPrivileges ¶ added in v0.12.0
func (cf *CopyFrom) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*CopyFrom) IsReadOnly ¶ added in v0.12.0
IsReadOnly implements the interface sql.ExecSourceRel.
func (*CopyFrom) Validate ¶ added in v0.12.0
Validate returns an error if the CopyFrom node is invalid, for example if it contains columns that are not in the table schema.
TODO: This validation logic should be hooked into the analyzer so that it can be run in a consistent way.
func (*CopyFrom) WithChildren ¶ added in v0.12.0
WithChildren implements the interface sql.ExecSourceRel.
type CreateRole ¶ added in v0.13.0
type CreateRole struct { Name string IfNotExists bool Password string // PASSWORD 'password' IsPasswordNull bool // PASSWORD NULL IsSuperUser bool // SUPERUSER | NOSUPERUSER CanCreateDB bool // CREATEDB | NOCREATEDB CanCreateRoles bool // CREATEROLE | NOCREATEROLE InheritPrivileges bool // INHERIT | NOINHERIT CanLogin bool // LOGIN | NOLOGIN IsReplicationRole bool // REPLICATION | NOREPLICATION CanBypassRowLevelSecurity bool // BYPASSRLS | NOBYPASSRLS ConnectionLimit int32 // CONNECTION LIMIT connlimit ValidUntil string // VALID UNTIL 'timestamp' IsValidUntilSet bool AddToRoles []string // IN ROLE role_name [, ...] AddAsMembers []string // ROLE role_name [, ...] AddAsAdminMembers []string // ADMIN role_name [, ...] }
CreateRole handles the CREATE ROLE and CREATE USER statements (CREATE USER is an alias).
func (*CreateRole) CheckPrivileges ¶ added in v0.13.0
func (c *CreateRole) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*CreateRole) Children ¶ added in v0.13.0
func (c *CreateRole) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (*CreateRole) IsReadOnly ¶ added in v0.13.0
func (c *CreateRole) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (*CreateRole) Resolved ¶ added in v0.13.0
func (c *CreateRole) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (*CreateRole) Schema ¶ added in v0.13.0
func (c *CreateRole) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (*CreateRole) String ¶ added in v0.13.0
func (c *CreateRole) String() string
String implements the interface sql.ExecSourceRel.
func (*CreateRole) WithChildren ¶ added in v0.13.0
WithChildren implements the interface sql.ExecSourceRel.
func (*CreateRole) WithResolvedChildren ¶ added in v0.13.0
func (c *CreateRole) WithResolvedChildren(children []any) (any, error)
WithResolvedChildren implements the interface vitess.Injectable.
type CreateSequence ¶
type CreateSequence struct {
// contains filtered or unexported fields
}
CreateSequence handles the CREATE SEQUENCE statement, along with SERIAL type definitions.
func NewCreateSequence ¶
func NewCreateSequence(ifNotExists bool, schema string, sequence *sequences.Sequence) *CreateSequence
NewCreateSequence returns a new *CreateSequence.
func (*CreateSequence) CheckPrivileges ¶
func (c *CreateSequence) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*CreateSequence) Children ¶
func (c *CreateSequence) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (*CreateSequence) IsReadOnly ¶
func (c *CreateSequence) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (*CreateSequence) Resolved ¶
func (c *CreateSequence) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (*CreateSequence) Schema ¶
func (c *CreateSequence) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (*CreateSequence) String ¶
func (c *CreateSequence) String() string
String implements the interface sql.ExecSourceRel.
func (*CreateSequence) WithChildren ¶
WithChildren implements the interface sql.ExecSourceRel.
func (*CreateSequence) WithResolvedChildren ¶
func (c *CreateSequence) WithResolvedChildren(children []any) (any, error)
WithResolvedChildren implements the interface vitess.Injectable.
type CreateTable ¶
type CreateTable struct {
// contains filtered or unexported fields
}
CreateTable is a node that implements functionality specifically relevant to Doltgres' table creation needs.
func NewCreateTable ¶
func NewCreateTable(createTable *plan.CreateTable, sequences []*CreateSequence) *CreateTable
NewCreateTable returns a new *CreateTable.
func (*CreateTable) CheckPrivileges ¶
func (c *CreateTable) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*CreateTable) Children ¶
func (c *CreateTable) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (*CreateTable) IsReadOnly ¶
func (c *CreateTable) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (*CreateTable) Resolved ¶
func (c *CreateTable) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (*CreateTable) Schema ¶
func (c *CreateTable) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (*CreateTable) String ¶
func (c *CreateTable) String() string
String implements the interface sql.ExecSourceRel.
func (*CreateTable) WithChildren ¶
WithChildren implements the interface sql.ExecSourceRel.
type DiscardStatement ¶ added in v0.11.0
type DiscardStatement struct{}
DiscardStatement is just a marker type, since all functionality is handled by the connection handler, rather than the engine. It has to conform to the sql.ExecSourceRel interface to be used in the handler, but this functionality is all unused.
func (DiscardStatement) CheckPrivileges ¶ added in v0.11.0
func (d DiscardStatement) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (DiscardStatement) Children ¶ added in v0.11.0
func (d DiscardStatement) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (DiscardStatement) IsReadOnly ¶ added in v0.11.0
func (d DiscardStatement) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (DiscardStatement) Resolved ¶ added in v0.11.0
func (d DiscardStatement) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (DiscardStatement) RowIter ¶ added in v0.11.0
RowIter implements the interface sql.ExecSourceRel.
func (DiscardStatement) Schema ¶ added in v0.11.0
func (d DiscardStatement) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (DiscardStatement) String ¶ added in v0.11.0
func (d DiscardStatement) String() string
String implements the interface sql.ExecSourceRel.
func (DiscardStatement) WithChildren ¶ added in v0.11.0
WithChildren implements the interface sql.ExecSourceRel.
func (DiscardStatement) WithResolvedChildren ¶ added in v0.11.0
func (d DiscardStatement) WithResolvedChildren(children []any) (any, error)
WithResolvedChildren implements the interface vitess.Injectable.
type DropRole ¶ added in v0.13.0
DropRole handles the DROP ROLE statement.
func (*DropRole) CheckPrivileges ¶ added in v0.13.0
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*DropRole) IsReadOnly ¶ added in v0.13.0
IsReadOnly implements the interface sql.ExecSourceRel.
func (*DropRole) WithChildren ¶ added in v0.13.0
WithChildren implements the interface sql.ExecSourceRel.
type DropSequence ¶
type DropSequence struct {
// contains filtered or unexported fields
}
DropSequence handles the DROP SEQUENCE statement.
func NewDropSequence ¶
func NewDropSequence(ifExists bool, schema string, sequence string, cascade bool) *DropSequence
NewDropSequence returns a new *DropSequence.
func (*DropSequence) CheckPrivileges ¶
func (c *DropSequence) CheckPrivileges(ctx *sql.Context, opChecker sql.PrivilegedOperationChecker) bool
CheckPrivileges implements the interface sql.ExecSourceRel.
func (*DropSequence) Children ¶
func (c *DropSequence) Children() []sql.Node
Children implements the interface sql.ExecSourceRel.
func (*DropSequence) IsReadOnly ¶
func (c *DropSequence) IsReadOnly() bool
IsReadOnly implements the interface sql.ExecSourceRel.
func (*DropSequence) Resolved ¶
func (c *DropSequence) Resolved() bool
Resolved implements the interface sql.ExecSourceRel.
func (*DropSequence) Schema ¶
func (c *DropSequence) Schema() sql.Schema
Schema implements the interface sql.ExecSourceRel.
func (*DropSequence) String ¶
func (c *DropSequence) String() string
String implements the interface sql.ExecSourceRel.
func (*DropSequence) WithChildren ¶
WithChildren implements the interface sql.ExecSourceRel.
func (*DropSequence) WithResolvedChildren ¶
func (c *DropSequence) WithResolvedChildren(children []any) (any, error)
WithResolvedChildren implements the interface vitess.Injectable.