Documentation
¶
Index ¶
- func AddDomainConstraints(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func AddImplicitPrefixLengths(_ *sql.Context, _ *analyzer.Analyzer, node sql.Node, _ *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func AssignInsertCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func AssignUpdateCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func Init()
- func InsertContextRootFinalizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func ReplaceDropTable(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func ReplaceIndexedTables(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func ReplaceSerial(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func ResolveType(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
- func TypeSanitizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, ...) (sql.Node, transform.TreeIdentity, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDomainConstraints ¶ added in v0.14.0
func AddDomainConstraints(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
AddDomainConstraints adds domain type's default value and check constraints to the destination table schema and InsertNode/Update node's checks.
func AddImplicitPrefixLengths ¶ added in v0.13.0
func AddImplicitPrefixLengths(_ *sql.Context, _ *analyzer.Analyzer, node sql.Node, _ *plan.Scope, _ analyzer.RuleSelector, _ *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
AddImplicitPrefixLengths searches the |node| tree for any nodes creating an index, and plugs in a default index prefix length for any TEXT columns in those new indexes. This rule is intended to be used for Postgres compatibility, since Postgres does not require specifying prefix lengths for TEXT columns.
func AssignInsertCasts ¶
func AssignInsertCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
AssignInsertCasts adds the appropriate assign casts for insertions.
func AssignUpdateCasts ¶
func AssignUpdateCasts(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
AssignUpdateCasts adds the appropriate assign casts for updates.
func Init ¶
func Init()
Init adds additional rules to the analyzer to handle Doltgres-specific functionality.
func InsertContextRootFinalizer ¶
func InsertContextRootFinalizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
InsertContextRootFinalizer inserts a ContextRootFinalizer node right before the transaction commits, yet after all other nodes have finished. This ensures that the ContextRootFinalizer does not overwrite any changes from its children.
func ReplaceDropTable ¶ added in v0.14.0
func ReplaceDropTable(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
ReplaceDropTable wraps a DropTable node so that it can handle ownership information.
func ReplaceIndexedTables ¶ added in v0.12.0
func ReplaceIndexedTables(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
ReplaceIndexedTables replaces Dolt tables with Doltgres tables that can properly handle indexed access.
func ReplaceSerial ¶
func ReplaceSerial(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
ReplaceSerial replaces a CreateTable node containing a SERIAL type with a node that can create sequences alongside the table.
func ResolveType ¶ added in v0.14.0
func ResolveType(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
ResolveType replaces types.ResolvableType to appropriate types.DoltgresType.
func TypeSanitizer ¶
func TypeSanitizer(ctx *sql.Context, a *analyzer.Analyzer, node sql.Node, scope *plan.Scope, selector analyzer.RuleSelector, qFlags *sql.QueryFlags) (sql.Node, transform.TreeIdentity, error)
TypeSanitizer converts all GMS types into Doltgres types. Some places, such as parameter binding, will always default to GMS types, so by taking care of all conversions here, we can ensure that Doltgres only needs to worry about its own types.
Types ¶
This section is empty.