package
0.0.9
Repository: https://github.com/herry2038/go-mysqlstack.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
Package visitorgen is responsible for taking the ast.go of Vitessand producing visitor infrastructure for it.

# Functions

Append appends the SQLNode to the buffer.
Backtick produces a backticked literal given an input string.
BuildParsedQuery builds a ParsedQuery from the input.
CheckIndexAlgorithm use to check if the string value matches a supported value.
CheckIndexLock use to check if the string value matches a supported value.
CloneExpr used to copy a new Expr.
CloneSelectExpr used to copy a new SelectExpr.
EncodeValue encodes one bind variable value into the query.
ExtractCommentDirectives parses the comment list for any execution directives of the form: /*vt+ OPTION_ONE=1 OPTION_TWO OPTION_THREE=abcd */ It returns the map of the directive values or nil if there aren't any.
ExtractMysqlComment extracts the version and SQL from a comment-only query such as /*!50708 sql here */.
FetchBindVar resolves the bind variable by fetching it from bindVariables.
FormatImpossibleQuery creates an impossible query in a TrackedBuffer.
GetBindvars returns a map of the bind vars referenced in the statement.
GetTableName returns the table name from the SimpleTableExpr only if it's a simple expression.
IsColName returns true if the Expr is a *ColName.
IsDML returns true if the query is an INSERT, UPDATE or DELETE statement.
IsNull returns true if the Expr is SQL NULL.
IsSimpleTuple returns true if the Expr is a ValTuple that contains simple values or if it's a list arg.
IsValue returns true if the Expr is a string, integral or value arg.
NewColIdent makes a new ColIdent.
NewFloatVal builds a new FloatVal.
NewHexNum builds a new HexNum.
NewHexVal builds a new HexVal.
NewIndexOptions use to create IndexOptions.
NewIntVal builds a new IntVal.
NewParsedQuery returns a ParsedQuery of the ast.
NewPlanValue builds a sqltypes.PlanValue from an Expr.
NewStringTokenizer creates a new Tokenizer for the sql string.
NewStrVal builds a new StrVal.
NewStrValWithoutQuote builds a new string that will be output without quote later in Format.
NewTableIdent creates a new TableIdent.
NewTrackedBuffer creates a new TrackedBuffer.
NewValArg builds a new ValArg.
NewWhere creates a WHERE or HAVING clause out of a Expr.
Normalize changes the statement to use bind values, and updates the bind vars to those values.
Parse parses the sql and returns a Statement, which is the AST representation of the query.
ParseStrictDDL is the same as Parse except it errors on partially parsed DDL statements.
Preview analyzes the beginning of the query using a simpler and faster textual comparison to identify the statement type.
ReplaceExpr finds the from expression from root and replaces it with to.
Rewrite traverses a syntax tree recursively, starting with root, and calling pre and post for each node as described below.
SkipQueryPlanCacheDirective returns true if skip query plan cache directive is set to true in query.
SplitMarginComments pulls out any leading or trailing comments from a raw sql query.
String returns a string representation of an SQLNode.
StringIn is a convenience function that returns true if str matches any of the values.
StripComments removes all comments from the string regardless of where they occur.
StripLeadingComments trims the SQL string and removes any leading comments.
StrToLower use to convert str to lower string.
Walk calls visit on every node.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Order.Direction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BeginTxnStr represents the txn begin.
No description provided by the author
RangeCond.Operator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BinaryExpr.Operator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MatchExpr.Option.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
this string is "character set" and this comment is required.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ColKeyPrimary enum.
ColKeyPrimaryNone enum.
ColKeyUniqueKey enum.
ColKeyUniqueNone enum.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Autoincrement enum.
CollateOption enum.
Comment enum.
Default enum.
ColumnFormatOption enum.
PrimarykeyOption enum.
UniquekeyOption enum.
No description provided by the author
NotNull enum.
OnUpdate enum.
ColumnStorageOption enum.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CommitTxnStr represents the txn commit.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DDL strings.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DirectiveMultiShardAutocommit is the query comment directive to allow single round trip autocommit with a multi-shard statement.
DirectiveQueryTimeout sets a query timeout in vtgate.
DirectiveScatterErrorsAsWarnings enables partial success scatter select queries.
DirectiveSkipQueryPlanCache skips query plan cache when set.
No description provided by the author
No description provided by the author
No description provided by the author
Select.Distinct.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ComparisonExpr.Operator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are the possible Valtype values.
No description provided by the author
No description provided by the author
No description provided by the author
Select.Lock.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are the possible Valtype values.
No description provided by the author
These are the possible Valtype values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IndexOptionAlgorithm is 'algorithm' enum.
IndexOptionBlockSize is 'key_block_size' enum.
IndexOptionComment is 'comment' enum.
IndexOptionLock is 'lock' enum.
IndexOptionNone enum.
IndexOptionParser is 'with parser' enum.
IndexOptionUsing is 'using' enum.
Index key type strings.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InsertStr represents insert action.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are the possible Valtype values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IsExpr.Operator.
No description provided by the author
No description provided by the author
No description provided by the author
JoinTableExpr.Join.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Transaction isolation levels.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReplaceStr represents replace action.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RollbackTxnStr represents the txn rollback.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Set.Scope or Show.Scope.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The following constants represent SHOW statements.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Select.Cache.
No description provided by the author
No description provided by the author
StartTxnStr represents the txn start transaction.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
These constants are used to identify the SQL statement type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are the possible Valtype values.
These are the possible Valtype values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Transaction access mode.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Union.Type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnaryExpr.Operator.
No description provided by the author
Index hints.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These are the possible Valtype values.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Where.Type.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Aggregates is a map of all aggregate functions.

# Structs

No description provided by the author
No description provided by the author
Expressions.
Expressions.
Expressions.
Statements.
ColIdent is a case insensitive SQL identifier.
Expressions.
Expressions.
ColumnDefinition describes a column in a CREATE TABLE statement.
No description provided by the author
No description provided by the author
ColumnType represents a sql type in a CREATE TABLE statement All optional fields are nil if not specified.
Expressions.
Expressions.
ConvertType represents the type in call to CONVERT(expr, type).
Expressions.
A Cursor describes a node encountered during Apply.
DatabaseOption represents database option.
No description provided by the author
Statements.
Expressions.
Statements.
Expressions.
Statements.
Expressions.
Expressions.
IndexColumn describes a column in an index definition with optional length.
IndexDefinition describes an index in a CREATE TABLE statement.
IndexHints represents a list of index hints.
IndexOption represents the index options.
IndexOptions is used by IndexOpts.
Statements.
Expressions.
Expressions.
No description provided by the author
Statements.
LengthScaleOption is used for types that have an optional length and scale.
Limit represents a LIMIT clause.
Statements.
MarginComments holds the leading and trailing comments that surround a query.
Expressions.
No description provided by the author
Expressions.
Expressions.
NumVal represents numval tuple.
No description provided by the author
Order represents an ordering expression.
Expressions.
Statements.
Statements.
Statements.
Expressions.
Statements.
No description provided by the author
ParsedQuery represents a parsed query where bind locations are precompued for fast substitutions.
PartitionDefinition defines a single partition.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Statements.
Expressions.
Statements.
Statements.
SetExpr represents a set expression.
Statements.
ShowFilter is show tables filter.
Expressions.
No description provided by the author
No description provided by the author
TableIdent is a case sensitive SQL identifier.
No description provided by the author
TableOption represents the table options.
No description provided by the author
TableOptions is used by TableSpec.
TableSpec describes the structure of a table from a CREATE TABLE statement.
Tokenizer is the struct used to generate SQL tokens for the parser.
TrackedBuffer is used to rebuild a query from the ast.
Statements.
TupleEqualityList is for generating equality constraints for tables that have composite primary keys.
No description provided by the author
Expressions.
Statements.
Statements.
UpdateExpr represents an update expression.
Statements.
Expressions.
When represents a WHEN sub-expression.
Where represents a WHERE or HAVING clause.
Statements.

# Interfaces

Expressions.
Encodable defines the interface for types that can be custom-encoded into SQL.
Expressions.
No description provided by the author
No description provided by the author
No description provided by the author
Statements.
No description provided by the author
No description provided by the author
SQLNode defines the interface for all nodes generated by the parser.
Statements.
No description provided by the author

# Type aliases

An ApplyFunc is invoked by Rewrite for each node n, even if n is nil, before and/or after the node's children, using a Cursor describing the current node and providing operations on it.
Expressions.
No description provided by the author
ColumnPrimaryKeyOption indicates whether or not the given column is defined as an index element and contains the type of the option.
Columns represents an insert column list.
ColumnUniqueKeyOption indicates whether or not the given column is defined as an index element and contains the type of the option.
CommentDirectives is the parsed representation for execution directives conveyed in query comments.
Comments represents a list of comments.
Exprs represents a list of value expressions.
GroupBy represents a GROUP BY clause.
IndexOptionType is the type for IndexOption.
InsertValues is a custom SQL encoder for the values of an insert statement.
Expressions.
NodeFormatter defines the signature of a custom node formatter function that can be given to TrackedBuffer for code generation.
OnDup represents an ON DUPLICATE KEY clause.
OrderBy represents an ORDER By clause.
PartitionDefinitions specifies the partition options.
SelectExprs represents SELECT expressions.
SetExprs represents a list of set expressions.
TableExprs represents a list of table expressions.
TableNames is a list of TableName.
TableOptionType is the type for table_options.
UpdateExprs represents a list of update expressions.
Expressions.
ValType specifies the type for SQLVal.
No description provided by the author
Visit defines the signature of a function that can be used to visit all nodes of a parse tree.