Documentation
¶
Index ¶
- Constants
- func Convert(postgresStmt parser.Statement) (vitess.Statement, error)
- func ConvertWithOptions(postgresStmt parser.Statement, options ConvertOptions) (vitess.Statement, error)
- func NewNoOp(warnings ...string) vitess.InjectedStatement
- func NotYetSupportedError(errorMsg string) (vitess.Statement, error)
- type Context
- type ConvertOptions
Constants ¶
const DoltCreateTablePlaceholderSequenceName = "dolt_create_table_placeholder_sequence"
DoltCreateTablePlaceholderSequenceName is a Placeholder name used in translating computed columns to generated columns that involve a sequence, used later in analysis
const UnknownColSentinelPrefix = "__?column?__"
UnknownColSentinelPrefix is prepended to the index position of unaliased string literals in a SELECT clause. This gives GMS a unique per-position alias so its alias scope map can distinguish multiple unnamed columns in the same SELECT. schemaToFieldDescriptions in doltgres_handler.go strips this prefix and returns Postgres's "?column?" placeholder on the wire.
Variables ¶
This section is empty.
Functions ¶
func ConvertWithOptions ¶ added in v1.4.0
func ConvertWithOptions(postgresStmt parser.Statement, options ConvertOptions) (vitess.Statement, error)
ConvertWithOptions converts a Postgres AST into a Vitess AST using the given options.
func NewNoOp ¶ added in v0.17.0
func NewNoOp(warnings ...string) vitess.InjectedStatement
NewNoOp returns a new NoOp statement which does nothing and issues zero or more warnings when run. Used for statements that aren't directly supported but which we don't want to cause errors.
Types ¶
type Context ¶ added in v0.14.0
type Context struct {
// contains filtered or unexported fields
}
Context contains any relevant context for the AST conversion. For example, the auth system uses the context to determine which larger statement an expression exists in, which may influence how the expression should handle authorization.
func NewContext ¶ added in v0.14.0
NewContext returns a new *Context.
func NewContextWithOptions ¶ added in v1.4.0
func NewContextWithOptions(postgresStmt parser.Statement, options ConvertOptions) *Context
NewContextWithOptions returns a new *Context using the given conversion options.
func (*Context) Auth ¶ added in v0.14.0
func (ctx *Context) Auth() *auth.AuthContext
Auth returns the portion that handles authentication.
type ConvertOptions ¶ added in v1.4.0
type ConvertOptions struct {
PermitUnsupportedLockingStatements bool
}
ConvertOptions controls optional behavior during PostgreSQL-to-Vitess AST conversion.
Source Files
¶
- aliased_table_expr.go
- alter_aggregate.go
- alter_database.go
- alter_default_privileges.go
- alter_domain.go
- alter_function.go
- alter_index.go
- alter_materialized_view.go
- alter_procedure.go
- alter_role.go
- alter_schema.go
- alter_sequence.go
- alter_table.go
- alter_type.go
- alter_view.go
- analyze.go
- backup.go
- begin_transaction.go
- call.go
- cancel_queries.go
- cancel_sessions.go
- canned_opt_plan.go
- column_table_def.go
- comment.go
- commit_transaction.go
- constraint_table_def.go
- context.go
- control_jobs.go
- control_schedules.go
- convert.go
- copy_from.go
- copy_to.go
- create_aggregate.go
- create_cast.go
- create_changefeed.go
- create_database.go
- create_domain.go
- create_extension.go
- create_function.go
- create_index.go
- create_materialized_view.go
- create_operator.go
- create_procedure.go
- create_role.go
- create_schema.go
- create_sequence.go
- create_stats.go
- create_table.go
- create_trigger.go
- create_type.go
- create_view.go
- deallocate.go
- delete.go
- discard.go
- do.go
- drop_aggregate.go
- drop_cast.go
- drop_database.go
- drop_domain.go
- drop_extension.go
- drop_function.go
- drop_index.go
- drop_operator.go
- drop_procedure.go
- drop_role.go
- drop_schema.go
- drop_sequence.go
- drop_table.go
- drop_trigger.go
- drop_type.go
- drop_view.go
- execute.go
- explain.go
- explain_analyze_debug.go
- export.go
- expr.go
- foreign_key_constraint_table_def.go
- from.go
- func_expr.go
- grant.go
- grant_role.go
- group_by.go
- import.go
- index_elem.go
- index_table_def.go
- insert.go
- json_table.go
- limit.go
- locking_clause.go
- no_op.go
- order_by.go
- paren_select.go
- prepare.go
- refresh_materialized_view.go
- release_savepoint.go
- relocate.go
- rename_column.go
- rename_database.go
- rename_index.go
- rename_table.go
- reparent_database.go
- resolvable_type_reference.go
- restore.go
- return.go
- revoke.go
- revoke_role.go
- rollback_to_savepoint.go
- rollback_transaction.go
- savepoint.go
- scatter.go
- scheduled_backup.go
- scrub.go
- select.go
- select_clause.go
- set_constraints.go
- set_session_authorization_default.go
- set_session_characteristics.go
- set_transaction.go
- set_var.go
- show_backup.go
- show_columns.go
- show_constraints.go
- show_create.go
- show_database_indexes.go
- show_databases.go
- show_enums.go
- show_fingerprints.go
- show_grants.go
- show_histogram.go
- show_indexes.go
- show_jobs.go
- show_last_query_statistics.go
- show_partitions.go
- show_queries.go
- show_role_grants.go
- show_roles.go
- show_savepoint_status.go
- show_schedules.go
- show_schemas.go
- show_sequences.go
- show_sessions.go
- show_syntax.go
- show_table_stats.go
- show_tables.go
- show_trace_for_session.go
- show_transaction_status.go
- show_transactions.go
- show_types.go
- show_users.go
- show_var.go
- split.go
- subquery.go
- table_def.go
- table_expr.go
- table_name.go
- truncate.go
- union_clause.go
- unresolved_object_name.go
- unsplit.go
- update.go
- update_expr.go
- vacuum.go
- values_clause.go
- where.go
- window.go
- with.go
- xml.go