Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + const ACTION + const ACTIVE + const ADD + const ADMIN + const AGAINST + const ALL + const ALTER + const ANALYZE + const AND + const APPROXNUM + const ARRAY + const AS + const ASC + const AT_AT_ID + const AT_ID + const AUTO_INCREMENT + const AddAutoIncStr + const AddColVindexStr + const AddSequenceStr + const AddVschemaTableStr + const AlterStr + const AscScr + const BEGIN + const BETWEEN + const BIGINT + const BINARY + const BIT + const BIT_LITERAL + const BLOB + const BOOL + const BOOLEAN + const BUCKETS + const BY + const BangStr + const BetweenStr + const BinaryStr + const BitAndStr + const BitOrStr + const BitVal + const BitXorStr + const BooleanModeStr + const CASCADE + const CASE + const CAST + const CHAR + const CHARACTER + const CHARSET + const CHECK + const CLONE + const COLLATE + const COLLATION + const COLUMN + const COLUMNS + const COMMENT + const COMMENT_KEYWORD + const COMMIT + const COMMITTED + const COMPONENT + const CONSTRAINT + const CONVERT + const CREATE + const CROSS + const CUME_DIST + const CURRENT_DATE + const CURRENT_TIME + const CURRENT_TIMESTAMP + const CharacterSetStr + const CharsetStr + const CreateStr + const CreateVindexStr + const DATABASE + const DATABASES + const DATE + const DATETIME + const DBVarName + const DECIMAL + const DEFAULT + const DEFINITION + const DELETE + const DENSE_RANK + const DESC + const DESCRIBE + const DESCRIPTION + const DISTINCT + const DISTINCTROW + const DIV + const DOUBLE + const DROP + const DUPLICATE + const DescScr + const DirectiveMultiShardAutocommit + const DirectiveQueryTimeout + const DirectiveScatterErrorsAsWarnings + const DirectiveSkipQueryPlanCache + const DistinctStr + const DivStr + const DoubleAt + const DropColVindexStr + const DropStr + const DropVindexStr + const DropVschemaTableStr + const ELSE + const EMPTY + const END + const ENFORCED + const ENGINES + const ENUM + const ESCAPE + const EXCEPT + const EXCLUDE + const EXISTS + const EXPANSION + const EXPLAIN + const EqualStr + const FALSE + const FIELDS + const FIRST_VALUE + const FLOAT + const FLOAT_TYPE + const FLUSH + const FOLLOWING + const FOR + const FORCE + const FOREIGN + const FROM + const FULL + const FULLTEXT + const FloatVal + const FlushStr + const ForUpdateStr + const ForceStr + const FoundRowsName + const GE + const GEOMCOLLECTION + const GEOMETRY + const GEOMETRYCOLLECTION + const GET_MASTER_PUBLIC_KEY + const GLOBAL + const GROUP + const GROUPING + const GROUPS + const GROUP_CONCAT + const GlobalStr + const GreaterEqualStr + const GreaterThanStr + const HAVING + const HEX + const HEXNUM + const HISTOGRAM + const HISTORY + const HavingStr + const HexNum + const HexVal + const ID + const IF + const IGNORE + const IN + const INACTIVE + const INDEX + const INNER + const INSERT + const INT + const INTEGER + const INTEGRAL + const INTERVAL + const INTNUM + const INTO + const INVISIBLE + const IS + const ISOLATION + const IgnoreStr + const ImplicitStr + const InStr + const InsertStr + const IntDivStr + const IntVal + const IsFalseStr + const IsNotFalseStr + const IsNotNullStr + const IsNotTrueStr + const IsNullStr + const IsTrueStr + const IsolationLevelReadCommitted + const IsolationLevelReadUncommitted + const IsolationLevelRepeatableRead + const IsolationLevelSerializable + const JOIN + const JSON + const JSONExtractOp + const JSONUnquoteExtractOp + const JSON_EXTRACT_OP + const JSON_TABLE + const JSON_UNQUOTE_EXTRACT_OP + const JoinStr + const KEY + const KEYS + const KEY_BLOCK_SIZE + const LAG + const LANGUAGE + const LAST_INSERT_ID + const LAST_VALUE + const LATERAL + const LE + const LEAD + const LEFT + const LESS + const LEVEL + const LEX_ERROR + const LIKE + const LIMIT + const LINESTRING + const LIST_ARG + const LOCALTIME + const LOCALTIMESTAMP + const LOCK + const LOCKED + const LONGBLOB + const LONGTEXT + const LastInsertIDName + const LeftJoinStr + const LessEqualStr + const LessThanStr + const LikeStr + const MASTER_COMPRESSION_ALGORITHMS + const MASTER_PUBLIC_KEY_PATH + const MASTER_TLS_CIPHERSUITES + const MASTER_ZSTD_COMPRESSION_LEVEL + const MATCH + const MAXVALUE + const MEDIUMBLOB + const MEDIUMINT + const MEDIUMTEXT + const MEMBER + const MOD + const MODE + const MULTILINESTRING + const MULTIPOINT + const MULTIPOLYGON + const MinusStr + const ModStr + const MultStr + const NAMES + const NATURAL + const NCHAR + const NE + const NESTED + const NETWORK_NAMESPACE + const NEXT + const NO + const NOT + const NOWAIT + const NTH_VALUE + const NTILE + const NULL + const NULLS + const NULLX + const NULL_SAFE_EQUAL + const NUMERIC + const NaturalJoinStr + const NaturalLanguageModeStr + const NaturalLanguageModeWithQueryExpansionStr + const NaturalLeftJoinStr + const NaturalRightJoinStr + const NoAt + const NotBetweenStr + const NotEqualStr + const NotInStr + const NotLikeStr + const NotRegexpStr + const NullSafeEqualStr + const OF + const OFF + const OFFSET + const OJ + const OLD + const ON + const ONLY + const OPTIMIZE + const OPTIONAL + const OR + const ORDER + const ORDINALITY + const ORGANIZATION + const OTHERS + const OUTER + const OVER + const PARTITION + const PATH + const PERCENT_RANK + const PERSIST + const PERSIST_ONLY + const PLUGINS + const POINT + const POLYGON + const PRECEDING + const PRIMARY + const PRIVILEGE_CHECKS_USER + const PROCEDURE + const PROCESS + const PROCESSLIST + const PlusStr + const QUERY + const QueryExpansionStr + const RANDOM + const RANK + const READ + const REAL + const RECURSIVE + const REFERENCE + const REFERENCES + const REGEXP + const RENAME + const REORGANIZE + const REPAIR + const REPEATABLE + const REPLACE + const REQUIRE_ROW_FORMAT + const RESOURCE + const RESPECT + const RESTART + const RESTRICT + const RETAIN + const REUSE + const RIGHT + const ROLE + const ROLLBACK + const ROW_NUMBER + const RegexpStr + const RenameStr + const ReorganizeStr + const ReplaceStr + const RightJoinStr + const SCHEMA + const SECONDARY + const SECONDARY_ENGINE + const SECONDARY_LOAD + const SECONDARY_UNLOAD + const SELECT + const SEPARATOR + const SEQUENCE + const SERIALIZABLE + const SESSION + const SET + const SHARE + const SHIFT_LEFT + const SHIFT_RIGHT + const SHOW + const SIGNED + const SKIP + const SMALLINT + const SPATIAL + const SQLCacheStr + const SQLNoCacheStr + const SQL_CACHE + const SQL_NO_CACHE + const SRID + const START + const STATUS + const STRAIGHT_JOIN + const STREAM + const STRING + const SUBSTR + const SUBSTRING + const SYSTEM + const SessionStr + const ShareModeStr + const ShiftLeftStr + const ShiftRightStr + const SingleAt + const StrVal + const StraightJoinHint + const StraightJoinStr + const TABLE + const TABLES + const TEXT + const THAN + const THEN + const THREAD_PRIORITY + const TIES + const TIME + const TIMESTAMP + const TIMESTAMPADD + const TIMESTAMPDIFF + const TINYBLOB + const TINYINT + const TINYTEXT + const TO + const TRANSACTION + const TRIGGER + const TRUE + const TRUNCATE + const TildaStr + const TransactionStr + const TruncateStr + const TxReadOnly + const TxReadWrite + const UBinaryStr + const UMinusStr + const UNARY + const UNBOUNDED + const UNCOMMITTED + const UNDERSCORE_BINARY + const UNDERSCORE_UTF8MB4 + const UNION + const UNIQUE + const UNLOCK + const UNSIGNED + const UNUSED + const UPDATE + const UPlusStr + const USE + const USING + const UTC_DATE + const UTC_TIME + const UTC_TIMESTAMP + const UnionAllStr + const UnionDistinctStr + const UnionStr + const UseStr + const UserDefinedVariableName + const Utf8mb4Str + const VALUE + const VALUES + const VALUE_ARG + const VARBINARY + const VARCHAR + const VARIABLES + const VCPU + const VIEW + const VINDEX + const VINDEXES + const VISIBLE + const VITESS_METADATA + const VSCHEMA + const ValArg + const VariableStr + const VindexOwnerStr + const VitessMetadataStr + const WARNINGS + const WHEN + const WHERE + const WINDOW + const WITH + const WRITE + const WhereStr + const YEAR + const ZEROFILL + var Aggregates = map[string]bool + var ErrEmpty = errors.New("empty statement") + var TruncateErrLen = flag.Int("sql-max-length-errors", 0, ...) + var TruncateUILen = flag.Int("sql-max-length-ui", 512, ...) + func Append(buf *strings.Builder, node SQLNode) + func EncodeValue(buf *strings.Builder, value *querypb.BindVariable) + func ExtractMysqlComment(sql string) (version string, innerSQL string) + func ExtractSetValues(sql string) (keyValues map[SetKey]interface{}, scope string, err error) + func FetchBindVar(name string, bindVariables map[string]*querypb.BindVariable) (val *querypb.BindVariable, isList bool, err error) + func FormatImpossibleQuery(buf *TrackedBuffer, node SQLNode) + func GetBindvars(stmt Statement) map[string]struct + func IsColName(node Expr) bool + func IsDML(sql string) bool + func IsNull(node Expr) bool + func IsSimpleTuple(node Expr) bool + func IsValue(node Expr) bool + func KeywordString(id int) string + func LikeToRegexp(likeExpr string) *regexp.Regexp + func NewPlanValue(node Expr) (sqltypes.PlanValue, error) + func Normalize(stmt Statement, bindVars map[string]*querypb.BindVariable, prefix string) + func ParseTokenizer(tokenizer *Tokenizer) int + func RedactSQLQuery(sql string) (string, error) + func SkipQueryPlanCacheDirective(stmt Statement) bool + func SplitStatement(blob string) (string, string, error) + func SplitStatementToPieces(blob string) (pieces []string, err error) + func String(node SQLNode) string + func StripComments(sql string) string + func StripLeadingComments(sql string) string + func TruncateForLog(query string) string + func TruncateForUI(query string) string + func Walk(visit Visit, nodes ...SQLNode) error + type AliasedExpr struct + As ColIdent + Expr Expr + func (node *AliasedExpr) Format(buf *TrackedBuffer) + type AliasedTableExpr struct + As TableIdent + Expr SimpleTableExpr + Hints *IndexHints + Partitions Partitions + func (node *AliasedTableExpr) Format(buf *TrackedBuffer) + func (node *AliasedTableExpr) RemoveHints() *AliasedTableExpr + type AndExpr struct + Left Expr + Right Expr + func (node *AndExpr) Format(buf *TrackedBuffer) + type ApplyFunc func(*Cursor) bool + type AutoIncSpec struct + Column ColIdent + Sequence TableName + func (node *AutoIncSpec) Format(buf *TrackedBuffer) + type Begin struct + func (node *Begin) Format(buf *TrackedBuffer) + type BinaryExpr struct + Left Expr + Operator string + Right Expr + func (node *BinaryExpr) Format(buf *TrackedBuffer) + type BindVarNeeds struct + NeedDatabase bool + NeedFoundRows bool + NeedLastInsertID bool + NeedUserDefinedVariables bool + type BoolVal bool + func (node BoolVal) Format(buf *TrackedBuffer) + type CaseExpr struct + Else Expr + Expr Expr + Whens []*When + func (node *CaseExpr) Format(buf *TrackedBuffer) + type ColIdent struct + func NewColIdent(str string) ColIdent + func NewColIdentWithAt(str string, at atCount) ColIdent + func (node *ColIdent) UnmarshalJSON(b []byte) error + func (node ColIdent) CompliantName() string + func (node ColIdent) Equal(in ColIdent) bool + func (node ColIdent) EqualString(str string) bool + func (node ColIdent) Format(buf *TrackedBuffer) + func (node ColIdent) IsEmpty() bool + func (node ColIdent) Lowered() string + func (node ColIdent) MarshalJSON() ([]byte, error) + func (node ColIdent) String() string + type ColName struct + Metadata interface{} + Name ColIdent + Qualifier TableName + func (node *ColName) Equal(c *ColName) bool + func (node *ColName) Format(buf *TrackedBuffer) + type ColTuple interface + type CollateExpr struct + Charset string + Expr Expr + func (node *CollateExpr) Format(buf *TrackedBuffer) + type ColumnDefinition struct + Name ColIdent + Type ColumnType + func (col *ColumnDefinition) Format(buf *TrackedBuffer) + type ColumnKeyOption int + type ColumnType struct + Autoincrement BoolVal + Charset string + Collate string + Comment *SQLVal + Default Expr + EnumValues []string + KeyOpt ColumnKeyOption + Length *SQLVal + NotNull BoolVal + OnUpdate Expr + Scale *SQLVal + Type string + Unsigned BoolVal + Zerofill BoolVal + func (ct *ColumnType) DescribeType() string + func (ct *ColumnType) Format(buf *TrackedBuffer) + func (ct *ColumnType) SQLType() querypb.Type + type Columns []ColIdent + func (node Columns) FindColumn(col ColIdent) int + func (node Columns) Format(buf *TrackedBuffer) + type CommentDirectives map[string]interface + func (d CommentDirectives) IsSet(key string) bool + func ExtractCommentDirectives(comments Comments) CommentDirectives + type Comments [][]byte + func (node Comments) Format(buf *TrackedBuffer) + type Commit struct + func (node *Commit) Format(buf *TrackedBuffer) + type ComparisonExpr struct + Escape Expr + Left Expr + Operator string + Right Expr + func (node *ComparisonExpr) Format(buf *TrackedBuffer) + func (node *ComparisonExpr) IsImpossible() bool + type ConstraintDefinition struct + Details ConstraintInfo + Name string + func (c *ConstraintDefinition) Format(buf *TrackedBuffer) + type ConstraintInfo interface + type ConvertExpr struct + Expr Expr + Type *ConvertType + func (node *ConvertExpr) Format(buf *TrackedBuffer) + type ConvertType struct + Charset string + Length *SQLVal + Operator string + Scale *SQLVal + Type string + func (node *ConvertType) Format(buf *TrackedBuffer) + type ConvertUsingExpr struct + Expr Expr + Type string + func (node *ConvertUsingExpr) Format(buf *TrackedBuffer) + type CurTimeFuncExpr struct + Fsp Expr + Name ColIdent + func (node *CurTimeFuncExpr) Format(buf *TrackedBuffer) + type Cursor struct + func (c *Cursor) Node() SQLNode + func (c *Cursor) Parent() SQLNode + func (c *Cursor) Replace(newNode SQLNode) + type DBDDL struct + Action string + Charset string + Collate string + DBName string + IfExists bool + func (node *DBDDL) Format(buf *TrackedBuffer) + type DDL struct + Action string + AutoIncSpec *AutoIncSpec + FromTables TableNames + IfExists bool + OptLike *OptLike + PartitionSpec *PartitionSpec + Table TableName + TableSpec *TableSpec + ToTables TableNames + VindexCols []ColIdent + VindexSpec *VindexSpec + func (node *DDL) AffectedTables() TableNames + func (node *DDL) Format(buf *TrackedBuffer) + type Default struct + ColName string + func (node *Default) Format(buf *TrackedBuffer) + type Delete struct + Comments Comments + Limit *Limit + OrderBy OrderBy + Partitions Partitions + TableExprs TableExprs + Targets TableNames + Where *Where + func (node *Delete) Format(buf *TrackedBuffer) + type Encodable interface + EncodeSQL func(buf *strings.Builder) + type ExistsExpr struct + Subquery *Subquery + func (node *ExistsExpr) Format(buf *TrackedBuffer) + type Expr interface + func ExprFromValue(value sqltypes.Value) (Expr, error) + func ReplaceExpr(root, from, to Expr) Expr + func SplitAndExpression(filters []Expr, node Expr) []Expr + type Exprs []Expr + func (node Exprs) Format(buf *TrackedBuffer) + type ForeignKeyDefinition struct + OnDelete ReferenceAction + OnUpdate ReferenceAction + ReferencedColumns Columns + ReferencedTable TableName + Source Columns + func (f *ForeignKeyDefinition) Format(buf *TrackedBuffer) + type FuncExpr struct + Distinct bool + Exprs SelectExprs + Name ColIdent + Qualifier TableIdent + func (node *FuncExpr) Format(buf *TrackedBuffer) + func (node *FuncExpr) IsAggregate() bool + type GroupBy []Expr + func (node GroupBy) Format(buf *TrackedBuffer) + type GroupConcatExpr struct + Distinct string + Exprs SelectExprs + Limit *Limit + OrderBy OrderBy + Separator string + func (node *GroupConcatExpr) Format(buf *TrackedBuffer) + type IndexColumn struct + Column ColIdent + Length *SQLVal + type IndexDefinition struct + Columns []*IndexColumn + Info *IndexInfo + Options []*IndexOption + func (idx *IndexDefinition) Format(buf *TrackedBuffer) + type IndexHints struct + Indexes []ColIdent + Type string + func (node *IndexHints) Format(buf *TrackedBuffer) + type IndexInfo struct + Name ColIdent + Primary bool + Spatial bool + Type string + Unique bool + func (ii *IndexInfo) Format(buf *TrackedBuffer) + type IndexOption struct + Name string + Using string + Value *SQLVal + type Insert struct + Action string + Columns Columns + Comments Comments + Ignore string + OnDup OnDup + Partitions Partitions + Rows InsertRows + Table TableName + func (node *Insert) Format(buf *TrackedBuffer) + type InsertRows interface + type InsertValues [][]sqltypes.Value + func (iv InsertValues) EncodeSQL(buf *strings.Builder) + type IntervalExpr struct + Expr Expr + Unit string + func (node *IntervalExpr) Format(buf *TrackedBuffer) + type IsExpr struct + Expr Expr + Operator string + func (node *IsExpr) Format(buf *TrackedBuffer) + type JoinCondition struct + On Expr + Using Columns + func (node JoinCondition) Format(buf *TrackedBuffer) + type JoinTableExpr struct + Condition JoinCondition + Join string + LeftExpr TableExpr + RightExpr TableExpr + func (node *JoinTableExpr) Format(buf *TrackedBuffer) + type LengthScaleOption struct + Length *SQLVal + Scale *SQLVal + type Limit struct + Offset Expr + Rowcount Expr + func (node *Limit) Format(buf *TrackedBuffer) + type ListArg []byte + func (node ListArg) Format(buf *TrackedBuffer) + type MarginComments struct + Leading string + Trailing string + func SplitMarginComments(sql string) (query string, comments MarginComments) + type MatchExpr struct + Columns SelectExprs + Expr Expr + Option string + func (node *MatchExpr) Format(buf *TrackedBuffer) + type Nextval struct + Expr Expr + func (node Nextval) Format(buf *TrackedBuffer) + type NodeFormatter func(buf *TrackedBuffer, node SQLNode) + type NotExpr struct + Expr Expr + func (node *NotExpr) Format(buf *TrackedBuffer) + type NullVal struct + func (node *NullVal) Format(buf *TrackedBuffer) + type OnDup UpdateExprs + func (node OnDup) Format(buf *TrackedBuffer) + type OptLike struct + LikeTable TableName + func (node *OptLike) Format(buf *TrackedBuffer) + type OrExpr struct + Left Expr + Right Expr + func (node *OrExpr) Format(buf *TrackedBuffer) + type Order struct + Direction string + Expr Expr + func (node *Order) Format(buf *TrackedBuffer) + type OrderBy []*Order + func (node OrderBy) Format(buf *TrackedBuffer) + type OtherAdmin struct + func (node *OtherAdmin) Format(buf *TrackedBuffer) + type OtherRead struct + func (node *OtherRead) Format(buf *TrackedBuffer) + type ParenExpr struct + Expr Expr + func (node *ParenExpr) Format(buf *TrackedBuffer) + type ParenSelect struct + Select SelectStatement + func (node *ParenSelect) AddOrder(order *Order) + func (node *ParenSelect) Format(buf *TrackedBuffer) + func (node *ParenSelect) SetLimit(limit *Limit) + type ParenTableExpr struct + Exprs TableExprs + func (node *ParenTableExpr) Format(buf *TrackedBuffer) + type ParsedQuery struct + Query string + func BuildParsedQuery(in string, vars ...interface{}) *ParsedQuery + func NewParsedQuery(node SQLNode) *ParsedQuery + func (pq *ParsedQuery) Append(buf *strings.Builder, bindVariables map[string]*querypb.BindVariable, ...) error + func (pq *ParsedQuery) GenerateQuery(bindVariables map[string]*querypb.BindVariable, extras map[string]Encodable) (string, error) + func (pq *ParsedQuery) MarshalJSON() ([]byte, error) + type PartitionDefinition struct + Limit Expr + Maxvalue bool + Name ColIdent + func (node *PartitionDefinition) Format(buf *TrackedBuffer) + type PartitionSpec struct + Action string + Definitions []*PartitionDefinition + Name ColIdent + func (node *PartitionSpec) Format(buf *TrackedBuffer) + type Partitions Columns + func (node Partitions) Format(buf *TrackedBuffer) + type PositionedErr struct + Err string + Near []byte + Pos int + func (p PositionedErr) Error() string + type RangeCond struct + From Expr + Left Expr + Operator string + To Expr + func (node *RangeCond) Format(buf *TrackedBuffer) + type ReferenceAction int + const Cascade + const DefaultAction + const NoAction + const Restrict + const SetDefault + const SetNull + func (a ReferenceAction) Format(buf *TrackedBuffer) + type RewriteASTResult struct + AST Statement + func PrepareAST(in Statement, bindVars map[string]*querypb.BindVariable, prefix string) (*RewriteASTResult, error) + func RewriteAST(in Statement) (*RewriteASTResult, error) + type Rollback struct + func (node *Rollback) Format(buf *TrackedBuffer) + type SQLNode interface + Format func(buf *TrackedBuffer) + func Rewrite(node SQLNode, pre, post ApplyFunc) (result SQLNode) + type SQLVal struct + Type ValType + Val []byte + func NewBitVal(in []byte) *SQLVal + func NewFloatVal(in []byte) *SQLVal + func NewHexNum(in []byte) *SQLVal + func NewHexVal(in []byte) *SQLVal + func NewIntVal(in []byte) *SQLVal + func NewStrVal(in []byte) *SQLVal + func NewValArg(in []byte) *SQLVal + func (node *SQLVal) Format(buf *TrackedBuffer) + func (node *SQLVal) HexDecode() ([]byte, error) + type Select struct + Cache string + Comments Comments + Distinct string + From TableExprs + GroupBy GroupBy + Having *Where + Hints string + Limit *Limit + Lock string + OrderBy OrderBy + SelectExprs SelectExprs + Where *Where + func (node *Select) AddHaving(expr Expr) + func (node *Select) AddOrder(order *Order) + func (node *Select) AddWhere(expr Expr) + func (node *Select) Format(buf *TrackedBuffer) + func (node *Select) SetLimit(limit *Limit) + type SelectExpr interface + type SelectExprs []SelectExpr + func (node SelectExprs) Format(buf *TrackedBuffer) + type SelectStatement interface + AddOrder func(*Order) + SetLimit func(*Limit) + type Set struct + Comments Comments + Exprs SetExprs + Scope string + func (node *Set) Format(buf *TrackedBuffer) + type SetExpr struct + Expr Expr + Name ColIdent + func (node *SetExpr) Format(buf *TrackedBuffer) + type SetExprs []*SetExpr + func (node SetExprs) Format(buf *TrackedBuffer) + type SetKey struct + Key string + Scope string + type Show struct + OnTable TableName + Scope string + ShowCollationFilterOpt *Expr + ShowTablesOpt *ShowTablesOpt + Table TableName + Type string + func (node *Show) Format(buf *TrackedBuffer) + func (node *Show) HasOnTable() bool + func (node *Show) HasTable() bool + type ShowFilter struct + Filter Expr + Like string + func (node *ShowFilter) Format(buf *TrackedBuffer) + type ShowTablesOpt struct + DbName string + Filter *ShowFilter + Full string + type SimpleTableExpr interface + type StarExpr struct + TableName TableName + func (node *StarExpr) Format(buf *TrackedBuffer) + type Statement interface + func Parse(sql string) (Statement, error) + func ParseNext(tokenizer *Tokenizer) (Statement, error) + func ParseNextStrictDDL(tokenizer *Tokenizer) (Statement, error) + func ParseStrictDDL(sql string) (Statement, error) + type StatementType int + const StmtBegin + const StmtComment + const StmtCommit + const StmtDDL + const StmtDelete + const StmtInsert + const StmtOther + const StmtPriv + const StmtReplace + const StmtRollback + const StmtSelect + const StmtSet + const StmtShow + const StmtStream + const StmtUnknown + const StmtUpdate + const StmtUse + func Preview(sql string) StatementType + func (s StatementType) String() string + type Stream struct + Comments Comments + SelectExpr SelectExpr + Table TableName + func (node *Stream) Format(buf *TrackedBuffer) + type Subquery struct + Select SelectStatement + func (node *Subquery) Format(buf *TrackedBuffer) + type SubstrExpr struct + From Expr + Name *ColName + StrVal *SQLVal + To Expr + func (node *SubstrExpr) Format(buf *TrackedBuffer) + type TableExpr interface + type TableExprs []TableExpr + func (node TableExprs) Format(buf *TrackedBuffer) + type TableIdent struct + func GetTableName(node SimpleTableExpr) TableIdent + func NewTableIdent(str string) TableIdent + func (node *TableIdent) UnmarshalJSON(b []byte) error + func (node TableIdent) CompliantName() string + func (node TableIdent) Format(buf *TrackedBuffer) + func (node TableIdent) IsEmpty() bool + func (node TableIdent) MarshalJSON() ([]byte, error) + func (node TableIdent) String() string + type TableName struct + Name TableIdent + Qualifier TableIdent + func TableFromStatement(sql string) (TableName, error) + func (node TableName) Format(buf *TrackedBuffer) + func (node TableName) IsEmpty() bool + func (node TableName) ToViewName() TableName + type TableNames []TableName + func (node TableNames) Format(buf *TrackedBuffer) + type TableSpec struct + Columns []*ColumnDefinition + Constraints []*ConstraintDefinition + Indexes []*IndexDefinition + Options string + func (ts *TableSpec) AddColumn(cd *ColumnDefinition) + func (ts *TableSpec) AddConstraint(cd *ConstraintDefinition) + func (ts *TableSpec) AddIndex(id *IndexDefinition) + func (ts *TableSpec) Format(buf *TrackedBuffer) + type TimestampFuncExpr struct + Expr1 Expr + Expr2 Expr + Name string + Unit string + func (node *TimestampFuncExpr) Format(buf *TrackedBuffer) + type Tokenizer struct + AllowComments bool + InStream io.Reader + LastError error + ParseTree Statement + Position int + SkipSpecialComments bool + SkipToEnd bool + func NewStringTokenizer(sql string) *Tokenizer + func NewTokenizer(r io.Reader) *Tokenizer + func (tkn *Tokenizer) Error(err string) + func (tkn *Tokenizer) Lex(lval *yySymType) int + func (tkn *Tokenizer) Scan() (int, []byte) + type TrackedBuffer struct + func NewTrackedBuffer(nodeFormatter NodeFormatter) *TrackedBuffer + func (buf *TrackedBuffer) HasBindVars() bool + func (buf *TrackedBuffer) Myprintf(format string, values ...interface{}) + func (buf *TrackedBuffer) ParsedQuery() *ParsedQuery + func (buf *TrackedBuffer) WriteArg(arg string) + func (buf *TrackedBuffer) WriteNode(node SQLNode) *TrackedBuffer + type TupleEqualityList struct + Columns []ColIdent + Rows [][]sqltypes.Value + func (tpl *TupleEqualityList) EncodeSQL(buf *strings.Builder) + type UnaryExpr struct + Expr Expr + Operator string + func (node *UnaryExpr) Format(buf *TrackedBuffer) + type Union struct + Left SelectStatement + Limit *Limit + Lock string + OrderBy OrderBy + Right SelectStatement + Type string + func (node *Union) AddOrder(order *Order) + func (node *Union) Format(buf *TrackedBuffer) + func (node *Union) SetLimit(limit *Limit) + type Update struct + Comments Comments + Exprs UpdateExprs + Ignore string + Limit *Limit + OrderBy OrderBy + TableExprs TableExprs + Where *Where + func (node *Update) Format(buf *TrackedBuffer) + type UpdateExpr struct + Expr Expr + Name *ColName + func (node *UpdateExpr) Format(buf *TrackedBuffer) + type UpdateExprs []*UpdateExpr + func (node UpdateExprs) Format(buf *TrackedBuffer) + type Use struct + DBName TableIdent + func (node *Use) Format(buf *TrackedBuffer) + type ValTuple Exprs + func (node ValTuple) Format(buf *TrackedBuffer) + type ValType int + type Values []ValTuple + func (node Values) Format(buf *TrackedBuffer) + type ValuesFuncExpr struct + Name *ColName + func (node *ValuesFuncExpr) Format(buf *TrackedBuffer) + type VindexParam struct + Key ColIdent + Val string + func (node VindexParam) Format(buf *TrackedBuffer) + type VindexSpec struct + Name ColIdent + Params []VindexParam + Type ColIdent + func (node *VindexSpec) Format(buf *TrackedBuffer) + func (node *VindexSpec) ParseParams() (string, map[string]string) + type Visit func(node SQLNode) (kontinue bool, err error) + type When struct + Cond Expr + Val Expr + func (node *When) Format(buf *TrackedBuffer) + type Where struct + Expr Expr + Type string + func NewWhere(typ string, expr Expr) *Where + func (node *Where) Format(buf *TrackedBuffer)