Versions in this module Expand all Collapse all v0 v0.9.0 Nov 28, 2020 Changes in this version + const AGAINST + const ALL + const ALTER + const ANALYZE + const AND + const AS + const ASC + const AlterStr + const AscScr + const BETWEEN + const BINARY + const BOOLEAN + const BY + const BangStr + const BetweenStr + const BinaryStr + const BitAndStr + const BitOrStr + const BitXorStr + const BooleanModeStr + const CASE + const CAST + const CHARACTER + const COLLATE + const COMMENT + const CONVERT + const CREATE + const CROSS + const CURRENT_DATE + const CURRENT_TIME + const CURRENT_TIMESTAMP + const CharacterSetStr + const CreateStr + const DATABASE + const DATABASES + const DATE + const DEFAULT + const DELETE + const DESC + const DESCRIBE + const DISTINCT + const DIV + const DROP + const DUPLICATE + const DescScr + const DistinctStr + const DivStr + const DropStr + const ELSE + const END + const ESCAPE + const EXISTS + const EXPANSION + const EXPLAIN + const EqualStr + const FALSE + const FLOAT + const FOR + const FORCE + const FROM + const FloatVal + const ForUpdateStr + const ForceStr + const GE + const GROUP + const GROUP_CONCAT + const GreaterEqualStr + const GreaterThanStr + const HAVING + const HEX + const HEXNUM + const HavingStr + const HexNum + const HexVal + const ID + const IF + const IGNORE + const IN + const INDEX + const INNER + const INSERT + const INTEGER + const INTEGRAL + const INTERVAL + const INTO + const IS + const IgnoreStr + const InStr + const InsertStr + const IntDivStr + const IntVal + const IsFalseStr + const IsNotFalseStr + const IsNotNullStr + const IsNotTrueStr + const IsNullStr + const IsTrueStr + const JOIN + const JSONExtractOp + const JSONUnquoteExtractOp + const JSON_EXTRACT_OP + const JSON_UNQUOTE_EXTRACT_OP + const JoinStr + const KEY + const LANGUAGE + const LAST_INSERT_ID + const LE + const LEFT + const LEX_ERROR + const LIKE + const LIMIT + const LIST_ARG + const LOCALTIME + const LOCALTIMESTAMP + const LOCK + const LeftJoinStr + const LessEqualStr + const LessThanStr + const LikeStr + const MATCH + const MOD + const MODE + const MinusStr + const ModStr + const MultStr + const NATURAL + const NE + const NEXT + const NOT + const NULL + const NULL_SAFE_EQUAL + const NaturalJoinStr + const NaturalLanguageModeStr + const NaturalLanguageModeWithQueryExpansionStr + const NaturalLeftJoinStr + const NaturalRightJoinStr + const NotBetweenStr + const NotEqualStr + const NotInStr + const NotLikeStr + const NotRegexpStr + const NullSafeEqualStr + const OFFSET + const ON + const OPTIMIZE + const OR + const ORDER + const OUTER + const PlusStr + const QUERY + const QueryExpansionStr + const REGEXP + const RENAME + const REPAIR + const REPLACE + const RIGHT + const RegexpStr + const RenameStr + const ReplaceStr + const RightJoinStr + const SELECT + const SEPARATOR + const SET + const SHARE + const SHIFT_LEFT + const SHIFT_RIGHT + const SHOW + const SQLCacheStr + const SQLNoCacheStr + const SQL_CACHE + const SQL_NO_CACHE + const STRAIGHT_JOIN + const STRING + const ShareModeStr + const ShiftLeftStr + const ShiftRightStr + const ShowDatabasesStr + const ShowKeyspacesStr + const ShowShardsStr + const ShowTablesStr + const ShowUnsupportedStr + const ShowVSchemaTablesStr + const StrVal + const StraightJoinHint + const StraightJoinStr + const TABLE + const TABLES + const THEN + const TO + const TRUE + const TRUNCATE + const TildaStr + const UMinusStr + const UNARY + const UNION + const UNIQUE + 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 VALUE + const VALUES + const VALUE_ARG + const VIEW + const VITESS_KEYSPACES + const VITESS_SHARDS + const VSCHEMA_TABLES + const ValArg + const WHEN + const WHERE + const WITH + const WhereStr + var Aggregates = map[string]bool + func Append(buf *bytes.Buffer, node SQLNode) + func Backtick(in string) string + func String(node SQLNode) string + func Walk(visit Visit, nodes ...SQLNode) error + type AliasedExpr struct + As ColIdent + Expr Expr + func (node *AliasedExpr) Format(buf *TrackedBuffer) + func (node *AliasedExpr) WalkSubtree(visit Visit) error + type AliasedTableExpr struct + As TableIdent + Expr SimpleTableExpr + Hints *IndexHints + func (node *AliasedTableExpr) Format(buf *TrackedBuffer) + func (node *AliasedTableExpr) WalkSubtree(visit Visit) error + type AndExpr struct + Left Expr + Right Expr + func (node *AndExpr) Format(buf *TrackedBuffer) + func (node *AndExpr) WalkSubtree(visit Visit) error + type BinaryExpr struct + Left Expr + Operator string + Right Expr + func (node *BinaryExpr) Format(buf *TrackedBuffer) + func (node *BinaryExpr) WalkSubtree(visit Visit) error + type BoolVal bool + func (node BoolVal) Format(buf *TrackedBuffer) + func (node BoolVal) WalkSubtree(visit Visit) error + type CaseExpr struct + Else Expr + Expr Expr + Whens []*When + func (node *CaseExpr) Format(buf *TrackedBuffer) + func (node *CaseExpr) WalkSubtree(visit Visit) error + type ColIdent struct + func NewColIdent(str string) 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 + func (node ColIdent) WalkSubtree(visit Visit) error + type ColName struct + Metadata interface{} + Name ColIdent + Qualifier TableName + func (node *ColName) Equal(c *ColName) bool + func (node *ColName) Format(buf *TrackedBuffer) + func (node *ColName) WalkSubtree(visit Visit) error + type ColTuple interface + type CollateExpr struct + Charset string + Expr Expr + func (node *CollateExpr) Format(buf *TrackedBuffer) + func (node *CollateExpr) WalkSubtree(visit Visit) error + type ColumnDef struct + Elems []string + Name string + Options []*ColumnOption + Type string + func (node ColumnDef) String() string + type ColumnOption struct + Type ColumnOptionType + Value string + func (o *ColumnOption) String() string + type ColumnOptionType int + const ColumnOptionAutoIncrement + const ColumnOptionComment + const ColumnOptionDefaultValue + const ColumnOptionFulltext + const ColumnOptionGenerated + const ColumnOptionNoOption + const ColumnOptionNotNull + const ColumnOptionNull + const ColumnOptionOnUpdate + const ColumnOptionPrimaryKey + const ColumnOptionReference + const ColumnOptionUniqKey + func (o ColumnOptionType) String() string + type Columns []ColIdent + func (node Columns) FindColumn(col ColIdent) int + func (node Columns) Format(buf *TrackedBuffer) + func (node Columns) WalkSubtree(visit Visit) error + type Comments [][]byte + func (node Comments) Format(buf *TrackedBuffer) + func (node Comments) WalkSubtree(visit Visit) error + type ComparisonExpr struct + Escape Expr + Left Expr + Operator string + Right Expr + func (node *ComparisonExpr) Format(buf *TrackedBuffer) + func (node *ComparisonExpr) WalkSubtree(visit Visit) error + type Constraint struct + Keys []ColIdent + Name string + Type ConstraintType + func (node Constraint) String() string + type ConstraintType int + const ConstraintForeignKey + const ConstraintFulltext + const ConstraintIndex + const ConstraintKey + const ConstraintNoConstraint + const ConstraintPrimaryKey + const ConstraintUniq + const ConstraintUniqIndex + const ConstraintUniqKey + func (t ConstraintType) String() string + type ConvertExpr struct + Expr Expr + Type *ConvertType + func (node *ConvertExpr) Format(buf *TrackedBuffer) + func (node *ConvertExpr) WalkSubtree(visit Visit) error + type ConvertType struct + Charset string + Length *SQLVal + Operator string + Scale *SQLVal + Type string + func (node *ConvertType) Format(buf *TrackedBuffer) + func (node *ConvertType) WalkSubtree(visit Visit) error + type ConvertUsingExpr struct + Expr Expr + Type string + func (node *ConvertUsingExpr) Format(buf *TrackedBuffer) + func (node *ConvertUsingExpr) WalkSubtree(visit Visit) error + type CreateTable struct + Columns []*ColumnDef + Constraints []*Constraint + Options []*TableOption + func (t *CreateTable) Format(buf *TrackedBuffer) + type DDL struct + Action string + IfExists bool + NewName TableName + Table TableName + func (node *DDL) Format(buf *TrackedBuffer) + func (node *DDL) WalkSubtree(visit Visit) error + type Default struct + func (node *Default) Format(buf *TrackedBuffer) + func (node *Default) WalkSubtree(visit Visit) error + type Delete struct + Comments Comments + Limit *Limit + OrderBy OrderBy + TableExprs TableExprs + Targets TableNames + Where *Where + func (node *Delete) Format(buf *TrackedBuffer) + func (node *Delete) WalkSubtree(visit Visit) error + type Encodable interface + EncodeSQL func(buf *bytes.Buffer) + type ExistsExpr struct + Subquery *Subquery + func (node *ExistsExpr) Format(buf *TrackedBuffer) + func (node *ExistsExpr) WalkSubtree(visit Visit) error + type Expr interface + type Exprs []Expr + func (node Exprs) Format(buf *TrackedBuffer) + func (node Exprs) WalkSubtree(visit Visit) error + type FuncExpr struct + Distinct bool + Exprs SelectExprs + Name ColIdent + Qualifier TableIdent + func (node *FuncExpr) Format(buf *TrackedBuffer) + func (node *FuncExpr) IsAggregate() bool + func (node *FuncExpr) WalkSubtree(visit Visit) error + type GroupBy []Expr + func (node GroupBy) Format(buf *TrackedBuffer) + func (node GroupBy) WalkSubtree(visit Visit) error + type GroupConcatExpr struct + Distinct string + Exprs SelectExprs + OrderBy OrderBy + Separator string + func (node *GroupConcatExpr) Format(buf *TrackedBuffer) + func (node *GroupConcatExpr) WalkSubtree(visit Visit) error + type IndexHints struct + Indexes []ColIdent + Type string + func (node *IndexHints) Format(buf *TrackedBuffer) + func (node *IndexHints) WalkSubtree(visit Visit) error + type Insert struct + Action string + Columns Columns + Comments Comments + Ignore string + OnDup OnDup + Rows InsertRows + Table TableName + func (node *Insert) Format(buf *TrackedBuffer) + func (node *Insert) WalkSubtree(visit Visit) error + type InsertRows interface + type InsertValues [][]sqltypes.Value + func (iv InsertValues) EncodeSQL(buf *bytes.Buffer) + type IntervalExpr struct + Expr Expr + Unit ColIdent + func (node *IntervalExpr) Format(buf *TrackedBuffer) + func (node *IntervalExpr) WalkSubtree(visit Visit) error + type IsExpr struct + Expr Expr + Operator string + func (node *IsExpr) Format(buf *TrackedBuffer) + func (node *IsExpr) WalkSubtree(visit Visit) error + type JoinTableExpr struct + Join string + LeftExpr TableExpr + On Expr + RightExpr TableExpr + func (node *JoinTableExpr) Format(buf *TrackedBuffer) + func (node *JoinTableExpr) WalkSubtree(visit Visit) error + type Limit struct + Offset Expr + Rowcount Expr + func (node *Limit) Format(buf *TrackedBuffer) + func (node *Limit) WalkSubtree(visit Visit) error + type ListArg []byte + func (node ListArg) Format(buf *TrackedBuffer) + func (node ListArg) WalkSubtree(visit Visit) error + type MatchExpr struct + Columns SelectExprs + Expr Expr + Option string + func (node *MatchExpr) Format(buf *TrackedBuffer) + func (node *MatchExpr) WalkSubtree(visit Visit) error + type Nextval struct + Expr Expr + func (node Nextval) Format(buf *TrackedBuffer) + func (node Nextval) WalkSubtree(visit Visit) error + type NotExpr struct + Expr Expr + func (node *NotExpr) Format(buf *TrackedBuffer) + func (node *NotExpr) WalkSubtree(visit Visit) error + type NullVal struct + func (node *NullVal) Format(buf *TrackedBuffer) + func (node *NullVal) WalkSubtree(visit Visit) error + type OnDup UpdateExprs + func (node OnDup) Format(buf *TrackedBuffer) + func (node OnDup) WalkSubtree(visit Visit) error + type OrExpr struct + Left Expr + Right Expr + func (node *OrExpr) Format(buf *TrackedBuffer) + func (node *OrExpr) WalkSubtree(visit Visit) error + type Order struct + Direction string + Expr Expr + func (node *Order) Format(buf *TrackedBuffer) + func (node *Order) WalkSubtree(visit Visit) error + type OrderBy []*Order + func (node OrderBy) Format(buf *TrackedBuffer) + func (node OrderBy) WalkSubtree(visit Visit) error + type OtherAdmin struct + func (node *OtherAdmin) Format(buf *TrackedBuffer) + func (node *OtherAdmin) WalkSubtree(visit Visit) error + type OtherRead struct + func (node *OtherRead) Format(buf *TrackedBuffer) + func (node *OtherRead) WalkSubtree(visit Visit) error + type ParenExpr struct + Expr Expr + func (node *ParenExpr) Format(buf *TrackedBuffer) + func (node *ParenExpr) WalkSubtree(visit Visit) error + type ParenSelect struct + Select SelectStatement + func (node *ParenSelect) AddOrder(order *Order) + func (node *ParenSelect) Format(buf *TrackedBuffer) + func (node *ParenSelect) SetLimit(limit *Limit) + func (node *ParenSelect) WalkSubtree(visit Visit) error + type ParenTableExpr struct + Exprs TableExprs + func (node *ParenTableExpr) Format(buf *TrackedBuffer) + func (node *ParenTableExpr) WalkSubtree(visit Visit) error + type ParsedQuery struct + Query string + func BuildParsedQuery(in string, vars ...interface{}) *ParsedQuery + func GenerateParsedQuery(node SQLNode) *ParsedQuery + type RangeCond struct + From Expr + Left Expr + Operator string + To Expr + func (node *RangeCond) Format(buf *TrackedBuffer) + func (node *RangeCond) WalkSubtree(visit Visit) error + type RowFormatType uint64 + const RowFormatCompact + const RowFormatCompressed + const RowFormatDefault + const RowFormatDynamic + const RowFormatFixed + const RowFormatRedundant + func (r RowFormatType) String() string + type SQLNode interface + Format func(buf *TrackedBuffer) + WalkSubtree func(visit Visit) error + type SQLVal struct + Type ValType + Val []byte + 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) + func (node *SQLVal) WalkSubtree(visit Visit) 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) + func (node *Select) WalkSubtree(visit Visit) error + type SelectExpr interface + type SelectExprs []SelectExpr + func (node SelectExprs) Format(buf *TrackedBuffer) + func (node SelectExprs) WalkSubtree(visit Visit) error + type SelectStatement interface + AddOrder func(*Order) + SetLimit func(*Limit) + type Set struct + Comments Comments + Exprs UpdateExprs + func (node *Set) Format(buf *TrackedBuffer) + func (node *Set) WalkSubtree(visit Visit) error + type Show struct + TableName string + Type string + func (node *Show) Format(buf *TrackedBuffer) + func (node *Show) WalkSubtree(visit Visit) error + type SimpleTableExpr interface + type StarExpr struct + TableName TableName + func (node *StarExpr) Format(buf *TrackedBuffer) + func (node *StarExpr) WalkSubtree(visit Visit) error + type Statement interface + func Parse(sql string) (Statement, error) + type Subquery struct + Select SelectStatement + func (node *Subquery) Format(buf *TrackedBuffer) + func (node *Subquery) WalkSubtree(visit Visit) error + type TableExpr interface + type TableExprs []TableExpr + func (node TableExprs) Format(buf *TrackedBuffer) + func (node TableExprs) WalkSubtree(visit Visit) error + type TableIdent struct + 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 + func (node TableIdent) WalkSubtree(visit Visit) error + type TableName struct + Name TableIdent + Qualifier TableIdent + func (node TableName) Format(buf *TrackedBuffer) + func (node TableName) IsEmpty() bool + func (node TableName) ToViewName() TableName + func (node TableName) WalkSubtree(visit Visit) error + type TableNames []TableName + func (node TableNames) Format(buf *TrackedBuffer) + func (node TableNames) WalkSubtree(visit Visit) error + type TableOption struct + StrValue string + Type TableOptionType + UintValue uint64 + func (o *TableOption) String() string + type TableOptionType int + const TableOptionAutoIncrement + const TableOptionAvgRowLength + const TableOptionCharset + const TableOptionCheckSum + const TableOptionCollate + const TableOptionComment + const TableOptionCompression + const TableOptionConnection + const TableOptionDelayKeyWrite + const TableOptionEngine + const TableOptionKeyBlockSize + const TableOptionMaxRows + const TableOptionMinRows + const TableOptionNone + const TableOptionPackKeys + const TableOptionPassword + const TableOptionRowFormat + const TableOptionShardRowID + const TableOptionStatsPersistent + func (t TableOptionType) String() string + type Tokenizer struct + AllowComments bool + ForceEOF bool + InStream *strings.Reader + LastError string + ParseTree Statement + Position int + func NewStringTokenizer(sql string) *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 func(buf *TrackedBuffer, node SQLNode)) *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 TruncateTable struct + Table TableName + func (node *TruncateTable) Format(buf *TrackedBuffer) + func (node *TruncateTable) WalkSubtree(visit Visit) error + type TupleEqualityList struct + Columns []ColIdent + Rows [][]sqltypes.Value + func (tpl *TupleEqualityList) EncodeSQL(buf *bytes.Buffer) + type UnaryExpr struct + Expr Expr + Operator string + func (node *UnaryExpr) Format(buf *TrackedBuffer) + func (node *UnaryExpr) WalkSubtree(visit Visit) error + 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) + func (node *Union) WalkSubtree(visit Visit) error + type Update struct + Comments Comments + Exprs UpdateExprs + Limit *Limit + OrderBy OrderBy + TableExprs TableExprs + Where *Where + func (node *Update) Format(buf *TrackedBuffer) + func (node *Update) WalkSubtree(visit Visit) error + type UpdateExpr struct + Expr Expr + Name *ColName + func (node *UpdateExpr) Format(buf *TrackedBuffer) + func (node *UpdateExpr) WalkSubtree(visit Visit) error + type UpdateExprs []*UpdateExpr + func (node UpdateExprs) Format(buf *TrackedBuffer) + func (node UpdateExprs) WalkSubtree(visit Visit) error + type Use struct + DBName TableIdent + func (node *Use) Format(buf *TrackedBuffer) + func (node *Use) WalkSubtree(visit Visit) error + type ValTuple Exprs + func (node ValTuple) Format(buf *TrackedBuffer) + func (node ValTuple) WalkSubtree(visit Visit) error + type ValType int + type Values []ValTuple + func (node Values) Format(buf *TrackedBuffer) + func (node Values) WalkSubtree(visit Visit) error + type ValuesFuncExpr struct + Name ColIdent + Resolved Expr + func (node *ValuesFuncExpr) Format(buf *TrackedBuffer) + func (node *ValuesFuncExpr) WalkSubtree(visit Visit) error + type Visit func(node SQLNode) (kontinue bool, err error) + type When struct + Cond Expr + Val Expr + func (node *When) Format(buf *TrackedBuffer) + func (node *When) WalkSubtree(visit Visit) error + type Where struct + Expr Expr + Type string + func NewWhere(typ string, expr Expr) *Where + func (node *Where) Format(buf *TrackedBuffer) + func (node *Where) WalkSubtree(visit Visit) error