tree

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SampleRows    sampleType = 0
	SamplePercent sampleType = 1

	SampleUsingBlock sampleLevel = 0
	SampleUsingRow   sampleLevel = 1
)
View Source
const (
	AstWhere  = "where"
	AstHaving = "having"
)
View Source
const (
	JOIN_TYPE_FULL          = "FULL"
	JOIN_TYPE_LEFT          = "LEFT"
	JOIN_TYPE_RIGHT         = "RIGHT"
	JOIN_TYPE_CROSS         = "CROSS"
	JOIN_TYPE_INNER         = "INNER"
	JOIN_TYPE_STRAIGHT      = "STRAIGHT_JOIN"
	JOIN_TYPE_NATURAL       = "NATURAL"
	JOIN_TYPE_NATURAL_LEFT  = "NATURAL LEFT"
	JOIN_TYPE_NATURAL_RIGHT = "NATURAL RIGHT"
)
View Source
const (
	ShowEngines = iota
	ShowCharset
	ShowCreateUser
	ShowTriggers
	ShowConfig
	ShowEvents
	ShowPlugins
	ShowProfile
	ShowProfiles
	ShowPrivileges
)
View Source
const (
	GrantForUser = iota
	GrantForRole
)
View Source
const (
	// QueryTypeDQL (Data Query Language) Select, MoDump, ValuesStatement, With
	QueryTypeDQL = "DQL"
	// QueryTypeDDL (Data Definition Language): CreateDatabase, DropDatabase, DropTable,
	// Create/Drop/Alter/Rename Database/Table/View/Index/Function, TruncateTable,
	QueryTypeDDL = "DDL"
	// QueryTypeDML (Data Manipulation Language): Insert, Update, Delete, Load
	QueryTypeDML = "DML"
	// QueryTypeDCL (Data Control Language)
	// statement: Grant, Revoke
	// CreateAccount, CreateUser, CreateRole, AlterAccount, AlterUser, DropAccount, DropUser, DropRole
	QueryTypeDCL = "DCL"
	// QueryTypeTCL (Transaction Control Language): BeginTransaction, RollbackTransaction, CommitTransaction, Savepoint(Not Support)
	QueryTypeTCL = "TCL"
	// QueryTypeOth (Other.)
	// statement: AnalyzeStmt(Not Support), ExplainStmt, ExplainAnalyze, ExplainFor,
	// SetVar, SetDefaultRole, SetRole, SetPassword, Declare, Do, TableFunction, Use, PrepareStmt, Execute, Deallocate, Kill
	// Show ..., ShowCreateTable, ShowColumns(Desc)
	QueryTypeOth = "Other"
)
View Source
const (
	OUTPUT_UNDEFINED  OutputType = 0x0
	OUTPUT_RESULT_ROW OutputType = 0x1
	OUTPUT_STATUS     OutputType = 0x2

	//
	RESP_STREAM_RESULT_ROW   RespType = 0x0
	RESP_PREBUILD_RESULT_ROW RespType = 0x1
	RESP_NOTHING             RespType = 0x2
	RESP_BY_SITUATION        RespType = 0x3
	RESP_STATUS              RespType = 0x4
	RESP_MIXED_RESULT_ROW    RespType = 0x5

	//
	EXEC_IN_ENGINE   ExecLocation = 0x0
	EXEC_IN_FRONTEND ExecLocation = 0x1
)
View Source
const (
	DefaultDisplayWidth   = -1
	NotDefineDisplayWidth = 0
	NotDefineDec          = -1
)
View Source
const (
	AUTO       = "auto"
	NOCOMPRESS = "none"
	GZIP       = "gzip"
	GZ         = "gz" // alias of gzip
	BZIP2      = "bzip2"
	BZ2        = "bz2" // alias for bzip2
	FLATE      = "flate"
	LZW        = "lzw"
	ZLIB       = "zlib"
	LZ4        = "lz4"
	TAR_GZ     = "tar.gz"
	TAR_BZ2    = "tar.bz2"
)
View Source
const (
	CSV      = "csv"
	JSONLINE = "jsonline"
	PARQUET  = "parquet"
)

load data fotmat

View Source
const (
	OBJECT = "object"
	ARRAY  = "array"
)

if $format is jsonline

View Source
const (
	S3     = 1
	INLINE = 2
)

Variables

View Source
var (
	DBoolTrue  = &constDBoolTrue
	DBoolFalse = &constDBoolFalse

	DNull Datum = &dNull{}
)
View Source
var (
	TYPE_TINY = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  8,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_TINY),
	}}

	TYPE_SHORT = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  16,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_SHORT),
	}}

	TYPE_LONG = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  32,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_LONG),
	}}

	TYPE_FLOAT = &T{InternalType: InternalType{
		Family: FloatFamily,
		Width:  32,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_FLOAT),
	}}

	TYPE_DOUBLE = &T{InternalType: InternalType{
		Family: FloatFamily,
		Width:  64,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_DOUBLE),
	}}

	TYPE_NULL = &T{InternalType: InternalType{
		Family: UnknownFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_NULL),
	}}

	TYPE_TIMESTAMP = &T{InternalType: InternalType{
		Family:             TimestampFamily,
		Scale:              0,
		TimePrecisionIsSet: false,
		Locale:             &emptyLocale,
		Oid:                uint32(defines.MYSQL_TYPE_TIMESTAMP),
	}}

	TYPE_LONGLONG = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  64,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_LONGLONG),
	}}

	TYPE_INT24 = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  24,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_INT24),
	}}

	TYPE_DATE = &T{InternalType: InternalType{
		Family: DateFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_DATE),
	}}

	TYPE_DURATION = &T{InternalType: InternalType{
		Family:                IntervalFamily,
		Scale:                 0,
		TimePrecisionIsSet:    false,
		Locale:                &emptyLocale,
		Oid:                   uint32(defines.MYSQL_TYPE_TIME),
		IntervalDurationField: &IntervalDurationField{},
	}}

	TYPE_TIME = &T{InternalType: InternalType{
		Family:             TimeFamily,
		Scale:              0,
		TimePrecisionIsSet: false,
		Locale:             &emptyLocale,
		Oid:                uint32(defines.MYSQL_TYPE_TIME),
	}}

	TYPE_DATETIME = &T{InternalType: InternalType{
		Family:             TimestampFamily,
		Scale:              0,
		TimePrecisionIsSet: false,
		Locale:             &emptyLocale,
		Oid:                uint32(defines.MYSQL_TYPE_DATETIME),
	}}

	TYPE_YEAR = &T{InternalType: InternalType{
		Family: IntFamily,
		Width:  16,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_YEAR),
	}}

	TYPE_NEWDATE = &T{InternalType: InternalType{
		Family: DateFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_NEWDATE),
	}}

	TYPE_VARCHAR = &T{InternalType: InternalType{
		Family: StringFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_VARCHAR),
	}}

	TYPE_BINARY = &T{InternalType: InternalType{
		Family: StringFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_VARCHAR),
	}}

	TYPE_VARBINARY = &T{InternalType: InternalType{
		Family: StringFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_VARCHAR),
	}}

	TYPE_BIT = &T{InternalType: InternalType{
		Family: BitFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_BIT),
	}}

	TYPE_BOOL = &T{InternalType: InternalType{
		Family: BoolFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_BOOL),
	}}

	TYPE_JSON = &T{InternalType: InternalType{
		Family: JsonFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_JSON)}}

	TYPE_UUID = &T{InternalType: InternalType{
		Family: UuidFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_UUID)}}

	TYPE_ENUM = &T{InternalType: InternalType{
		Family: EnumFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_ENUM),
	}}

	TYPE_SET = &T{InternalType: InternalType{
		Family: SetFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_SET),
	}}

	TYPE_TINY_BLOB = &T{InternalType: InternalType{
		Family: BlobFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_TINY_BLOB)}}

	TYPE_MEDIUM_BLOB = &T{InternalType: InternalType{
		Family: BlobFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_MEDIUM_BLOB),
	}}

	TYPE_LONG_BLOB = &T{InternalType: InternalType{
		Family: BlobFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_LONG_BLOB),
	}}

	TYPE_BLOB = &T{InternalType: InternalType{
		Family: BlobFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_BLOB),
	}}

	TYPE_TEXT = &T{InternalType: InternalType{
		Family: BlobFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_TEXT),
	}}

	TYPE_VARSTRING = &T{InternalType: InternalType{
		Family: StringFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_VAR_STRING),
	}}

	TYPE_STRING = &T{InternalType: InternalType{
		Family: StringFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_STRING),
	}}

	TYPE_GEOMETRY = &T{InternalType: InternalType{
		Family: GeometryFamily,
		Locale: &emptyLocale,
		Oid:    uint32(defines.MYSQL_TYPE_GEOMETRY),
	}}
)

Functions

func FormatString added in v0.5.0

func FormatString(str string) string

func GetDisplayWith

func GetDisplayWith(val int32) int32

func IsContainAnalyze added in v0.6.0

func IsContainAnalyze(options []OptionElem) bool

func IsValue

func IsValue(node Expr) bool

IsValue returns true if the Expr is a string, integral or value arg. NULL is not considered to be a value.

func String

func String(node NodeFormatter, dialectType dialect.DialectType) string

func StringWithOpts added in v1.2.0

func StringWithOpts(node NodeFormatter, dialectType dialect.DialectType, opts ...FmtCtxOption) string

StringWithOpts Restore SQL and provide string formatting restore options

Types

type ATTimeStampType added in v1.2.0

type ATTimeStampType int
const (
	ATTIMESTAMPNONE ATTimeStampType = iota
	ATTIMESTAMPTIME
	ATTIMESTAMPSNAPSHOT
	ATMOTIMESTAMP
)

func (ATTimeStampType) String added in v1.2.0

func (a ATTimeStampType) String() string

type AccessModeType added in v0.8.0

type AccessModeType int
const (
	ACCESS_MODE_NONE AccessModeType = iota
	ACCESS_MODE_READ_WRITE
	ACCESS_MODE_READ_ONLY
)

func (AccessModeType) String added in v0.8.0

func (amt AccessModeType) String() string

type AccountAuthOption added in v0.6.0

type AccountAuthOption struct {
	Equal          string
	AdminName      Expr
	IdentifiedType AccountIdentified
}

func NewAccountAuthOption added in v1.2.0

func NewAccountAuthOption(e string, an Expr, it AccountIdentified) *AccountAuthOption

func (*AccountAuthOption) Format added in v0.6.0

func (node *AccountAuthOption) Format(ctx *FmtCtx)

func (*AccountAuthOption) Free added in v1.2.0

func (node *AccountAuthOption) Free()

func (AccountAuthOption) TypeName added in v1.2.0

func (node AccountAuthOption) TypeName() string

type AccountComment added in v0.6.0

type AccountComment struct {
	Exist   bool
	Comment string
}

func NewAccountComment added in v1.2.0

func NewAccountComment() *AccountComment

func (*AccountComment) Format added in v0.6.0

func (node *AccountComment) Format(ctx *FmtCtx)

func (*AccountComment) Free added in v1.2.0

func (node *AccountComment) Free()

func (AccountComment) TypeName added in v1.2.0

func (node AccountComment) TypeName() string

type AccountCommentOrAttribute added in v0.6.0

type AccountCommentOrAttribute struct {
	Exist     bool
	IsComment bool
	Str       string
}

func NewAccountCommentOrAttribute added in v1.2.0

func NewAccountCommentOrAttribute(e bool, c bool, s string) *AccountCommentOrAttribute

func (*AccountCommentOrAttribute) Format added in v0.6.0

func (node *AccountCommentOrAttribute) Format(ctx *FmtCtx)

func (*AccountCommentOrAttribute) Free added in v1.2.0

func (node *AccountCommentOrAttribute) Free()

func (AccountCommentOrAttribute) TypeName added in v1.2.0

func (node AccountCommentOrAttribute) TypeName() string

type AccountIdentified added in v0.6.0

type AccountIdentified struct {
	Typ AccountIdentifiedOption
	Str Expr
}

func NewAccountIdentified added in v1.2.0

func NewAccountIdentified(t AccountIdentifiedOption, s Expr) *AccountIdentified

func (*AccountIdentified) Format added in v0.6.0

func (node *AccountIdentified) Format(ctx *FmtCtx)

func (*AccountIdentified) Free added in v1.2.0

func (node *AccountIdentified) Free()

func (AccountIdentified) TypeName added in v1.2.0

func (node AccountIdentified) TypeName() string

type AccountIdentifiedOption added in v0.6.0

type AccountIdentifiedOption int
const (
	AccountIdentifiedByPassword AccountIdentifiedOption = iota
	AccountIdentifiedByRandomPassword
	AccountIdentifiedWithSSL
)

type AccountStatus added in v0.6.0

type AccountStatus struct {
	Exist  bool
	Option AccountStatusOption
}

func NewAccountStatus added in v1.2.0

func NewAccountStatus() *AccountStatus

func (*AccountStatus) Format added in v0.6.0

func (node *AccountStatus) Format(ctx *FmtCtx)

func (*AccountStatus) Free added in v1.2.0

func (node *AccountStatus) Free()

func (AccountStatus) TypeName added in v1.2.0

func (node AccountStatus) TypeName() string

type AccountStatusOption added in v0.6.0

type AccountStatusOption int
const (
	AccountStatusOpen AccountStatusOption = iota
	AccountStatusSuspend
	AccountStatusRestricted
)

func (AccountStatusOption) String added in v0.7.0

func (aso AccountStatusOption) String() string

type AccountsSetOption added in v0.8.0

type AccountsSetOption struct {
	All          bool
	SetAccounts  IdentifierList
	AddAccounts  IdentifierList
	DropAccounts IdentifierList
}

func NewAccountsSetOption added in v1.2.0

func NewAccountsSetOption(al bool, se, ad, dr IdentifierList) *AccountsSetOption

func (*AccountsSetOption) Free added in v1.2.0

func (node *AccountsSetOption) Free()

func (AccountsSetOption) TypeName added in v1.2.0

func (node AccountsSetOption) TypeName() string

type AggType

type AggType int

AggType specifies the type of aggregation.

const (
	AGG_TYPE_GENERAL AggType
)

type AlgorithmCopy

type AlgorithmCopy struct {
	// contains filtered or unexported fields
}

type AlgorithmDefault

type AlgorithmDefault struct {
	// contains filtered or unexported fields
}

type AlgorithmInplace

type AlgorithmInplace struct {
	// contains filtered or unexported fields
}

type AliasClause

type AliasClause struct {
	NodeFormatter
	Alias Identifier
	Cols  IdentifierList
}

The alias, optionally with a column list: "AS name" or "AS name(col1, col2)".

func (*AliasClause) Format

func (node *AliasClause) Format(ctx *FmtCtx)

type AliasedTableExpr

type AliasedTableExpr struct {
	TableExpr
	Expr       TableExpr
	As         AliasClause
	IndexHints []*IndexHint
}

the table expression coupled with an optional alias.

func NewAliasedTableExpr

func NewAliasedTableExpr(e TableExpr, a AliasClause) *AliasedTableExpr

func (*AliasedTableExpr) Format

func (node *AliasedTableExpr) Format(ctx *FmtCtx)

type AlterAccount added in v0.6.0

type AlterAccount struct {
	IfExists   bool
	Name       Expr
	AuthOption AlterAccountAuthOption
	// status_option or not
	StatusOption AccountStatus
	// comment or not
	Comment AccountComment
	// contains filtered or unexported fields
}

func NewAlterAccount added in v1.2.0

func NewAlterAccount(exist bool, name Expr, aopt AlterAccountAuthOption, sopt AccountStatus, c AccountComment) *AlterAccount

func (*AlterAccount) Format added in v0.6.0

func (node *AlterAccount) Format(ctx *FmtCtx)

func (*AlterAccount) Free added in v1.2.0

func (node *AlterAccount) Free()

func (*AlterAccount) GetQueryType added in v0.7.0

func (node *AlterAccount) GetQueryType() string

func (*AlterAccount) GetStatementType added in v0.7.0

func (node *AlterAccount) GetStatementType() string

func (*AlterAccount) StmtKind added in v1.2.0

func (node *AlterAccount) StmtKind() StmtKind

func (AlterAccount) TypeName added in v1.2.0

func (node AlterAccount) TypeName() string

type AlterAccountAuthOption added in v0.7.0

type AlterAccountAuthOption struct {
	Exist          bool
	Equal          string
	AdminName      Expr
	IdentifiedType AccountIdentified
}

func (*AlterAccountAuthOption) Format added in v0.7.0

func (node *AlterAccountAuthOption) Format(ctx *FmtCtx)

func (*AlterAccountAuthOption) Free added in v1.2.0

func (node *AlterAccountAuthOption) Free()

func (AlterAccountAuthOption) TypeName added in v1.2.0

func (node AlterAccountAuthOption) TypeName() string

type AlterAddCol added in v0.8.0

type AlterAddCol struct {
	Column   *ColumnTableDef
	Position *ColumnPosition
	// contains filtered or unexported fields
}

suggest rename: AlterAddColumnPosition

func NewAlterAddCol added in v1.2.0

func NewAlterAddCol(column *ColumnTableDef, position *ColumnPosition) *AlterAddCol

func (*AlterAddCol) Format added in v0.8.0

func (node *AlterAddCol) Format(ctx *FmtCtx)

func (*AlterAddCol) Free added in v1.2.0

func (node *AlterAddCol) Free()

func (AlterAddCol) TypeName added in v1.2.0

func (node AlterAddCol) TypeName() string

type AlterColPos added in v0.8.0

type AlterColPos struct {
	PreColName *UnresolvedName
	Pos        int32
}

type AlterColumnOptionType added in v1.0.0

type AlterColumnOptionType int
const (
	AlterColumnOptionSetDefault AlterColumnOptionType = iota
	AlterColumnOptionSetVisibility
	AlterColumnOptionDropDefault
)

AlterColumnOptionType types.

type AlterColumnOrder added in v1.0.0

type AlterColumnOrder struct {
	Column    *UnresolvedName
	Direction Direction
}

func NewAlterColumnOrder added in v1.2.0

func NewAlterColumnOrder(column *UnresolvedName, direction Direction) *AlterColumnOrder

func (*AlterColumnOrder) Format added in v1.0.0

func (node *AlterColumnOrder) Format(ctx *FmtCtx)

func (*AlterColumnOrder) Free added in v1.2.0

func (node *AlterColumnOrder) Free()

func (AlterColumnOrder) TypeName added in v1.2.0

func (node AlterColumnOrder) TypeName() string

type AlterDataBaseConfig added in v0.7.0

type AlterDataBaseConfig struct {
	AccountName    string
	DbName         string
	IsAccountLevel bool
	UpdateConfig   string
	// contains filtered or unexported fields
}

func NewAlterDataBaseConfig added in v1.2.0

func NewAlterDataBaseConfig(accountName, dbName string, isAccountLevel bool, updateConfig string) *AlterDataBaseConfig

func (*AlterDataBaseConfig) Format added in v0.7.0

func (node *AlterDataBaseConfig) Format(ctx *FmtCtx)

func (*AlterDataBaseConfig) Free added in v1.2.0

func (node *AlterDataBaseConfig) Free()

func (*AlterDataBaseConfig) GetQueryType added in v0.7.0

func (node *AlterDataBaseConfig) GetQueryType() string

func (*AlterDataBaseConfig) GetStatementType added in v0.7.0

func (node *AlterDataBaseConfig) GetStatementType() string

func (*AlterDataBaseConfig) StmtKind added in v1.2.0

func (node *AlterDataBaseConfig) StmtKind() StmtKind

func (AlterDataBaseConfig) TypeName added in v1.2.0

func (node AlterDataBaseConfig) TypeName() string

type AlterOptionAdd added in v0.8.0

type AlterOptionAdd struct {
	Def TableDef
	// contains filtered or unexported fields
}

func NewAlterOptionAdd added in v1.2.0

func NewAlterOptionAdd(def TableDef) *AlterOptionAdd

func (*AlterOptionAdd) Format added in v0.8.0

func (node *AlterOptionAdd) Format(ctx *FmtCtx)

func (*AlterOptionAdd) Free added in v1.2.0

func (node *AlterOptionAdd) Free()

func (AlterOptionAdd) TypeName added in v1.2.0

func (node AlterOptionAdd) TypeName() string

type AlterOptionAlterCheck added in v1.0.0

type AlterOptionAlterCheck struct {
	Type    string
	Enforce bool
	// contains filtered or unexported fields
}

func NewAlterOptionAlterCheck added in v1.2.0

func NewAlterOptionAlterCheck(t string, enforce bool) *AlterOptionAlterCheck

func (*AlterOptionAlterCheck) Format added in v1.0.0

func (node *AlterOptionAlterCheck) Format(ctx *FmtCtx)

func (*AlterOptionAlterCheck) Free added in v1.2.0

func (node *AlterOptionAlterCheck) Free()

func (AlterOptionAlterCheck) TypeName added in v1.2.0

func (node AlterOptionAlterCheck) TypeName() string

type AlterOptionAlterIndex added in v0.8.0

type AlterOptionAlterIndex struct {
	Name       Identifier
	Visibility VisibleType
	// contains filtered or unexported fields
}

func NewAlterOptionAlterIndex added in v1.2.0

func NewAlterOptionAlterIndex(name Identifier, visibility VisibleType) *AlterOptionAlterIndex

func (*AlterOptionAlterIndex) Format added in v0.8.0

func (node *AlterOptionAlterIndex) Format(ctx *FmtCtx)

func (*AlterOptionAlterIndex) Free added in v1.2.0

func (node *AlterOptionAlterIndex) Free()

func (AlterOptionAlterIndex) TypeName added in v1.2.0

func (node AlterOptionAlterIndex) TypeName() string

type AlterOptionAlterReIndex added in v1.1.0

type AlterOptionAlterReIndex struct {
	Name          Identifier
	KeyType       IndexType
	AlgoParamList int64
	// contains filtered or unexported fields
}

func NewAlterOptionAlterReIndex added in v1.2.0

func NewAlterOptionAlterReIndex(name Identifier, keyType IndexType, algoParamList int64) *AlterOptionAlterReIndex

func (*AlterOptionAlterReIndex) Format added in v1.1.0

func (node *AlterOptionAlterReIndex) Format(ctx *FmtCtx)

func (*AlterOptionAlterReIndex) Free added in v1.2.0

func (node *AlterOptionAlterReIndex) Free()

func (AlterOptionAlterReIndex) TypeName added in v1.2.0

func (node AlterOptionAlterReIndex) TypeName() string

type AlterOptionDrop added in v0.8.0

type AlterOptionDrop struct {
	Typ  AlterTableDropType
	Name Identifier
	// contains filtered or unexported fields
}

func NewAlterOptionDrop added in v1.2.0

func NewAlterOptionDrop(typ AlterTableDropType, name Identifier) *AlterOptionDrop

func (*AlterOptionDrop) Format added in v0.8.0

func (node *AlterOptionDrop) Format(ctx *FmtCtx)

func (*AlterOptionDrop) Free added in v1.2.0

func (node *AlterOptionDrop) Free()

func (AlterOptionDrop) TypeName added in v1.2.0

func (node AlterOptionDrop) TypeName() string

type AlterOptionTableName added in v1.2.0

type AlterOptionTableName struct {
	Name *UnresolvedObjectName
	// contains filtered or unexported fields
}

func NewAlterOptionTableName added in v1.2.0

func NewAlterOptionTableName(name *UnresolvedObjectName) *AlterOptionTableName

func (*AlterOptionTableName) Format added in v1.2.0

func (node *AlterOptionTableName) Format(ctx *FmtCtx)

func (*AlterOptionTableName) Free added in v1.2.0

func (node *AlterOptionTableName) Free()

func (AlterOptionTableName) TypeName added in v1.2.0

func (node AlterOptionTableName) TypeName() string

type AlterPartitionAddPartitionClause added in v1.1.0

type AlterPartitionAddPartitionClause struct {
	Typ        AlterPartitionOptionType
	Partitions []*Partition
	// contains filtered or unexported fields
}

func NewAlterPartitionAddPartitionClause added in v1.2.0

func NewAlterPartitionAddPartitionClause(typ AlterPartitionOptionType, partitions []*Partition) *AlterPartitionAddPartitionClause

func (*AlterPartitionAddPartitionClause) Format added in v1.1.0

func (node *AlterPartitionAddPartitionClause) Format(ctx *FmtCtx)

func (*AlterPartitionAddPartitionClause) Free added in v1.2.0

func (node *AlterPartitionAddPartitionClause) Free()

func (AlterPartitionAddPartitionClause) TypeName added in v1.2.0

func (node AlterPartitionAddPartitionClause) TypeName() string

type AlterPartitionDropPartitionClause added in v1.1.0

type AlterPartitionDropPartitionClause struct {
	Typ             AlterPartitionOptionType
	PartitionNames  IdentifierList
	OnAllPartitions bool
	// contains filtered or unexported fields
}

func NewAlterPartitionDropPartitionClause added in v1.2.0

func NewAlterPartitionDropPartitionClause(typ AlterPartitionOptionType, partitionNames IdentifierList) *AlterPartitionDropPartitionClause

func (*AlterPartitionDropPartitionClause) Format added in v1.1.0

func (node *AlterPartitionDropPartitionClause) Format(ctx *FmtCtx)

func (*AlterPartitionDropPartitionClause) Free added in v1.2.0

func (node *AlterPartitionDropPartitionClause) Free()

func (AlterPartitionDropPartitionClause) TypeName added in v1.2.0

func (node AlterPartitionDropPartitionClause) TypeName() string

type AlterPartitionOption added in v1.1.0

type AlterPartitionOption interface {
	NodeFormatter
}

type AlterPartitionOptionType added in v1.1.0

type AlterPartitionOptionType int

AlterPartitionOptionType is the type for Alter Table Partition Option Type.

const (
	AlterPartitionAddPartition AlterPartitionOptionType = iota
	AlterPartitionDropPartition
	AlterPartitionDiscardPartition
	AlterPartitionImportPartition
	AlterPartitionTruncatePartition
	AlterPartitionCoalescePartition
	AlterPartitionReorganizePartition
	AlterPartitionExchangePartition
	AlterPartitionAnalyzePartition
	AlterPartitionCheckPartition
	AlterPartitionOptimizePartition
	AlterPartitionRebuildPartition
	AlterPartitionRepairPartition
	AlterPartitionRemovePartitioning
	AlterPartitionRedefinePartition
)

Alter Table Partition types.

type AlterPartitionRedefinePartitionClause added in v1.1.0

type AlterPartitionRedefinePartitionClause struct {
	Typ             AlterPartitionOptionType
	PartitionOption *PartitionOption
	// contains filtered or unexported fields
}

func NewAlterPartitionRedefinePartitionClause added in v1.2.0

func NewAlterPartitionRedefinePartitionClause(typ AlterPartitionOptionType, partitionOption *PartitionOption) *AlterPartitionRedefinePartitionClause

func (*AlterPartitionRedefinePartitionClause) Format added in v1.1.0

func (node *AlterPartitionRedefinePartitionClause) Format(ctx *FmtCtx)

func (*AlterPartitionRedefinePartitionClause) Free added in v1.2.0

func (AlterPartitionRedefinePartitionClause) TypeName added in v1.2.0

type AlterPartitionTruncatePartitionClause added in v1.1.0

type AlterPartitionTruncatePartitionClause struct {
	Typ             AlterPartitionOptionType
	PartitionNames  IdentifierList
	OnAllPartitions bool
	// contains filtered or unexported fields
}

func NewAlterPartitionTruncatePartitionClause added in v1.2.0

func NewAlterPartitionTruncatePartitionClause(typ AlterPartitionOptionType, partitionNames IdentifierList) *AlterPartitionTruncatePartitionClause

func (*AlterPartitionTruncatePartitionClause) Format added in v1.1.0

func (node *AlterPartitionTruncatePartitionClause) Format(ctx *FmtCtx)

func (*AlterPartitionTruncatePartitionClause) Free added in v1.2.0

func (AlterPartitionTruncatePartitionClause) TypeName added in v1.2.0

type AlterPublication added in v0.8.0

type AlterPublication struct {
	IfExists    bool
	Name        Identifier
	AccountsSet *AccountsSetOption
	DbName      string
	Comment     string
	// contains filtered or unexported fields
}

func NewAlterPublication added in v1.2.0

func NewAlterPublication(exist bool, name Identifier, accountsSet *AccountsSetOption, dbName, comment string) *AlterPublication

func (*AlterPublication) Format added in v0.8.0

func (node *AlterPublication) Format(ctx *FmtCtx)

func (*AlterPublication) Free added in v1.2.0

func (node *AlterPublication) Free()

func (*AlterPublication) GetQueryType added in v0.8.0

func (node *AlterPublication) GetQueryType() string

func (*AlterPublication) GetStatementType added in v0.8.0

func (node *AlterPublication) GetStatementType() string

func (*AlterPublication) StmtKind added in v1.2.0

func (node *AlterPublication) StmtKind() StmtKind

func (AlterPublication) TypeName added in v1.2.0

func (node AlterPublication) TypeName() string

type AlterSequence added in v1.0.0

type AlterSequence struct {
	Name        *TableName
	Type        *TypeOption
	IfExists    bool
	IncrementBy *IncrementByOption
	MinValue    *MinValueOption
	MaxValue    *MaxValueOption
	StartWith   *StartWithOption
	Cycle       *CycleOption
	// contains filtered or unexported fields
}

func NewAlterSequence added in v1.2.0

func NewAlterSequence(ifexists bool, name *TableName, typ *TypeOption, incrementby *IncrementByOption, minvalue *MinValueOption, maxvalue *MaxValueOption, startwith *StartWithOption, cycle *CycleOption) *AlterSequence

func (*AlterSequence) Format added in v1.0.0

func (node *AlterSequence) Format(ctx *FmtCtx)

func (*AlterSequence) Free added in v1.2.0

func (node *AlterSequence) Free()

func (*AlterSequence) GetQueryType added in v1.0.0

func (node *AlterSequence) GetQueryType() string

func (*AlterSequence) GetStatementType added in v1.0.0

func (node *AlterSequence) GetStatementType() string

func (*AlterSequence) StmtKind added in v1.2.0

func (node *AlterSequence) StmtKind() StmtKind

func (AlterSequence) TypeName added in v1.2.0

func (node AlterSequence) TypeName() string

type AlterStage added in v1.0.0

type AlterStage struct {
	IfNotExists       bool
	Name              Identifier
	UrlOption         StageUrl
	CredentialsOption StageCredentials
	StatusOption      StageStatus
	Comment           StageComment
	// contains filtered or unexported fields
}

func NewAlterStage added in v1.2.0

func NewAlterStage(ifNotExists bool, name Identifier, urlOption StageUrl, credentialsOption StageCredentials, statusOption StageStatus, comment StageComment) *AlterStage

func (*AlterStage) Format added in v1.0.0

func (node *AlterStage) Format(ctx *FmtCtx)

func (*AlterStage) Free added in v1.2.0

func (node *AlterStage) Free()

func (*AlterStage) GetQueryType added in v1.0.0

func (node *AlterStage) GetQueryType() string

func (*AlterStage) GetStatementType added in v1.0.0

func (node *AlterStage) GetStatementType() string

func (*AlterStage) StmtKind added in v1.2.0

func (node *AlterStage) StmtKind() StmtKind

func (AlterStage) TypeName added in v1.2.0

func (node AlterStage) TypeName() string

type AlterTable added in v0.8.0

type AlterTable struct {
	Table           *TableName
	Options         AlterTableOptions
	PartitionOption AlterPartitionOption
	// contains filtered or unexported fields
}

AlterTable see https://dev.mysql.com/doc/refman/8.0/en/alter-table.html

func NewAlterTable added in v1.2.0

func NewAlterTable(table *TableName) *AlterTable

func (*AlterTable) Format added in v0.8.0

func (node *AlterTable) Format(ctx *FmtCtx)

func (*AlterTable) Free added in v1.2.0

func (node *AlterTable) Free()

func (*AlterTable) GetQueryType added in v0.8.0

func (node *AlterTable) GetQueryType() string

func (*AlterTable) GetStatementType added in v0.8.0

func (node *AlterTable) GetStatementType() string

func (*AlterTable) StmtKind added in v1.2.0

func (node *AlterTable) StmtKind() StmtKind

func (AlterTable) TypeName added in v1.2.0

func (node AlterTable) TypeName() string

type AlterTableAddColumnClause added in v1.0.0

type AlterTableAddColumnClause struct {
	Typ        AlterTableOptionType
	NewColumns []*ColumnTableDef
	Position   *ColumnPosition
	// contains filtered or unexported fields
}

func NewAlterTableAddColumnClause added in v1.2.0

func NewAlterTableAddColumnClause(typ AlterTableOptionType, newColumns []*ColumnTableDef, position *ColumnPosition) *AlterTableAddColumnClause

func (*AlterTableAddColumnClause) Format added in v1.0.0

func (node *AlterTableAddColumnClause) Format(ctx *FmtCtx)

func (*AlterTableAddColumnClause) Free added in v1.2.0

func (node *AlterTableAddColumnClause) Free()

func (AlterTableAddColumnClause) TypeName added in v1.2.0

func (node AlterTableAddColumnClause) TypeName() string

type AlterTableAlterColumnClause added in v1.0.0

type AlterTableAlterColumnClause struct {
	Typ         AlterTableOptionType
	ColumnName  *UnresolvedName
	DefalutExpr *AttributeDefault
	Visibility  VisibleType
	OptionType  AlterColumnOptionType
	// contains filtered or unexported fields
}

func NewAlterTableAlterColumnClause added in v1.2.0

func NewAlterTableAlterColumnClause(typ AlterTableOptionType, columnName *UnresolvedName, defalutExpr *AttributeDefault, visibility VisibleType, optionType AlterColumnOptionType) *AlterTableAlterColumnClause

func (*AlterTableAlterColumnClause) Format added in v1.0.0

func (node *AlterTableAlterColumnClause) Format(ctx *FmtCtx)

func (*AlterTableAlterColumnClause) Free added in v1.2.0

func (node *AlterTableAlterColumnClause) Free()

func (AlterTableAlterColumnClause) TypeName added in v1.2.0

func (node AlterTableAlterColumnClause) TypeName() string

type AlterTableChangeColumnClause added in v1.0.0

type AlterTableChangeColumnClause struct {
	Typ           AlterTableOptionType
	OldColumnName *UnresolvedName
	NewColumn     *ColumnTableDef
	Position      *ColumnPosition
	// contains filtered or unexported fields
}

func NewAlterTableChangeColumnClause added in v1.2.0

func NewAlterTableChangeColumnClause(typ AlterTableOptionType, oldColumnName *UnresolvedName, newColumn *ColumnTableDef, position *ColumnPosition) *AlterTableChangeColumnClause

func (*AlterTableChangeColumnClause) Format added in v1.0.0

func (node *AlterTableChangeColumnClause) Format(ctx *FmtCtx)

func (*AlterTableChangeColumnClause) Free added in v1.2.0

func (node *AlterTableChangeColumnClause) Free()

func (AlterTableChangeColumnClause) TypeName added in v1.2.0

func (node AlterTableChangeColumnClause) TypeName() string

type AlterTableDropType added in v0.8.0

type AlterTableDropType int
const (
	AlterTableDropColumn AlterTableDropType = iota
	AlterTableDropIndex
	AlterTableDropKey
	AlterTableDropPrimaryKey
	AlterTableDropForeignKey
)

type AlterTableModifyColumnClause added in v1.0.0

type AlterTableModifyColumnClause struct {
	Typ       AlterTableOptionType
	NewColumn *ColumnTableDef
	Position  *ColumnPosition
	// contains filtered or unexported fields
}

func NewAlterTableModifyColumnClause added in v1.2.0

func NewAlterTableModifyColumnClause(typ AlterTableOptionType, newColumn *ColumnTableDef, position *ColumnPosition) *AlterTableModifyColumnClause

func (*AlterTableModifyColumnClause) Format added in v1.0.0

func (node *AlterTableModifyColumnClause) Format(ctx *FmtCtx)

func (*AlterTableModifyColumnClause) Free added in v1.2.0

func (node *AlterTableModifyColumnClause) Free()

func (AlterTableModifyColumnClause) TypeName added in v1.2.0

func (node AlterTableModifyColumnClause) TypeName() string

type AlterTableOption added in v0.8.0

type AlterTableOption interface {
	NodeFormatter
}

type AlterTableOptionType added in v1.0.0

type AlterTableOptionType int
const (
	AlterTableModifyColumn AlterTableOptionType = iota
	AlterTableChangeColumn
	AlterTableRenameColumn
	AlterTableAlterColumn
	AlterTableOrderByColumn
	AlterTableAddConstraint
	AlterTableAddColumn
)

AlterTable types.

type AlterTableOptions added in v0.8.0

type AlterTableOptions = []AlterTableOption

type AlterTableOrderByColumnClause added in v1.0.0

type AlterTableOrderByColumnClause struct {
	Typ              AlterTableOptionType
	AlterOrderByList []*AlterColumnOrder
	// contains filtered or unexported fields
}

func NewAlterTableOrderByColumnClause added in v1.2.0

func NewAlterTableOrderByColumnClause(typ AlterTableOptionType, alterOrderByList []*AlterColumnOrder) *AlterTableOrderByColumnClause

func (*AlterTableOrderByColumnClause) Format added in v1.0.0

func (node *AlterTableOrderByColumnClause) Format(ctx *FmtCtx)

func (*AlterTableOrderByColumnClause) Free added in v1.2.0

func (node *AlterTableOrderByColumnClause) Free()

func (AlterTableOrderByColumnClause) TypeName added in v1.2.0

func (node AlterTableOrderByColumnClause) TypeName() string

type AlterTableRenameColumnClause added in v1.0.0

type AlterTableRenameColumnClause struct {
	Typ           AlterTableOptionType
	OldColumnName *UnresolvedName
	NewColumnName *UnresolvedName
	// contains filtered or unexported fields
}

func NewAlterTableRenameColumnClause added in v1.2.0

func NewAlterTableRenameColumnClause(typ AlterTableOptionType, oldColumnName *UnresolvedName, newColumnName *UnresolvedName) *AlterTableRenameColumnClause

func (*AlterTableRenameColumnClause) Format added in v1.0.0

func (node *AlterTableRenameColumnClause) Format(ctx *FmtCtx)

func (*AlterTableRenameColumnClause) Free added in v1.2.0

func (node *AlterTableRenameColumnClause) Free()

func (AlterTableRenameColumnClause) TypeName added in v1.2.0

func (node AlterTableRenameColumnClause) TypeName() string

type AlterUser

type AlterUser struct {
	IfExists bool
	Users    []*User
	Role     *Role
	MiscOpt  UserMiscOption
	// comment or attribute
	CommentOrAttribute AccountCommentOrAttribute
	// contains filtered or unexported fields
}

func NewAlterUser

func NewAlterUser(ifExists bool, users []*User, role *Role, miscOpt UserMiscOption, commentOrAttribute AccountCommentOrAttribute) *AlterUser

func (*AlterUser) Format

func (node *AlterUser) Format(ctx *FmtCtx)

func (*AlterUser) Free added in v1.2.0

func (node *AlterUser) Free()

func (*AlterUser) GetQueryType added in v0.7.0

func (node *AlterUser) GetQueryType() string

func (*AlterUser) GetStatementType added in v0.7.0

func (node *AlterUser) GetStatementType() string

func (*AlterUser) StmtKind added in v1.2.0

func (node *AlterUser) StmtKind() StmtKind

func (AlterUser) TypeName added in v1.2.0

func (node AlterUser) TypeName() string

type AlterView added in v0.7.0

type AlterView struct {
	IfExists bool
	Name     *TableName
	ColNames IdentifierList
	AsSource *Select
	// contains filtered or unexported fields
}

func NewAlterView added in v1.2.0

func NewAlterView(exist bool, name *TableName, colNames IdentifierList, asSource *Select) *AlterView

func (*AlterView) Format added in v0.7.0

func (node *AlterView) Format(ctx *FmtCtx)

func (*AlterView) Free added in v1.2.0

func (node *AlterView) Free()

func (*AlterView) GetQueryType added in v0.7.0

func (node *AlterView) GetQueryType() string

func (*AlterView) GetStatementType added in v0.7.0

func (node *AlterView) GetStatementType() string

func (*AlterView) StmtKind added in v1.2.0

func (node *AlterView) StmtKind() StmtKind

func (AlterView) TypeName added in v1.2.0

func (node AlterView) TypeName() string

type AnalyzeStmt

type AnalyzeStmt struct {
	Table *TableName
	Cols  IdentifierList
	// contains filtered or unexported fields
}

Use statement

func NewAnalyzeStmt

func NewAnalyzeStmt(tbl *TableName, cols IdentifierList) *AnalyzeStmt

func (*AnalyzeStmt) Format

func (node *AnalyzeStmt) Format(ctx *FmtCtx)

func (*AnalyzeStmt) Free added in v1.2.0

func (node *AnalyzeStmt) Free()

func (*AnalyzeStmt) GetQueryType added in v0.7.0

func (node *AnalyzeStmt) GetQueryType() string

func (*AnalyzeStmt) GetStatementType added in v0.7.0

func (node *AnalyzeStmt) GetStatementType() string

func (*AnalyzeStmt) StmtKind added in v1.2.0

func (node *AnalyzeStmt) StmtKind() StmtKind

func (AnalyzeStmt) TypeName added in v1.2.0

func (node AnalyzeStmt) TypeName() string

type AndExpr

type AndExpr struct {
	Left, Right Expr
	// contains filtered or unexported fields
}

and expression

func NewAndExpr

func NewAndExpr(l, r Expr) *AndExpr

func (*AndExpr) Accept added in v0.8.0

func (node *AndExpr) Accept(v Visitor) (Expr, bool)

func (*AndExpr) Format

func (node *AndExpr) Format(ctx *FmtCtx)

func (*AndExpr) String

func (node *AndExpr) String() string

type Assignment

type Assignment struct {
	Column Identifier
	Expr   Expr
}

type AtTimeStamp added in v1.2.0

type AtTimeStamp struct {
	Type ATTimeStampType
	Expr Expr
}

func (*AtTimeStamp) Format added in v1.2.0

func (node *AtTimeStamp) Format(ctx *FmtCtx)

type AttributeAutoIncrement

type AttributeAutoIncrement struct {
	IsAutoIncrement bool
	// contains filtered or unexported fields
}

func NewAttributeAutoIncrement

func NewAttributeAutoIncrement() *AttributeAutoIncrement

func (*AttributeAutoIncrement) Format

func (node *AttributeAutoIncrement) Format(ctx *FmtCtx)

func (*AttributeAutoIncrement) Free added in v1.2.0

func (node *AttributeAutoIncrement) Free()

func (AttributeAutoIncrement) TypeName added in v1.2.0

func (node AttributeAutoIncrement) TypeName() string

type AttributeAutoRandom

type AttributeAutoRandom struct {
	BitLength int
	// contains filtered or unexported fields
}

func NewAttributeAutoRandom

func NewAttributeAutoRandom(b int) *AttributeAutoRandom

func (AttributeAutoRandom) TypeName added in v1.2.0

func (node AttributeAutoRandom) TypeName() string

type AttributeCheckConstraint

type AttributeCheckConstraint struct {
	Name     string
	Expr     Expr
	Enforced bool
	// contains filtered or unexported fields
}

func NewAttributeCheckConstraint added in v1.2.0

func NewAttributeCheckConstraint(e Expr, f bool, n string) *AttributeCheckConstraint

func (*AttributeCheckConstraint) Format

func (node *AttributeCheckConstraint) Format(ctx *FmtCtx)

func (*AttributeCheckConstraint) Free added in v1.2.0

func (node *AttributeCheckConstraint) Free()

func (AttributeCheckConstraint) TypeName added in v1.2.0

func (node AttributeCheckConstraint) TypeName() string

type AttributeCollate

type AttributeCollate struct {
	Collate string
	// contains filtered or unexported fields
}

func NewAttributeCollate

func NewAttributeCollate(c string) *AttributeCollate

func (*AttributeCollate) Format

func (node *AttributeCollate) Format(ctx *FmtCtx)

func (*AttributeCollate) Free added in v1.2.0

func (node *AttributeCollate) Free()

func (AttributeCollate) TypeName added in v1.2.0

func (node AttributeCollate) TypeName() string

type AttributeColumnFormat

type AttributeColumnFormat struct {
	ColumnFormat string
	// contains filtered or unexported fields
}

func NewAttributeColumnFormat

func NewAttributeColumnFormat(f string) *AttributeColumnFormat

func (*AttributeColumnFormat) Format

func (node *AttributeColumnFormat) Format(ctx *FmtCtx)

func (*AttributeColumnFormat) Free added in v1.2.0

func (node *AttributeColumnFormat) Free()

func (AttributeColumnFormat) TypeName added in v1.2.0

func (node AttributeColumnFormat) TypeName() string

type AttributeComment

type AttributeComment struct {
	CMT Expr
	// contains filtered or unexported fields
}

func NewAttributeComment

func NewAttributeComment(c Expr) *AttributeComment

func (*AttributeComment) Format

func (node *AttributeComment) Format(ctx *FmtCtx)

func (*AttributeComment) Free added in v1.2.0

func (node *AttributeComment) Free()

func (AttributeComment) TypeName added in v1.2.0

func (node AttributeComment) TypeName() string

type AttributeDefault

type AttributeDefault struct {
	Expr Expr
	// contains filtered or unexported fields
}

func NewAttributeDefault

func NewAttributeDefault(e Expr) *AttributeDefault

func (*AttributeDefault) Format

func (node *AttributeDefault) Format(ctx *FmtCtx)

func (*AttributeDefault) Free added in v1.2.0

func (node *AttributeDefault) Free()

func (AttributeDefault) TypeName added in v1.2.0

func (node AttributeDefault) TypeName() string

type AttributeGeneratedAlways

type AttributeGeneratedAlways struct {
	Expr   Expr
	Stored bool
	// contains filtered or unexported fields
}

func NewAttributeGeneratedAlways

func NewAttributeGeneratedAlways(e Expr, s bool) *AttributeGeneratedAlways

func (*AttributeGeneratedAlways) Format

func (node *AttributeGeneratedAlways) Format(ctx *FmtCtx)

func (*AttributeGeneratedAlways) Free added in v1.2.0

func (node *AttributeGeneratedAlways) Free()

func (AttributeGeneratedAlways) TypeName added in v1.2.0

func (node AttributeGeneratedAlways) TypeName() string

type AttributeHeader added in v1.0.0

type AttributeHeader struct {
	Key string
	// contains filtered or unexported fields
}

func NewAttributeHeader added in v1.0.0

func NewAttributeHeader(key string) *AttributeHeader

func (*AttributeHeader) Format added in v1.0.0

func (node *AttributeHeader) Format(ctx *FmtCtx)

func (*AttributeHeader) Free added in v1.2.0

func (node *AttributeHeader) Free()

func (AttributeHeader) TypeName added in v1.2.0

func (node AttributeHeader) TypeName() string

type AttributeHeaders added in v1.0.0

type AttributeHeaders struct {
	// contains filtered or unexported fields
}

func NewAttributeHeaders added in v1.0.0

func NewAttributeHeaders() *AttributeHeaders

func (*AttributeHeaders) Format added in v1.0.0

func (node *AttributeHeaders) Format(ctx *FmtCtx)

func (*AttributeHeaders) Free added in v1.2.0

func (node *AttributeHeaders) Free()

func (AttributeHeaders) TypeName added in v1.2.0

func (node AttributeHeaders) TypeName() string

type AttributeKey

type AttributeKey struct {
	// contains filtered or unexported fields
}

func NewAttributeKey

func NewAttributeKey() *AttributeKey

func (*AttributeKey) Format

func (node *AttributeKey) Format(ctx *FmtCtx)

func (*AttributeKey) Free added in v1.2.0

func (node *AttributeKey) Free()

func (AttributeKey) TypeName added in v1.2.0

func (node AttributeKey) TypeName() string

type AttributeLowCardinality added in v0.6.0

type AttributeLowCardinality struct {
	// contains filtered or unexported fields
}

func NewAttributeLowCardinality added in v0.6.0

func NewAttributeLowCardinality() *AttributeLowCardinality

func (*AttributeLowCardinality) Format added in v0.6.0

func (node *AttributeLowCardinality) Format(ctx *FmtCtx)

func (*AttributeLowCardinality) Free added in v1.2.0

func (node *AttributeLowCardinality) Free()

func (AttributeLowCardinality) TypeName added in v1.2.0

func (node AttributeLowCardinality) TypeName() string

type AttributeNull

type AttributeNull struct {
	Is bool // true NULL (default); false NOT NULL
	// contains filtered or unexported fields
}

func NewAttributeNull

func NewAttributeNull(b bool) *AttributeNull

func (*AttributeNull) Format

func (node *AttributeNull) Format(ctx *FmtCtx)

func (*AttributeNull) Free added in v1.2.0

func (node *AttributeNull) Free()

func (AttributeNull) TypeName added in v1.2.0

func (node AttributeNull) TypeName() string

type AttributeOnUpdate

type AttributeOnUpdate struct {
	Expr Expr
	// contains filtered or unexported fields
}

func NewAttributeOnUpdate

func NewAttributeOnUpdate(e Expr) *AttributeOnUpdate

func (*AttributeOnUpdate) Format added in v0.6.0

func (node *AttributeOnUpdate) Format(ctx *FmtCtx)

func (*AttributeOnUpdate) Free added in v1.2.0

func (node *AttributeOnUpdate) Free()

func (AttributeOnUpdate) TypeName added in v1.2.0

func (node AttributeOnUpdate) TypeName() string

type AttributePrimaryKey

type AttributePrimaryKey struct {
	// contains filtered or unexported fields
}

func NewAttributePrimaryKey

func NewAttributePrimaryKey() *AttributePrimaryKey

func (*AttributePrimaryKey) Format

func (node *AttributePrimaryKey) Format(ctx *FmtCtx)

func (*AttributePrimaryKey) Free added in v1.2.0

func (node *AttributePrimaryKey) Free()

func (AttributePrimaryKey) TypeName added in v1.2.0

func (node AttributePrimaryKey) TypeName() string

type AttributeReference

type AttributeReference struct {
	TableName *TableName
	KeyParts  []*KeyPart
	Match     MatchType
	OnDelete  ReferenceOptionType
	OnUpdate  ReferenceOptionType
	// contains filtered or unexported fields
}

func (*AttributeReference) Format

func (node *AttributeReference) Format(ctx *FmtCtx)

func (*AttributeReference) Free added in v1.2.0

func (node *AttributeReference) Free()

func (AttributeReference) TypeName added in v1.2.0

func (node AttributeReference) TypeName() string

type AttributeStorage

type AttributeStorage struct {
	Storage string
	// contains filtered or unexported fields
}

func NewAttributeStorage

func NewAttributeStorage(s string) *AttributeStorage

func (*AttributeStorage) Format

func (node *AttributeStorage) Format(ctx *FmtCtx)

func (*AttributeStorage) Free added in v1.2.0

func (node *AttributeStorage) Free()

func (AttributeStorage) TypeName added in v1.2.0

func (node AttributeStorage) TypeName() string

type AttributeUnique

type AttributeUnique struct {
	// contains filtered or unexported fields
}

func NewAttributeUnique

func NewAttributeUnique() *AttributeUnique

func (*AttributeUnique) Format

func (node *AttributeUnique) Format(ctx *FmtCtx)

func (*AttributeUnique) Free added in v1.2.0

func (node *AttributeUnique) Free()

func (AttributeUnique) TypeName added in v1.2.0

func (node AttributeUnique) TypeName() string

type AttributeUniqueKey

type AttributeUniqueKey struct {
	// contains filtered or unexported fields
}

func NewAttributeUniqueKey

func NewAttributeUniqueKey() *AttributeUniqueKey

func (*AttributeUniqueKey) Format

func (node *AttributeUniqueKey) Format(ctx *FmtCtx)

func (*AttributeUniqueKey) Free added in v1.2.0

func (node *AttributeUniqueKey) Free()

func (AttributeUniqueKey) TypeName added in v1.2.0

func (node AttributeUniqueKey) TypeName() string

type AttributeVisable added in v1.0.0

type AttributeVisable struct {
	Is bool // true NULL (default); false NOT NULL
	// contains filtered or unexported fields
}

func NewAttributeVisable added in v1.0.0

func NewAttributeVisable(b bool) *AttributeVisable

func (*AttributeVisable) Format added in v1.0.0

func (node *AttributeVisable) Format(ctx *FmtCtx)

func (*AttributeVisable) Free added in v1.2.0

func (node *AttributeVisable) Free()

func (AttributeVisable) TypeName added in v1.2.0

func (node AttributeVisable) TypeName() string

type AuthRecord

type AuthRecord struct {
	AuthPlugin string
	AuthString string
	HashString string
	ByAuth     bool
}

type BackupStart added in v1.0.0

type BackupStart struct {
	Timestamp   string
	IsS3        bool
	Dir         string
	Parallelism string
	// s3 option
	Option []string

	// incremental backup
	BackupType string
	BackupTs   string
	// contains filtered or unexported fields
}

func NewBackupStart added in v1.2.0

func NewBackupStart(timestamp string, isS3 bool, dir string, parallelism string, option []string, backupType, backupTs string) *BackupStart

func (*BackupStart) Format added in v1.0.0

func (node *BackupStart) Format(ctx *FmtCtx)

func (*BackupStart) Free added in v1.2.0

func (node *BackupStart) Free()

func (*BackupStart) GetQueryType added in v1.0.0

func (node *BackupStart) GetQueryType() string

func (*BackupStart) GetStatementType added in v1.0.0

func (node *BackupStart) GetStatementType() string

func (*BackupStart) StmtKind added in v1.2.0

func (node *BackupStart) StmtKind() StmtKind

func (BackupStart) TypeName added in v1.2.0

func (node BackupStart) TypeName() string

type BeginCompound added in v0.8.0

type BeginCompound struct {
	// contains filtered or unexported fields
}

Begin statement

func (*BeginCompound) Format added in v0.8.0

func (node *BeginCompound) Format(ctx *FmtCtx)

func (*BeginCompound) Free added in v1.2.0

func (s *BeginCompound) Free()

func (*BeginCompound) GetQueryType added in v0.8.0

func (node *BeginCompound) GetQueryType() string

func (*BeginCompound) GetStatementType added in v0.8.0

func (node *BeginCompound) GetStatementType() string

type BeginTransaction

type BeginTransaction struct {
	Modes TransactionModes
	// contains filtered or unexported fields
}

Begin statement

func NewBeginTransaction

func NewBeginTransaction(m TransactionModes) *BeginTransaction

func (*BeginTransaction) Format

func (node *BeginTransaction) Format(ctx *FmtCtx)

func (*BeginTransaction) Free added in v1.2.0

func (s *BeginTransaction) Free()

func (*BeginTransaction) GetQueryType added in v0.7.0

func (node *BeginTransaction) GetQueryType() string

func (*BeginTransaction) GetStatementType added in v0.7.0

func (node *BeginTransaction) GetStatementType() string

func (*BeginTransaction) StmtKind added in v1.2.0

func (node *BeginTransaction) StmtKind() StmtKind

type BinaryExpr

type BinaryExpr struct {

	//operator
	Op BinaryOp

	//left expression
	Left Expr

	//right expression
	Right Expr
	// contains filtered or unexported fields
}

binary expression

func NewBinaryExpr

func NewBinaryExpr(op BinaryOp, left Expr, right Expr) *BinaryExpr

func (*BinaryExpr) Accept added in v0.8.0

func (node *BinaryExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*BinaryExpr) Format

func (node *BinaryExpr) Format(ctx *FmtCtx)

func (*BinaryExpr) String

func (node *BinaryExpr) String() string

type BinaryOp

type BinaryOp int

Binary Operator

const (
	PLUS BinaryOp = iota
	MINUS
	MULTI
	DIV         // /
	INTEGER_DIV //
	BIT_OR      // |
	BIT_AND     // &
	BIT_XOR     // ^
	LEFT_SHIFT  // <<
	RIGHT_SHIFT // >>
	MOD         // %
)

func (BinaryOp) ToString

func (op BinaryOp) ToString() string

type BitCastExpr added in v1.0.0

type BitCastExpr struct {
	Expr Expr
	Type ResolvableTypeReference
	// contains filtered or unexported fields
}

func NewBitCastExpr added in v1.0.0

func NewBitCastExpr(e Expr, t ResolvableTypeReference) *BitCastExpr

func (*BitCastExpr) Accept added in v1.0.0

func (node *BitCastExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*BitCastExpr) Format added in v1.0.0

func (node *BitCastExpr) Format(ctx *FmtCtx)

func (*BitCastExpr) String added in v1.0.0

func (node *BitCastExpr) String() string

type BoundType added in v0.8.0

type BoundType int
const (
	Following BoundType = iota
	Preceding
	CurrentRow
)

type CStr added in v0.8.0

type CStr struct {
	// contains filtered or unexported fields
}

func NewCStr added in v0.8.0

func NewCStr(str string, lower int64) *CStr

func NewCStrUseOrigin added in v1.2.0

func NewCStrUseOrigin(str string, useOrigin int64) *CStr

func (*CStr) Compare added in v0.8.0

func (cs *CStr) Compare() string

func (*CStr) Empty added in v0.8.0

func (cs *CStr) Empty() bool

func (*CStr) Origin added in v0.8.0

func (cs *CStr) Origin() string

func (*CStr) SetConfig added in v0.8.0

func (cs *CStr) SetConfig(lower int64)

func (*CStr) ToLower added in v0.8.0

func (cs *CStr) ToLower() string

type CStrParts added in v1.2.0

type CStrParts [4]*CStr

type CTE

type CTE struct {
	Name *AliasClause
	Stmt Statement
}

func (*CTE) Format

func (node *CTE) Format(ctx *FmtCtx)

type CallStmt added in v0.8.0

type CallStmt struct {
	Name *ProcedureName
	Args Exprs
	// contains filtered or unexported fields
}

func (*CallStmt) Format added in v0.8.0

func (node *CallStmt) Format(ctx *FmtCtx)

func (*CallStmt) Free added in v1.2.0

func (node *CallStmt) Free()

func (*CallStmt) GetQueryType added in v0.8.0

func (node *CallStmt) GetQueryType() string

func (*CallStmt) GetStatementType added in v0.8.0

func (node *CallStmt) GetStatementType() string

func (*CallStmt) StmtKind added in v1.2.0

func (node *CallStmt) StmtKind() StmtKind

func (CallStmt) TypeName added in v1.2.0

func (node CallStmt) TypeName() string

type CancelDaemonTask added in v1.1.0

type CancelDaemonTask struct {
	TaskID uint64
	// contains filtered or unexported fields
}

func (*CancelDaemonTask) Format added in v1.1.0

func (node *CancelDaemonTask) Format(ctx *FmtCtx)

func (*CancelDaemonTask) Free added in v1.2.0

func (s *CancelDaemonTask) Free()

func (*CancelDaemonTask) GetQueryType added in v1.1.0

func (node *CancelDaemonTask) GetQueryType() string

func (*CancelDaemonTask) GetStatementType added in v1.1.0

func (node *CancelDaemonTask) GetStatementType() string

func (*CancelDaemonTask) StmtKind added in v1.2.0

func (node *CancelDaemonTask) StmtKind() StmtKind

type CaseExpr

type CaseExpr struct {
	Expr  Expr
	Whens []*When
	Else  Expr
	// contains filtered or unexported fields
}

Case-When expression.

func NewCaseExpr

func NewCaseExpr(e Expr, w []*When, el Expr) *CaseExpr

func (*CaseExpr) Accept added in v0.8.0

func (node *CaseExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*CaseExpr) Format

func (node *CaseExpr) Format(ctx *FmtCtx)

func (*CaseExpr) String

func (node *CaseExpr) String() string

type CaseStmt added in v0.8.0

type CaseStmt struct {
	Expr  Expr
	Whens []*WhenStmt
	Else  []Statement
	// contains filtered or unexported fields
}

func (*CaseStmt) Format added in v0.8.0

func (node *CaseStmt) Format(ctx *FmtCtx)

func (*CaseStmt) Free added in v1.2.0

func (s *CaseStmt) Free()

func (*CaseStmt) GetQueryType added in v0.8.0

func (node *CaseStmt) GetQueryType() string

func (*CaseStmt) GetStatementType added in v0.8.0

func (node *CaseStmt) GetStatementType() string

type CastExpr

type CastExpr struct {
	Expr Expr
	Type ResolvableTypeReference
	// contains filtered or unexported fields
}

the Cast expression

func NewCastExpr

func NewCastExpr(e Expr, t ResolvableTypeReference) *CastExpr

func (*CastExpr) Accept added in v0.8.0

func (node *CastExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*CastExpr) Format

func (node *CastExpr) Format(ctx *FmtCtx)

func (*CastExpr) String

func (node *CastExpr) String() string

type CheckIndex

type CheckIndex struct {
	Expr     Expr
	Enforced bool
	// contains filtered or unexported fields
}

func NewCheckIndex

func NewCheckIndex(e Expr, en bool) *CheckIndex

func (*CheckIndex) Format

func (node *CheckIndex) Format(ctx *FmtCtx)

func (*CheckIndex) Free added in v1.2.0

func (node *CheckIndex) Free()

func (CheckIndex) TypeName added in v1.2.0

func (node CheckIndex) TypeName() string

type ClusterByOption added in v0.7.0

type ClusterByOption struct {
	ColumnList []*UnresolvedName
}

func NewClusterByOption added in v1.2.0

func NewClusterByOption(c []*UnresolvedName) *ClusterByOption

func (*ClusterByOption) Free added in v1.2.0

func (node *ClusterByOption) Free()

func (ClusterByOption) TypeName added in v1.2.0

func (node ClusterByOption) TypeName() string

type ColumnAttribute

type ColumnAttribute interface {
	NodeFormatter
}

column attribute

type ColumnItem

type ColumnItem struct {
	IdentifierName

	//the name of the column
	ColumnName Identifier
}

type ColumnPosition added in v1.0.0

type ColumnPosition struct {
	NodeFormatter
	// Tp is either ColumnPositionNone, ColumnPositionFirst or ColumnPositionAfter.
	Typ ColumnPositionType
	// RelativeColumn is the column the newly added column after if type is ColumnPositionAfter
	RelativeColumn *UnresolvedName
}

ColumnPosition represent the position of the newly added column

func NewColumnPosition added in v1.2.0

func NewColumnPosition(typ ColumnPositionType, relativeColumn *UnresolvedName) *ColumnPosition

func (*ColumnPosition) Format added in v1.0.0

func (node *ColumnPosition) Format(ctx *FmtCtx)

func (*ColumnPosition) Free added in v1.2.0

func (node *ColumnPosition) Free()

func (ColumnPosition) TypeName added in v1.2.0

func (node ColumnPosition) TypeName() string

type ColumnPositionType added in v1.0.0

type ColumnPositionType int

ColumnPositionType is the type for ColumnPosition.

const (
	ColumnPositionNone  ColumnPositionType = -1
	ColumnPositionFirst ColumnPositionType = 0
	ColumnPositionAfter ColumnPositionType = 1
)

ColumnPosition Types Do not change the value of a constant, as there are external dependencies

type ColumnTableDef

type ColumnTableDef struct {
	Name       *UnresolvedName
	Type       ResolvableTypeReference
	Attributes []ColumnAttribute
	// contains filtered or unexported fields
}

func (*ColumnTableDef) Format

func (node *ColumnTableDef) Format(ctx *FmtCtx)

func (*ColumnTableDef) Free added in v1.2.0

func (node *ColumnTableDef) Free()

func (ColumnTableDef) TypeName added in v1.2.0

func (node ColumnTableDef) TypeName() string

type CommitTransaction

type CommitTransaction struct {
	Type CompletionType
	// contains filtered or unexported fields
}

Commit statement

func NewCommitTransaction

func NewCommitTransaction(t CompletionType) *CommitTransaction

func (*CommitTransaction) Format

func (node *CommitTransaction) Format(ctx *FmtCtx)

func (*CommitTransaction) Free added in v1.2.0

func (s *CommitTransaction) Free()

func (*CommitTransaction) GetQueryType added in v0.7.0

func (node *CommitTransaction) GetQueryType() string

func (*CommitTransaction) GetStatementType added in v0.7.0

func (node *CommitTransaction) GetStatementType() string

func (*CommitTransaction) StmtKind added in v1.2.0

func (node *CommitTransaction) StmtKind() StmtKind

type ComparisonExpr

type ComparisonExpr struct {
	Op ComparisonOp

	//ANY SOME ALL with subquery
	SubOp  ComparisonOp
	Left   Expr
	Right  Expr
	Escape Expr
	// contains filtered or unexported fields
}

func NewComparisonExpr

func NewComparisonExpr(op ComparisonOp, l, r Expr) *ComparisonExpr

func NewComparisonExprWithEscape

func NewComparisonExprWithEscape(op ComparisonOp, l, r, e Expr) *ComparisonExpr

func NewComparisonExprWithSubop

func NewComparisonExprWithSubop(op, subop ComparisonOp, l, r Expr) *ComparisonExpr

func NewSubqueryComparisonExpr added in v0.5.0

func NewSubqueryComparisonExpr(op ComparisonOp, subOp ComparisonOp, l, r Expr) *ComparisonExpr

func (*ComparisonExpr) Accept added in v0.8.0

func (node *ComparisonExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*ComparisonExpr) Format

func (node *ComparisonExpr) Format(ctx *FmtCtx)

func (*ComparisonExpr) String

func (node *ComparisonExpr) String() string

type ComparisonOp

type ComparisonOp int

comparion operation

const (
	EQUAL            ComparisonOp = iota // =
	LESS_THAN                            // <
	LESS_THAN_EQUAL                      // <=
	GREAT_THAN                           // >
	GREAT_THAN_EQUAL                     // >=
	NOT_EQUAL                            // <>, !=
	IN                                   // IN
	NOT_IN                               // NOT IN
	LIKE                                 // LIKE
	NOT_LIKE                             // NOT LIKE
	ILIKE
	NOT_ILIKE
	REG_MATCH     // REG_MATCH
	NOT_REG_MATCH // NOT REG_MATCH
	IS_DISTINCT_FROM
	IS_NOT_DISTINCT_FROM
	NULL_SAFE_EQUAL // <=>
	//reference: https://dev.mysql.com/doc/refman/8.0/en/all-subqueries.html
	//subquery with ANY,SOME,ALL
	//operand comparison_operator [ANY | SOME | ALL] (subquery)
	ANY
	SOME
	ALL
)

func (ComparisonOp) ToString

func (op ComparisonOp) ToString() string

type CompletionType

type CompletionType int
const (
	COMPLETION_TYPE_NO_CHAIN CompletionType = iota
	COMPLETION_TYPE_CHAIN
	COMPLETION_TYPE_RELEASE
)

type CompoundStmt added in v0.8.0

type CompoundStmt struct {
	Stmts []Statement
	// contains filtered or unexported fields
}

func NewCompoundStmt added in v0.8.0

func NewCompoundStmt(s []Statement) *CompoundStmt

func (*CompoundStmt) Format added in v0.8.0

func (node *CompoundStmt) Format(ctx *FmtCtx)

func (*CompoundStmt) Free added in v1.2.0

func (s *CompoundStmt) Free()

func (*CompoundStmt) GetQueryType added in v0.8.0

func (node *CompoundStmt) GetQueryType() string

func (*CompoundStmt) GetStatementType added in v0.8.0

func (node *CompoundStmt) GetStatementType() string

type ConnectorOption added in v1.1.0

type ConnectorOption struct {
	Key Identifier
	Val Expr
	// contains filtered or unexported fields
}

func NewConnectorOption added in v1.2.0

func NewConnectorOption(k Identifier, v Expr) *ConnectorOption

func (*ConnectorOption) Format added in v1.1.0

func (node *ConnectorOption) Format(ctx *FmtCtx)

func (*ConnectorOption) Free added in v1.2.0

func (node *ConnectorOption) Free()

func (ConnectorOption) TypeName added in v1.2.0

func (node ConnectorOption) TypeName() string

type Constant

type Constant interface {
	Expr
}

the AST for literals like string,numeric,bool and etc.

type CreateAccount added in v0.6.0

type CreateAccount struct {
	IfNotExists bool
	Name        Expr
	AuthOption  AccountAuthOption
	// status_option or not
	StatusOption AccountStatus
	// comment or not
	Comment AccountComment
	// contains filtered or unexported fields
}

func NewCreateAccount added in v1.2.0

func NewCreateAccount(ife bool, n Expr, ao AccountAuthOption, so AccountStatus, c AccountComment) *CreateAccount

func (*CreateAccount) Format added in v0.6.0

func (node *CreateAccount) Format(ctx *FmtCtx)

func (*CreateAccount) Free added in v1.2.0

func (node *CreateAccount) Free()

func (*CreateAccount) GetQueryType added in v0.7.0

func (node *CreateAccount) GetQueryType() string

func (*CreateAccount) GetStatementType added in v0.7.0

func (node *CreateAccount) GetStatementType() string

func (*CreateAccount) StmtKind added in v1.2.0

func (node *CreateAccount) StmtKind() StmtKind

func (CreateAccount) TypeName added in v1.2.0

func (node CreateAccount) TypeName() string

type CreateConnector added in v1.1.0

type CreateConnector struct {
	TableName *TableName
	Options   []*ConnectorOption
	// contains filtered or unexported fields
}

func NewCreateConnector added in v1.2.0

func NewCreateConnector(t *TableName, o []*ConnectorOption) *CreateConnector

func (*CreateConnector) Format added in v1.1.0

func (node *CreateConnector) Format(ctx *FmtCtx)

func (*CreateConnector) Free added in v1.2.0

func (node *CreateConnector) Free()

func (*CreateConnector) GetQueryType added in v1.1.0

func (node *CreateConnector) GetQueryType() string

func (*CreateConnector) GetStatementType added in v1.1.0

func (node *CreateConnector) GetStatementType() string

func (*CreateConnector) StmtKind added in v1.2.0

func (node *CreateConnector) StmtKind() StmtKind

func (CreateConnector) TypeName added in v1.2.0

func (node CreateConnector) TypeName() string

type CreateDatabase

type CreateDatabase struct {
	IfNotExists        bool
	Name               Identifier
	CreateOptions      []CreateOption
	SubscriptionOption *SubscriptionOption
	Sql                string
	// contains filtered or unexported fields
}

func NewCreateDatabase

func NewCreateDatabase(ine bool, name Identifier, sub *SubscriptionOption, opts []CreateOption) *CreateDatabase

func (*CreateDatabase) Format

func (node *CreateDatabase) Format(ctx *FmtCtx)

func (*CreateDatabase) Free added in v1.2.0

func (node *CreateDatabase) Free()

func (*CreateDatabase) GetQueryType added in v0.7.0

func (node *CreateDatabase) GetQueryType() string

func (*CreateDatabase) GetStatementType added in v0.7.0

func (node *CreateDatabase) GetStatementType() string

func (*CreateDatabase) StmtKind added in v1.2.0

func (node *CreateDatabase) StmtKind() StmtKind

func (CreateDatabase) TypeName added in v1.2.0

func (node CreateDatabase) TypeName() string

type CreateExtension added in v0.7.0

type CreateExtension struct {
	Language string
	Name     Identifier
	Filename Identifier
	// contains filtered or unexported fields
}

func NewCreateExtension added in v1.2.0

func NewCreateExtension(language string, name, filename Identifier) *CreateExtension

func (*CreateExtension) Format added in v0.7.0

func (node *CreateExtension) Format(ctx *FmtCtx)

func (*CreateExtension) Free added in v1.2.0

func (node *CreateExtension) Free()

func (*CreateExtension) StmtKind added in v1.2.0

func (node *CreateExtension) StmtKind() StmtKind

func (CreateExtension) TypeName added in v1.2.0

func (node CreateExtension) TypeName() string

type CreateFunction added in v0.7.0

type CreateFunction struct {
	Replace    bool
	Name       *FunctionName
	Args       FunctionArgs
	ReturnType *ReturnType
	Language   string
	Import     bool
	Body       string
	Handler    string
	// contains filtered or unexported fields
}

func NewCreateFunction added in v1.2.0

func NewCreateFunction(replace bool, name *FunctionName, args FunctionArgs, returnType *ReturnType, lang string, import_ bool, body string, handler string) *CreateFunction

func (*CreateFunction) Format added in v0.7.0

func (node *CreateFunction) Format(ctx *FmtCtx)

func (*CreateFunction) Free added in v1.2.0

func (node *CreateFunction) Free()

func (*CreateFunction) GetQueryType added in v0.7.0

func (node *CreateFunction) GetQueryType() string

func (*CreateFunction) GetStatementType added in v0.7.0

func (node *CreateFunction) GetStatementType() string

func (*CreateFunction) StmtKind added in v1.2.0

func (node *CreateFunction) StmtKind() StmtKind

func (CreateFunction) TypeName added in v1.2.0

func (node CreateFunction) TypeName() string

func (*CreateFunction) Valid added in v1.1.0

func (node *CreateFunction) Valid() error

type CreateIndex

type CreateIndex struct {
	Name        Identifier
	Table       *TableName
	IndexCat    IndexCategory
	IfNotExists bool
	KeyParts    []*KeyPart
	IndexOption *IndexOption
	MiscOption  []MiscOption
	// contains filtered or unexported fields
}

func NewCreateIndex

func NewCreateIndex(n Identifier, t *TableName, ife bool, it IndexCategory, k []*KeyPart, i *IndexOption, m []MiscOption) *CreateIndex

func (*CreateIndex) Format

func (node *CreateIndex) Format(ctx *FmtCtx)

func (*CreateIndex) Free added in v1.2.0

func (node *CreateIndex) Free()

func (*CreateIndex) GetQueryType added in v0.7.0

func (node *CreateIndex) GetQueryType() string

func (*CreateIndex) GetStatementType added in v0.7.0

func (node *CreateIndex) GetStatementType() string

func (*CreateIndex) StmtKind added in v1.2.0

func (node *CreateIndex) StmtKind() StmtKind

func (CreateIndex) TypeName added in v1.2.0

func (node CreateIndex) TypeName() string

type CreateOption

type CreateOption interface {
	NodeFormatter
}

type CreateOptionCharset

type CreateOptionCharset struct {
	IsDefault bool
	Charset   string
	// contains filtered or unexported fields
}

func NewCreateOptionCharset

func NewCreateOptionCharset(i bool, c string) *CreateOptionCharset

func (*CreateOptionCharset) Format

func (node *CreateOptionCharset) Format(ctx *FmtCtx)

func (*CreateOptionCharset) Free added in v1.2.0

func (node *CreateOptionCharset) Free()

func (CreateOptionCharset) TypeName added in v1.2.0

func (node CreateOptionCharset) TypeName() string

type CreateOptionCollate

type CreateOptionCollate struct {
	IsDefault bool
	Collate   string
	// contains filtered or unexported fields
}

func NewCreateOptionCollate

func NewCreateOptionCollate(i bool, c string) *CreateOptionCollate

func (*CreateOptionCollate) Format

func (node *CreateOptionCollate) Format(ctx *FmtCtx)

func (*CreateOptionCollate) Free added in v1.2.0

func (node *CreateOptionCollate) Free()

func (CreateOptionCollate) TypeName added in v1.2.0

func (node CreateOptionCollate) TypeName() string

type CreateOptionDefault

type CreateOptionDefault struct {
	// contains filtered or unexported fields
}

type CreateOptionEncryption

type CreateOptionEncryption struct {
	Encrypt string
	// contains filtered or unexported fields
}

func NewCreateOptionEncryption

func NewCreateOptionEncryption(e string) *CreateOptionEncryption

func (*CreateOptionEncryption) Format

func (node *CreateOptionEncryption) Format(ctx *FmtCtx)

func (*CreateOptionEncryption) Free added in v1.2.0

func (node *CreateOptionEncryption) Free()

func (CreateOptionEncryption) TypeName added in v1.2.0

func (node CreateOptionEncryption) TypeName() string

type CreateProcedure added in v0.8.0

type CreateProcedure struct {
	Name *ProcedureName
	Args ProcedureArgs
	Body string
	// contains filtered or unexported fields
}

func NewCreateProcedure added in v1.2.0

func NewCreateProcedure(n *ProcedureName, a ProcedureArgs, b string) *CreateProcedure

func (*CreateProcedure) Format added in v0.8.0

func (node *CreateProcedure) Format(ctx *FmtCtx)

func (*CreateProcedure) Free added in v1.2.0

func (node *CreateProcedure) Free()

func (*CreateProcedure) GetQueryType added in v0.8.0

func (node *CreateProcedure) GetQueryType() string

func (*CreateProcedure) GetStatementType added in v0.8.0

func (node *CreateProcedure) GetStatementType() string

func (*CreateProcedure) StmtKind added in v1.2.0

func (node *CreateProcedure) StmtKind() StmtKind

func (CreateProcedure) TypeName added in v1.2.0

func (node CreateProcedure) TypeName() string

type CreatePublication added in v0.8.0

type CreatePublication struct {
	IfNotExists bool
	Name        Identifier
	Database    Identifier
	Table       Identifier
	AccountsSet *AccountsSetOption
	Comment     string
	// contains filtered or unexported fields
}

func NewCreatePublication added in v1.2.0

func NewCreatePublication(ife bool, n Identifier, db Identifier, table Identifier, as *AccountsSetOption, c string) *CreatePublication

func (*CreatePublication) Format added in v0.8.0

func (node *CreatePublication) Format(ctx *FmtCtx)

func (*CreatePublication) Free added in v1.2.0

func (node *CreatePublication) Free()

func (*CreatePublication) GetQueryType added in v0.8.0

func (node *CreatePublication) GetQueryType() string

func (*CreatePublication) GetStatementType added in v0.8.0

func (node *CreatePublication) GetStatementType() string

func (*CreatePublication) StmtKind added in v1.2.0

func (node *CreatePublication) StmtKind() StmtKind

func (CreatePublication) TypeName added in v1.2.0

func (node CreatePublication) TypeName() string

type CreateRole

type CreateRole struct {
	IfNotExists bool
	Roles       []*Role
	// contains filtered or unexported fields
}

func NewCreateRole

func NewCreateRole(ife bool, r []*Role) *CreateRole

func (*CreateRole) Format

func (node *CreateRole) Format(ctx *FmtCtx)

func (*CreateRole) Free added in v1.2.0

func (node *CreateRole) Free()

func (*CreateRole) GetQueryType added in v0.7.0

func (node *CreateRole) GetQueryType() string

func (*CreateRole) GetStatementType added in v0.7.0

func (node *CreateRole) GetStatementType() string

func (*CreateRole) StmtKind added in v1.2.0

func (node *CreateRole) StmtKind() StmtKind

func (CreateRole) TypeName added in v1.2.0

func (node CreateRole) TypeName() string

type CreateSequence added in v0.8.0

type CreateSequence struct {
	Name        *TableName
	Type        ResolvableTypeReference
	IfNotExists bool
	IncrementBy *IncrementByOption
	MinValue    *MinValueOption
	MaxValue    *MaxValueOption
	StartWith   *StartWithOption
	Cycle       bool
	// contains filtered or unexported fields
}

func NewCreateSequence added in v1.2.0

func NewCreateSequence(name *TableName, typ ResolvableTypeReference, ifnotexists bool, incrementby *IncrementByOption, minvalue *MinValueOption, maxvalue *MaxValueOption, startwith *StartWithOption, cycle bool) *CreateSequence

func (*CreateSequence) Format added in v0.8.0

func (node *CreateSequence) Format(ctx *FmtCtx)

func (*CreateSequence) Free added in v1.2.0

func (node *CreateSequence) Free()

func (*CreateSequence) GetQueryType added in v0.8.0

func (node *CreateSequence) GetQueryType() string

func (*CreateSequence) GetStatementType added in v0.8.0

func (node *CreateSequence) GetStatementType() string

func (*CreateSequence) StmtKind added in v1.2.0

func (node *CreateSequence) StmtKind() StmtKind

func (CreateSequence) TypeName added in v1.2.0

func (node CreateSequence) TypeName() string

type CreateSnapShot added in v1.2.0

type CreateSnapShot struct {
	IfNotExists bool
	Name        Identifier // snapshot name
	Object      ObjectInfo
	// contains filtered or unexported fields
}

func (*CreateSnapShot) Format added in v1.2.0

func (node *CreateSnapShot) Format(ctx *FmtCtx)

func (*CreateSnapShot) Free added in v1.2.0

func (s *CreateSnapShot) Free()

func (*CreateSnapShot) GetQueryType added in v1.2.0

func (node *CreateSnapShot) GetQueryType() string

func (*CreateSnapShot) GetStatementType added in v1.2.0

func (node *CreateSnapShot) GetStatementType() string

func (*CreateSnapShot) StmtKind added in v1.2.0

func (node *CreateSnapShot) StmtKind() StmtKind

type CreateSource added in v1.1.0

type CreateSource struct {
	Replace     bool
	IfNotExists bool
	SourceName  *TableName
	Defs        TableDefs
	ColNames    IdentifierList
	Options     []TableOption
	// contains filtered or unexported fields
}

func NewCreateSource added in v1.2.0

func NewCreateSource(replace bool, ifNotExists bool, sourceName *TableName, defs TableDefs, options []TableOption) *CreateSource

func (*CreateSource) Format added in v1.1.0

func (node *CreateSource) Format(ctx *FmtCtx)

func (*CreateSource) Free added in v1.2.0

func (node *CreateSource) Free()

func (*CreateSource) GetQueryType added in v1.1.0

func (node *CreateSource) GetQueryType() string

func (*CreateSource) GetStatementType added in v1.1.0

func (node *CreateSource) GetStatementType() string

func (*CreateSource) StmtKind added in v1.2.0

func (node *CreateSource) StmtKind() StmtKind

func (CreateSource) TypeName added in v1.2.0

func (node CreateSource) TypeName() string

type CreateSourceWithOption added in v1.1.0

type CreateSourceWithOption struct {
	Key Identifier
	Val Expr
	// contains filtered or unexported fields
}

func NewCreateSourceWithOption added in v1.2.0

func NewCreateSourceWithOption(key Identifier, val Expr) *CreateSourceWithOption

func (*CreateSourceWithOption) Format added in v1.1.0

func (node *CreateSourceWithOption) Format(ctx *FmtCtx)

func (*CreateSourceWithOption) Free added in v1.2.0

func (node *CreateSourceWithOption) Free()

func (CreateSourceWithOption) TypeName added in v1.2.0

func (node CreateSourceWithOption) TypeName() string

type CreateStage added in v1.0.0

type CreateStage struct {
	IfNotExists bool
	Name        Identifier
	Url         string
	Credentials StageCredentials
	Status      StageStatus
	Comment     StageComment
	// contains filtered or unexported fields
}

func NewCreateStage added in v1.2.0

func NewCreateStage(ifNotExists bool, name Identifier, url string, credentials StageCredentials, status StageStatus, comment StageComment) *CreateStage

func (*CreateStage) Format added in v1.0.0

func (node *CreateStage) Format(ctx *FmtCtx)

func (*CreateStage) Free added in v1.2.0

func (node *CreateStage) Free()

func (*CreateStage) GetQueryType added in v1.0.0

func (node *CreateStage) GetQueryType() string

func (*CreateStage) GetStatementType added in v1.0.0

func (node *CreateStage) GetStatementType() string

func (*CreateStage) StmtKind added in v1.2.0

func (node *CreateStage) StmtKind() StmtKind

func (CreateStage) TypeName added in v1.2.0

func (node CreateStage) TypeName() string

type CreateTable

type CreateTable struct {

	/*
		it is impossible to be the temporary table, the cluster table,
		the normal table and the external table at the same time.
	*/
	Temporary          bool
	IsClusterTable     bool
	IfNotExists        bool
	Table              TableName
	Defs               TableDefs
	Options            []TableOption
	PartitionOption    *PartitionOption
	ClusterByOption    *ClusterByOption
	Param              *ExternParam
	AsSource           *Select
	IsDynamicTable     bool
	DTOptions          []TableOption
	IsAsSelect         bool
	IsAsLike           bool
	LikeTableName      TableName
	SubscriptionOption *SubscriptionOption
	// contains filtered or unexported fields
}

func NewCreateTable added in v1.2.0

func NewCreateTable() *CreateTable

func (*CreateTable) Format

func (node *CreateTable) Format(ctx *FmtCtx)

func (*CreateTable) Free added in v1.2.0

func (node *CreateTable) Free()

func (*CreateTable) GetQueryType added in v0.7.0

func (node *CreateTable) GetQueryType() string

func (*CreateTable) GetStatementType added in v0.7.0

func (node *CreateTable) GetStatementType() string

func (*CreateTable) StmtKind added in v1.2.0

func (node *CreateTable) StmtKind() StmtKind

func (CreateTable) TypeName added in v1.2.0

func (node CreateTable) TypeName() string

type CreateUser

type CreateUser struct {
	IfNotExists bool
	Users       []*User
	Role        *Role
	MiscOpt     UserMiscOption
	// comment or attribute
	CommentOrAttribute AccountCommentOrAttribute
	// contains filtered or unexported fields
}

func NewCreateUser

func NewCreateUser(ife bool, u []*User, r *Role, misc UserMiscOption, c AccountCommentOrAttribute) *CreateUser

func (*CreateUser) Format

func (node *CreateUser) Format(ctx *FmtCtx)

func (*CreateUser) Free added in v1.2.0

func (node *CreateUser) Free()

func (*CreateUser) GetQueryType added in v0.7.0

func (node *CreateUser) GetQueryType() string

func (*CreateUser) GetStatementType added in v0.7.0

func (node *CreateUser) GetStatementType() string

func (*CreateUser) StmtKind added in v1.2.0

func (node *CreateUser) StmtKind() StmtKind

func (CreateUser) TypeName added in v1.2.0

func (node CreateUser) TypeName() string

type CreateView added in v0.5.0

type CreateView struct {
	Replace     bool
	Name        *TableName
	ColNames    IdentifierList
	AsSource    *Select
	IfNotExists bool
	// contains filtered or unexported fields
}

func NewCreateView added in v1.2.0

func NewCreateView(replace bool, name *TableName, colNames IdentifierList, asSource *Select, ifNotExists bool) *CreateView

func (*CreateView) Format added in v0.5.0

func (node *CreateView) Format(ctx *FmtCtx)

func (*CreateView) Free added in v1.2.0

func (node *CreateView) Free()

func (*CreateView) GetQueryType added in v0.7.0

func (node *CreateView) GetQueryType() string

func (*CreateView) GetStatementType added in v0.7.0

func (node *CreateView) GetStatementType() string

func (*CreateView) StmtKind added in v1.2.0

func (node *CreateView) StmtKind() StmtKind

func (CreateView) TypeName added in v1.2.0

func (node CreateView) TypeName() string

type CycleOption added in v1.0.0

type CycleOption struct {
	Cycle bool
}

func (*CycleOption) Format added in v1.0.0

func (node *CycleOption) Format(ctx *FmtCtx)

type DBool

type DBool bool

func MakeDBool

func MakeDBool(d bool) *DBool

func (*DBool) Format

func (node *DBool) Format(ctx *FmtCtx)

func (*DBool) String

func (node *DBool) String() string

type Datum

type Datum interface {
	Expr
}

type Deallocate added in v0.5.1

type Deallocate struct {
	Statement
	IsDrop bool
	Name   Identifier
}

func NewDeallocate added in v0.5.1

func NewDeallocate(name Identifier, isDrop bool) *Deallocate

func (*Deallocate) Format added in v0.5.1

func (node *Deallocate) Format(ctx *FmtCtx)

func (*Deallocate) Free added in v1.2.0

func (node *Deallocate) Free()

func (*Deallocate) GetQueryType added in v0.7.0

func (node *Deallocate) GetQueryType() string

func (*Deallocate) GetStatementType added in v0.7.0

func (node *Deallocate) GetStatementType() string

func (*Deallocate) StmtKind added in v1.2.0

func (node *Deallocate) StmtKind() StmtKind

func (Deallocate) TypeName added in v1.2.0

func (node Deallocate) TypeName() string

type Declare added in v0.6.0

type Declare struct {
	Variables  []string
	ColumnType *T
	DefaultVal Expr
	// contains filtered or unexported fields
}

Declare statement

func (*Declare) Format added in v0.6.0

func (node *Declare) Format(ctx *FmtCtx)

func (*Declare) Free added in v1.2.0

func (s *Declare) Free()

func (*Declare) GetQueryType added in v0.7.0

func (node *Declare) GetQueryType() string

func (*Declare) GetStatementType added in v0.7.0

func (node *Declare) GetStatementType() string

func (*Declare) StmtKind added in v1.2.0

func (node *Declare) StmtKind() StmtKind

type DefaultVal

type DefaultVal struct {
	Expr Expr
	// contains filtered or unexported fields
}

the DEFAULT expression.

func NewDefaultVal

func NewDefaultVal(e Expr) *DefaultVal

func (*DefaultVal) Accept added in v0.8.0

func (node *DefaultVal) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*DefaultVal) Format

func (node *DefaultVal) Format(ctx *FmtCtx)

func (*DefaultVal) String

func (node *DefaultVal) String() string

type Delete

type Delete struct {
	Tables         TableExprs
	TableRefs      TableExprs
	PartitionNames IdentifierList
	Where          *Where
	OrderBy        OrderBy
	Limit          *Limit
	With           *With
	// contains filtered or unexported fields
}

Delete statement

func NewDelete

func NewDelete(ts TableExprs, w *Where, o OrderBy, l *Limit) *Delete

func (*Delete) Format

func (node *Delete) Format(ctx *FmtCtx)

func (*Delete) Free added in v1.2.0

func (s *Delete) Free()

func (*Delete) GetQueryType added in v0.7.0

func (node *Delete) GetQueryType() string

func (*Delete) GetStatementType added in v0.7.0

func (node *Delete) GetStatementType() string

func (*Delete) StmtKind added in v1.2.0

func (node *Delete) StmtKind() StmtKind

type Direction

type Direction int8

Direction for ordering results.

const (
	DefaultDirection Direction = iota
	Ascending
	Descending
)

Direction values.

func (Direction) String

func (d Direction) String() string

type Do added in v0.6.0

type Do struct {
	Exprs []Expr
	// contains filtered or unexported fields
}

Do statement

func (*Do) Format added in v0.6.0

func (node *Do) Format(ctx *FmtCtx)

func (*Do) Free added in v1.2.0

func (s *Do) Free()

func (*Do) GetQueryType added in v0.7.0

func (node *Do) GetQueryType() string

func (*Do) GetStatementType added in v0.7.0

func (node *Do) GetStatementType() string

func (*Do) StmtKind added in v1.2.0

func (node *Do) StmtKind() StmtKind

type DropAccount added in v0.6.0

type DropAccount struct {
	IfExists bool
	Name     Expr
	// contains filtered or unexported fields
}

func NewDropAccount added in v1.2.0

func NewDropAccount(ife bool, n Expr) *DropAccount

func (*DropAccount) Format added in v0.6.0

func (node *DropAccount) Format(ctx *FmtCtx)

func (*DropAccount) Free added in v1.2.0

func (node *DropAccount) Free()

func (*DropAccount) GetQueryType added in v0.7.0

func (node *DropAccount) GetQueryType() string

func (*DropAccount) GetStatementType added in v0.7.0

func (node *DropAccount) GetStatementType() string

func (*DropAccount) StmtKind added in v1.2.0

func (node *DropAccount) StmtKind() StmtKind

func (DropAccount) TypeName added in v1.2.0

func (node DropAccount) TypeName() string

type DropConnector added in v1.1.0

type DropConnector struct {
	IfExists bool
	Names    TableNames
	// contains filtered or unexported fields
}

func NewDropConnector added in v1.2.0

func NewDropConnector(i bool, n TableNames) *DropConnector

func (*DropConnector) Format added in v1.1.0

func (node *DropConnector) Format(ctx *FmtCtx)

func (*DropConnector) Free added in v1.2.0

func (node *DropConnector) Free()

func (*DropConnector) GetQueryType added in v1.1.0

func (node *DropConnector) GetQueryType() string

func (*DropConnector) GetStatementType added in v1.1.0

func (node *DropConnector) GetStatementType() string

func (*DropConnector) StmtKind added in v1.2.0

func (node *DropConnector) StmtKind() StmtKind

func (DropConnector) TypeName added in v1.2.0

func (node DropConnector) TypeName() string

type DropDatabase

type DropDatabase struct {
	Name     Identifier
	IfExists bool
	// contains filtered or unexported fields
}

DROP Database statement

func NewDropDatabase

func NewDropDatabase(n Identifier, i bool) *DropDatabase

func (*DropDatabase) Format

func (node *DropDatabase) Format(ctx *FmtCtx)

func (*DropDatabase) Free added in v1.2.0

func (node *DropDatabase) Free()

func (*DropDatabase) GetQueryType added in v0.7.0

func (node *DropDatabase) GetQueryType() string

func (*DropDatabase) GetStatementType added in v0.7.0

func (node *DropDatabase) GetStatementType() string

func (*DropDatabase) StmtKind added in v1.2.0

func (node *DropDatabase) StmtKind() StmtKind

func (DropDatabase) TypeName added in v1.2.0

func (node DropDatabase) TypeName() string

type DropFunction added in v0.7.0

type DropFunction struct {
	Name *FunctionName
	Args FunctionArgs
	// contains filtered or unexported fields
}

func NewDropFunction added in v1.2.0

func NewDropFunction(name *FunctionName, args FunctionArgs) *DropFunction

func (*DropFunction) Format added in v0.7.0

func (node *DropFunction) Format(ctx *FmtCtx)

func (*DropFunction) Free added in v1.2.0

func (node *DropFunction) Free()

func (*DropFunction) GetQueryType added in v0.7.0

func (node *DropFunction) GetQueryType() string

func (*DropFunction) GetStatementType added in v0.7.0

func (node *DropFunction) GetStatementType() string

func (*DropFunction) StmtKind added in v1.2.0

func (node *DropFunction) StmtKind() StmtKind

func (DropFunction) TypeName added in v1.2.0

func (node DropFunction) TypeName() string

type DropIndex

type DropIndex struct {
	Name       Identifier
	TableName  *TableName
	IfExists   bool
	MiscOption []MiscOption
	// contains filtered or unexported fields
}

func NewDropIndex

func NewDropIndex(i Identifier, t *TableName, ife bool) *DropIndex

func (*DropIndex) Format

func (node *DropIndex) Format(ctx *FmtCtx)

func (*DropIndex) Free added in v1.2.0

func (node *DropIndex) Free()

func (*DropIndex) GetQueryType added in v0.7.0

func (node *DropIndex) GetQueryType() string

func (*DropIndex) GetStatementType added in v0.7.0

func (node *DropIndex) GetStatementType() string

func (*DropIndex) StmtKind added in v1.2.0

func (node *DropIndex) StmtKind() StmtKind

func (DropIndex) TypeName added in v1.2.0

func (node DropIndex) TypeName() string

type DropProcedure added in v0.8.0

type DropProcedure struct {
	Name     *ProcedureName
	IfExists bool
	// contains filtered or unexported fields
}

func NewDropProcedure added in v1.2.0

func NewDropProcedure(n *ProcedureName, i bool) *DropProcedure

func (*DropProcedure) Format added in v0.8.0

func (node *DropProcedure) Format(ctx *FmtCtx)

func (*DropProcedure) Free added in v1.2.0

func (node *DropProcedure) Free()

func (*DropProcedure) GetQueryType added in v0.8.0

func (node *DropProcedure) GetQueryType() string

func (*DropProcedure) GetStatementType added in v0.8.0

func (node *DropProcedure) GetStatementType() string

func (*DropProcedure) StmtKind added in v1.2.0

func (node *DropProcedure) StmtKind() StmtKind

func (DropProcedure) TypeName added in v1.2.0

func (node DropProcedure) TypeName() string

type DropPublication added in v0.8.0

type DropPublication struct {
	Name     Identifier
	IfExists bool
	// contains filtered or unexported fields
}

func NewDropPublication added in v1.2.0

func NewDropPublication(ife bool, n Identifier) *DropPublication

func (*DropPublication) Format added in v0.8.0

func (node *DropPublication) Format(ctx *FmtCtx)

func (*DropPublication) Free added in v1.2.0

func (node *DropPublication) Free()

func (*DropPublication) GetQueryType added in v0.8.0

func (node *DropPublication) GetQueryType() string

func (*DropPublication) GetStatementType added in v0.8.0

func (node *DropPublication) GetStatementType() string

func (*DropPublication) StmtKind added in v1.2.0

func (node *DropPublication) StmtKind() StmtKind

func (DropPublication) TypeName added in v1.2.0

func (node DropPublication) TypeName() string

type DropRole

type DropRole struct {
	IfExists bool
	Roles    []*Role
	// contains filtered or unexported fields
}

func NewDropRole

func NewDropRole(ife bool, r []*Role) *DropRole

func (*DropRole) Format

func (node *DropRole) Format(ctx *FmtCtx)

func (*DropRole) Free added in v1.2.0

func (node *DropRole) Free()

func (*DropRole) GetQueryType added in v0.7.0

func (node *DropRole) GetQueryType() string

func (*DropRole) GetStatementType added in v0.7.0

func (node *DropRole) GetStatementType() string

func (*DropRole) StmtKind added in v1.2.0

func (node *DropRole) StmtKind() StmtKind

func (DropRole) TypeName added in v1.2.0

func (node DropRole) TypeName() string

type DropSequence added in v0.8.0

type DropSequence struct {
	IfExists bool
	Names    TableNames
	// contains filtered or unexported fields
}

func NewDropSequence added in v1.2.0

func NewDropSequence(ifexists bool, names TableNames) *DropSequence

func (*DropSequence) Format added in v0.8.0

func (node *DropSequence) Format(ctx *FmtCtx)

func (*DropSequence) Free added in v1.2.0

func (node *DropSequence) Free()

func (*DropSequence) GetQueryType added in v0.8.0

func (node *DropSequence) GetQueryType() string

func (*DropSequence) GetStatementType added in v0.8.0

func (node *DropSequence) GetStatementType() string

func (*DropSequence) StmtKind added in v1.2.0

func (node *DropSequence) StmtKind() StmtKind

func (DropSequence) TypeName added in v1.2.0

func (node DropSequence) TypeName() string

type DropSnapShot added in v1.2.0

type DropSnapShot struct {
	IfExists bool
	Name     Identifier // snapshot name
	// contains filtered or unexported fields
}

func NewDropSnapShot added in v1.2.0

func NewDropSnapShot(ifExists bool, Name Identifier) *DropSnapShot

func (*DropSnapShot) Format added in v1.2.0

func (node *DropSnapShot) Format(ctx *FmtCtx)

func (*DropSnapShot) Free added in v1.2.0

func (node *DropSnapShot) Free()

func (*DropSnapShot) GetQueryType added in v1.2.0

func (node *DropSnapShot) GetQueryType() string

func (*DropSnapShot) GetStatementType added in v1.2.0

func (node *DropSnapShot) GetStatementType() string

func (*DropSnapShot) StmtKind added in v1.2.0

func (node *DropSnapShot) StmtKind() StmtKind

func (DropSnapShot) TypeName added in v1.2.0

func (node DropSnapShot) TypeName() string

type DropStage added in v1.0.0

type DropStage struct {
	IfNotExists bool
	Name        Identifier
	// contains filtered or unexported fields
}

func NewDropStage added in v1.2.0

func NewDropStage(ifNotExists bool, name Identifier) *DropStage

func (*DropStage) Format added in v1.0.0

func (node *DropStage) Format(ctx *FmtCtx)

func (*DropStage) Free added in v1.2.0

func (node *DropStage) Free()

func (*DropStage) GetQueryType added in v1.0.0

func (node *DropStage) GetQueryType() string

func (*DropStage) GetStatementType added in v1.0.0

func (node *DropStage) GetStatementType() string

func (*DropStage) StmtKind added in v1.2.0

func (node *DropStage) StmtKind() StmtKind

func (DropStage) TypeName added in v1.2.0

func (node DropStage) TypeName() string

type DropTable

type DropTable struct {
	IfExists bool
	Names    TableNames
	// contains filtered or unexported fields
}

DROP Table statement

func NewDropTable

func NewDropTable(i bool, n TableNames) *DropTable

func (*DropTable) Format

func (node *DropTable) Format(ctx *FmtCtx)

func (*DropTable) Free added in v1.2.0

func (node *DropTable) Free()

func (*DropTable) GetQueryType added in v0.7.0

func (node *DropTable) GetQueryType() string

func (*DropTable) GetStatementType added in v0.7.0

func (node *DropTable) GetStatementType() string

func (*DropTable) StmtKind added in v1.2.0

func (node *DropTable) StmtKind() StmtKind

func (DropTable) TypeName added in v1.2.0

func (node DropTable) TypeName() string

type DropUser

type DropUser struct {
	IfExists bool
	Users    []*User
	// contains filtered or unexported fields
}

func NewDropUser

func NewDropUser(ife bool, u []*User) *DropUser

func (*DropUser) Format

func (node *DropUser) Format(ctx *FmtCtx)

func (*DropUser) Free added in v1.2.0

func (node *DropUser) Free()

func (*DropUser) GetQueryType added in v0.7.0

func (node *DropUser) GetQueryType() string

func (*DropUser) GetStatementType added in v0.7.0

func (node *DropUser) GetStatementType() string

func (*DropUser) StmtKind added in v1.2.0

func (node *DropUser) StmtKind() StmtKind

func (DropUser) TypeName added in v1.2.0

func (node DropUser) TypeName() string

type DropView added in v0.6.0

type DropView struct {
	IfExists bool
	Names    TableNames
	// contains filtered or unexported fields
}

DropView DROP View statement

func NewDropView added in v0.6.0

func NewDropView(i bool, n TableNames) *DropView

func (*DropView) Format added in v0.6.0

func (node *DropView) Format(ctx *FmtCtx)

func (*DropView) Free added in v1.2.0

func (node *DropView) Free()

func (*DropView) GetQueryType added in v0.7.0

func (node *DropView) GetQueryType() string

func (*DropView) GetStatementType added in v0.7.0

func (node *DropView) GetStatementType() string

func (*DropView) StmtKind added in v1.2.0

func (node *DropView) StmtKind() StmtKind

func (DropView) TypeName added in v1.2.0

func (node DropView) TypeName() string

type DuplicateKey

type DuplicateKey interface{}

type DuplicateKeyError

type DuplicateKeyError struct {
	// contains filtered or unexported fields
}

func NewDuplicateKeyError

func NewDuplicateKeyError() *DuplicateKeyError

type DuplicateKeyIgnore

type DuplicateKeyIgnore struct {
	// contains filtered or unexported fields
}

func NewDuplicateKeyIgnore

func NewDuplicateKeyIgnore() *DuplicateKeyIgnore

type DuplicateKeyReplace

type DuplicateKeyReplace struct {
	// contains filtered or unexported fields
}

func NewDuplicateKeyReplace

func NewDuplicateKeyReplace() *DuplicateKeyReplace

type ElseIfStmt added in v0.8.0

type ElseIfStmt struct {
	Cond Expr
	Body []Statement
	// contains filtered or unexported fields
}

func (*ElseIfStmt) Format added in v0.8.0

func (node *ElseIfStmt) Format(ctx *FmtCtx)

func (*ElseIfStmt) Free added in v1.2.0

func (s *ElseIfStmt) Free()

func (*ElseIfStmt) GetQueryType added in v0.8.0

func (node *ElseIfStmt) GetQueryType() string

func (*ElseIfStmt) GetStatementType added in v0.8.0

func (node *ElseIfStmt) GetStatementType() string

type EmptyStmt added in v1.0.0

type EmptyStmt struct {
	// contains filtered or unexported fields
}

func (*EmptyStmt) Format added in v1.0.0

func (e *EmptyStmt) Format(ctx *FmtCtx)

func (*EmptyStmt) Free added in v1.2.0

func (s *EmptyStmt) Free()

func (EmptyStmt) GetQueryType added in v1.0.0

func (e EmptyStmt) GetQueryType() string

func (EmptyStmt) GetStatementType added in v1.0.0

func (e EmptyStmt) GetStatementType() string

func (*EmptyStmt) StmtKind added in v1.2.0

func (e *EmptyStmt) StmtKind() StmtKind

func (*EmptyStmt) String added in v1.0.0

func (e *EmptyStmt) String() string

type EnclosedBy added in v1.2.0

type EnclosedBy struct {
	Value byte
}

type EndCompound added in v0.8.0

type EndCompound struct {
	// contains filtered or unexported fields
}

func (*EndCompound) Format added in v0.8.0

func (node *EndCompound) Format(ctx *FmtCtx)

func (*EndCompound) Free added in v1.2.0

func (s *EndCompound) Free()

func (*EndCompound) GetQueryType added in v0.8.0

func (node *EndCompound) GetQueryType() string

func (*EndCompound) GetStatementType added in v0.8.0

func (node *EndCompound) GetStatementType() string

type EscapedBy added in v1.2.0

type EscapedBy struct {
	Value byte
}

type ExParam added in v0.7.0

type ExParam struct {
	JsonData    string
	FileService fileservice.FileService
	NullMap     map[string]([]string)
	S3Param     *S3Parameter
	Ctx         context.Context
	LoadFile    bool
	Local       bool
	QueryResult bool
	SysTable    bool
	Parallel    bool
	Strict      bool
}

type ExParamConst added in v0.7.0

type ExParamConst struct {
	Init         bool
	ScanType     int
	FileSize     int64
	Filepath     string
	CompressType string
	Format       string
	Option       []string
	Data         string
	Tail         *TailParameter
	StageName    Identifier
}

type ExecLocation added in v1.2.0

type ExecLocation int

type Execute added in v0.5.1

type Execute struct {
	Statement
	Name      Identifier
	Variables []*VarExpr
}

func NewExecute added in v0.5.1

func NewExecute(name Identifier) *Execute

func NewExecuteWithVariables added in v0.5.1

func NewExecuteWithVariables(name Identifier, variables []*VarExpr) *Execute

func (*Execute) Format added in v0.5.1

func (node *Execute) Format(ctx *FmtCtx)

func (*Execute) Free added in v1.2.0

func (node *Execute) Free()

func (*Execute) GetQueryType added in v0.7.0

func (node *Execute) GetQueryType() string

func (*Execute) GetStatementType added in v0.7.0

func (node *Execute) GetStatementType() string

func (*Execute) StmtKind added in v1.2.0

func (node *Execute) StmtKind() StmtKind

type Explain

type Explain interface {
	Statement
}

type ExplainAnalyze

type ExplainAnalyze struct {
	// contains filtered or unexported fields
}

EXPLAIN ANALYZE statement

func NewExplainAnalyze

func NewExplainAnalyze(stmt Statement, f string) *ExplainAnalyze

func (*ExplainAnalyze) Format

func (node *ExplainAnalyze) Format(ctx *FmtCtx)

func (*ExplainAnalyze) Free added in v1.2.0

func (node *ExplainAnalyze) Free()

func (*ExplainAnalyze) GetQueryType added in v0.7.0

func (node *ExplainAnalyze) GetQueryType() string

func (*ExplainAnalyze) GetStatementType added in v0.7.0

func (node *ExplainAnalyze) GetStatementType() string

func (*ExplainAnalyze) StmtKind added in v1.2.0

func (node *ExplainAnalyze) StmtKind() StmtKind

func (ExplainAnalyze) TypeName added in v1.2.0

func (node ExplainAnalyze) TypeName() string

type ExplainFor

type ExplainFor struct {
	ID uint64
	// contains filtered or unexported fields
}

EXPLAIN FOR CONNECTION statement

func NewExplainFor

func NewExplainFor(f string, id uint64) *ExplainFor

func (*ExplainFor) Format

func (node *ExplainFor) Format(ctx *FmtCtx)

func (*ExplainFor) Free added in v1.2.0

func (node *ExplainFor) Free()

func (*ExplainFor) GetQueryType added in v0.7.0

func (node *ExplainFor) GetQueryType() string

func (*ExplainFor) GetStatementType added in v0.7.0

func (node *ExplainFor) GetStatementType() string

func (*ExplainFor) StmtKind added in v1.2.0

func (node *ExplainFor) StmtKind() StmtKind

func (ExplainFor) TypeName added in v1.2.0

func (node ExplainFor) TypeName() string

type ExplainStmt

type ExplainStmt struct {
	// contains filtered or unexported fields
}

EXPLAIN stmt statement

func NewExplainStmt

func NewExplainStmt(stmt Statement, f string) *ExplainStmt

func (*ExplainStmt) Format

func (node *ExplainStmt) Format(ctx *FmtCtx)

func (*ExplainStmt) Free added in v1.2.0

func (node *ExplainStmt) Free()

func (*ExplainStmt) GetQueryType added in v0.7.0

func (node *ExplainStmt) GetQueryType() string

func (*ExplainStmt) GetStatementType added in v0.7.0

func (node *ExplainStmt) GetStatementType() string

func (*ExplainStmt) StmtKind added in v1.2.0

func (node *ExplainStmt) StmtKind() StmtKind

func (ExplainStmt) TypeName added in v1.2.0

func (node ExplainStmt) TypeName() string

type ExportParam

type ExportParam struct {
	// outfile flag
	Outfile bool
	// query id
	QueryId string
	// filename path
	FilePath string
	// Fields
	Fields *Fields
	// Lines
	Lines *Lines
	// fileSize
	MaxFileSize uint64
	// header flag
	Header     bool
	ForceQuote []string
	// stage filename path
	StageFilePath string
}

func (*ExportParam) Format

func (ep *ExportParam) Format(ctx *FmtCtx)

type Expr

type Expr interface {
	fmt.Stringer
	NodeFormatter
	NodeChecker
}

AST for the expression

type ExprList

type ExprList struct {
	Exprs Exprs
	// contains filtered or unexported fields
}

ast fir the list of expression

func (*ExprList) Accept added in v0.8.0

func (n *ExprList) Accept(v Visitor) (Expr, bool)

func (*ExprList) String

func (node *ExprList) String() string

type Exprs

type Exprs []Expr

a list of expression.

func (Exprs) Format

func (node Exprs) Format(ctx *FmtCtx)

type ExternParam added in v0.6.0

type ExternParam struct {
	// params which come from parser
	ExParamConst
	// params which come from internal construct
	ExParam
}

type Family

type Family int32
const (
	UnknownFamily Family = iota
	IntFamily
	FloatFamily
	TimestampFamily
	DateFamily
	IntervalFamily
	TimeFamily
	StringFamily
	BitFamily
	BoolFamily
	JsonFamily
	EnumFamily
	SetFamily
	UuidFamily

	//test
	BlobFamily

	GeometryFamily

	ArrayFamily
)

type Fields

type Fields struct {
	Terminated *Terminated
	Optionally bool
	EnclosedBy *EnclosedBy
	EscapedBy  *EscapedBy
}

func NewFields

func NewFields(t string, o bool, en byte, es byte) *Fields

func (*Fields) Format

func (node *Fields) Format(ctx *FmtCtx)

type Fill added in v1.1.0

type Fill struct {
	Mode FillMode
	Val  Expr
}

func (*Fill) Format added in v1.1.0

func (node *Fill) Format(ctx *FmtCtx)

type FillMode added in v1.1.0

type FillMode int
const (
	FillNone FillMode = iota
	FillPrev
	FillNext
	FillValue
	FillNull
	FillLinear
)

func (FillMode) String added in v1.1.0

func (f FillMode) String() string

type FmtCtx

type FmtCtx struct {
	*strings.Builder
	// contains filtered or unexported fields
}

FmtCtx contains formatted text of the node.

func NewFmtCtx

func NewFmtCtx(dialectType dialect.DialectType, opts ...FmtCtxOption) *FmtCtx

func (*FmtCtx) PrintExpr

func (ctx *FmtCtx) PrintExpr(currentExpr Expr, expr Expr, left bool)

func (*FmtCtx) WriteStringQuote added in v0.7.0

func (ctx *FmtCtx) WriteStringQuote(v string) (int, error)

func (*FmtCtx) WriteValue added in v0.6.0

func (ctx *FmtCtx) WriteValue(t P_TYPE, v string) (int, error)

type FmtCtxOption added in v0.6.0

type FmtCtxOption func(*FmtCtx)

func WithQuoteString added in v0.6.0

func WithQuoteString(quote bool) FmtCtxOption

func WithSingleQuoteString added in v0.6.0

func WithSingleQuoteString() FmtCtxOption

func (FmtCtxOption) Apply added in v0.6.0

func (f FmtCtxOption) Apply(ctx *FmtCtx)

type ForeignKey

type ForeignKey struct {
	IfNotExists      bool
	KeyParts         []*KeyPart
	Name             string
	ConstraintSymbol string
	Refer            *AttributeReference
	Empty            bool
	// contains filtered or unexported fields
}

func NewForeignKey

func NewForeignKey(ine bool, k []*KeyPart, n string, r *AttributeReference, e bool) *ForeignKey

func (*ForeignKey) Format

func (node *ForeignKey) Format(ctx *FmtCtx)

func (*ForeignKey) Free added in v1.2.0

func (node *ForeignKey) Free()

func (ForeignKey) TypeName added in v1.2.0

func (node ForeignKey) TypeName() string

type FrameBound added in v0.8.0

type FrameBound struct {
	Type      BoundType
	UnBounded bool
	Expr      Expr
}

func (*FrameBound) Format added in v0.8.0

func (node *FrameBound) Format(ctx *FmtCtx)

type FrameClause added in v0.8.0

type FrameClause struct {
	Type   FrameType
	HasEnd bool
	Start  *FrameBound
	End    *FrameBound
}

func (*FrameClause) Format added in v0.8.0

func (node *FrameClause) Format(ctx *FmtCtx)

type FrameType added in v0.8.0

type FrameType int
const (
	Rows FrameType = iota
	Range
	Groups
)

type From

type From struct {
	Tables TableExprs
}

the FROM clause.

func NewFrom

func NewFrom(t TableExprs) *From

func (*From) Format

func (node *From) Format(ctx *FmtCtx)

type FullTextIndex

type FullTextIndex struct {
	KeyParts    []*KeyPart
	Name        string
	Empty       bool
	IndexOption *IndexOption
	// contains filtered or unexported fields
}

func NewFullTextIndex

func NewFullTextIndex(k []*KeyPart, n string, e bool, io *IndexOption) *FullTextIndex

func (*FullTextIndex) Format

func (node *FullTextIndex) Format(ctx *FmtCtx)

func (*FullTextIndex) Free added in v1.2.0

func (node *FullTextIndex) Free()

func (FullTextIndex) TypeName added in v1.2.0

func (node FullTextIndex) TypeName() string

type FuncExpr

type FuncExpr struct {
	Func     ResolvableFunctionReference
	FuncName *CStr
	Type     FuncType
	Exprs    Exprs

	//specify the type of aggregation.
	AggType AggType

	WindowSpec *WindowSpec

	OrderBy OrderBy
	// contains filtered or unexported fields
}

function call expression

func (*FuncExpr) Accept added in v0.8.0

func (node *FuncExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*FuncExpr) Format

func (node *FuncExpr) Format(ctx *FmtCtx)

func (*FuncExpr) String

func (node *FuncExpr) String() string

type FuncType

type FuncType int
const (
	FUNC_TYPE_DEFAULT FuncType = iota
	FUNC_TYPE_DISTINCT
	FUNC_TYPE_ALL
	FUNC_TYPE_TABLE
)

func (*FuncType) ToString

func (node *FuncType) ToString() string

type FunctionArg added in v0.7.0

type FunctionArg interface {
	NodeFormatter
	Expr
	GetName(ctx *FmtCtx) string
	// Deprecated: use plan.GetFunctionArgTypeStrFromAst instead
	GetType(ctx *FmtCtx) string
}

type FunctionArgDecl added in v0.7.0

type FunctionArgDecl struct {
	FunctionArgImpl
	Name       *UnresolvedName
	Type       ResolvableTypeReference
	DefaultVal Expr
}

func NewFunctionArgDecl added in v0.7.0

func NewFunctionArgDecl(n *UnresolvedName, t ResolvableTypeReference, d Expr) *FunctionArgDecl

func (*FunctionArgDecl) Format added in v0.7.0

func (node *FunctionArgDecl) Format(ctx *FmtCtx)

func (*FunctionArgDecl) Free added in v1.2.0

func (node *FunctionArgDecl) Free()

func (*FunctionArgDecl) GetName added in v0.7.0

func (node *FunctionArgDecl) GetName(ctx *FmtCtx) string

func (*FunctionArgDecl) GetType added in v0.7.0

func (node *FunctionArgDecl) GetType(ctx *FmtCtx) string

func (FunctionArgDecl) TypeName added in v1.2.0

func (node FunctionArgDecl) TypeName() string

type FunctionArgImpl added in v0.7.0

type FunctionArgImpl struct {
	FunctionArg
}

type FunctionArgs added in v0.7.0

type FunctionArgs []FunctionArg

container holding list of arguments in udf

type FunctionLanguage added in v1.1.0

type FunctionLanguage string
const (
	SQL    FunctionLanguage = "sql"
	PYTHON FunctionLanguage = "python"
)

type FunctionName added in v0.7.0

type FunctionName struct {
	Name objName
}

func NewFuncName added in v0.7.0

func NewFuncName(name Identifier, prefix ObjectNamePrefix) *FunctionName

func (*FunctionName) Format added in v0.7.0

func (node *FunctionName) Format(ctx *FmtCtx)

func (*FunctionName) Free added in v1.2.0

func (node *FunctionName) Free()

func (*FunctionName) HasNoNameQualifier added in v0.7.0

func (node *FunctionName) HasNoNameQualifier() bool

func (FunctionName) TypeName added in v1.2.0

func (node FunctionName) TypeName() string

type FunctionReference

type FunctionReference interface {
	fmt.Stringer
	NodeFormatter
}

the common interface to UnresolvedName and QualifiedFunctionName.

type GeoMetadata

type GeoMetadata struct {
}

type Grant

type Grant struct {
	Typ            GrantType
	GrantPrivilege GrantPrivilege
	GrantRole      GrantRole
	GrantProxy     GrantProxy
	// contains filtered or unexported fields
}

func NewGrant

func NewGrant() *Grant

func (*Grant) Format

func (node *Grant) Format(ctx *FmtCtx)

func (*Grant) Free added in v1.2.0

func (s *Grant) Free()

func (*Grant) GetQueryType added in v0.7.0

func (node *Grant) GetQueryType() string

func (*Grant) GetStatementType added in v0.7.0

func (node *Grant) GetStatementType() string

func (*Grant) StmtKind added in v1.2.0

func (node *Grant) StmtKind() StmtKind

type GrantPrivilege added in v0.6.0

type GrantPrivilege struct {
	Privileges []*Privilege
	//grant privileges
	ObjType ObjectType
	//grant privileges
	Level       *PrivilegeLevel
	Roles       []*Role
	GrantOption bool
	// contains filtered or unexported fields
}

func (*GrantPrivilege) Format added in v0.6.0

func (node *GrantPrivilege) Format(ctx *FmtCtx)

func (*GrantPrivilege) Free added in v1.2.0

func (s *GrantPrivilege) Free()

func (*GrantPrivilege) GetQueryType added in v0.7.0

func (node *GrantPrivilege) GetQueryType() string

func (*GrantPrivilege) GetStatementType added in v0.7.0

func (node *GrantPrivilege) GetStatementType() string

type GrantProxy added in v0.6.0

type GrantProxy struct {
	ProxyUser   *User
	Users       []*User
	GrantOption bool
	// contains filtered or unexported fields
}

func (*GrantProxy) Format added in v0.6.0

func (node *GrantProxy) Format(ctx *FmtCtx)

func (*GrantProxy) Free added in v1.2.0

func (s *GrantProxy) Free()

func (*GrantProxy) GetQueryType added in v0.7.0

func (node *GrantProxy) GetQueryType() string

func (*GrantProxy) GetStatementType added in v0.7.0

func (node *GrantProxy) GetStatementType() string

type GrantRole added in v0.6.0

type GrantRole struct {
	Roles       []*Role
	Users       []*User
	GrantOption bool
	// contains filtered or unexported fields
}

func (*GrantRole) Format added in v0.6.0

func (node *GrantRole) Format(ctx *FmtCtx)

func (*GrantRole) Free added in v1.2.0

func (s *GrantRole) Free()

func (*GrantRole) GetQueryType added in v0.7.0

func (node *GrantRole) GetQueryType() string

func (*GrantRole) GetStatementType added in v0.7.0

func (node *GrantRole) GetStatementType() string

type GrantType added in v0.6.0

type GrantType int
const (
	GrantTypePrivilege GrantType = iota
	GrantTypeRole
	GrantTypeProxy
)

type GroupBy

type GroupBy []Expr

a GROUP BY clause.

func (*GroupBy) Format

func (node *GroupBy) Format(ctx *FmtCtx)

type HashType

type HashType struct {
	Linear bool
	Expr   Expr
	// contains filtered or unexported fields
}

func NewHashType

func NewHashType(l bool, e Expr) *HashType

func (*HashType) Format

func (node *HashType) Format(ctx *FmtCtx)

func (*HashType) Free added in v1.2.0

func (node *HashType) Free()

func (HashType) TypeName added in v1.2.0

func (node HashType) TypeName() string

type Identifier

type Identifier string

sql indentifier

func (*Identifier) Format

func (node *Identifier) Format(ctx *FmtCtx)

type IdentifierList

type IdentifierList []Identifier

the list of identifiers.

func (*IdentifierList) Format

func (node *IdentifierList) Format(ctx *FmtCtx)

type IdentifierName

type IdentifierName interface {
	Expr
}

IdentifierName is referenced in the expression

type IfStmt added in v0.8.0

type IfStmt struct {
	Cond  Expr
	Body  []Statement
	Elifs []*ElseIfStmt
	Else  []Statement
	// contains filtered or unexported fields
}

func (*IfStmt) Format added in v0.8.0

func (node *IfStmt) Format(ctx *FmtCtx)

func (*IfStmt) Free added in v1.2.0

func (s *IfStmt) Free()

func (*IfStmt) GetQueryType added in v0.8.0

func (node *IfStmt) GetQueryType() string

func (*IfStmt) GetStatementType added in v0.8.0

func (node *IfStmt) GetStatementType() string

type InOutArgType added in v0.8.0

type InOutArgType int
const (
	TYPE_IN InOutArgType = iota
	TYPE_OUT
	TYPE_INOUT
)

type IncrementByOption added in v0.8.0

type IncrementByOption struct {
	Minus bool
	Num   any
}

func (*IncrementByOption) Format added in v0.8.0

func (node *IncrementByOption) Format(ctx *FmtCtx)

type Index

type Index struct {
	IfNotExists bool
	KeyParts    []*KeyPart
	Name        string
	KeyType     IndexType
	IndexOption *IndexOption
	// contains filtered or unexported fields
}

func NewIndex

func NewIndex(ifn bool, k []*KeyPart, n string, t IndexType, io *IndexOption) *Index

func (*Index) Format

func (node *Index) Format(ctx *FmtCtx)

func (*Index) Free added in v1.2.0

func (node *Index) Free()

func (Index) TypeName added in v1.2.0

func (node Index) TypeName() string

type IndexCategory

type IndexCategory int
const (
	INDEX_CATEGORY_NONE IndexCategory = iota
	INDEX_CATEGORY_UNIQUE
	INDEX_CATEGORY_FULLTEXT
	INDEX_CATEGORY_SPATIAL
)

func (IndexCategory) ToString

func (ic IndexCategory) ToString() string

type IndexHint added in v0.6.0

type IndexHint struct {
	IndexNames []string
	HintType   IndexHintType
	HintScope  IndexHintScope
}

func (*IndexHint) Format added in v0.6.0

func (node *IndexHint) Format(ctx *FmtCtx)

type IndexHintScope added in v0.6.0

type IndexHintScope int
const (
	HintForScan IndexHintScope = iota + 1
	HintForJoin
	HintForOrderBy
	HintForGroupBy
)

Index hint scopes.

type IndexHintType added in v0.6.0

type IndexHintType int
const (
	HintUse IndexHintType = iota + 1
	HintIgnore
	HintForce
)

type IndexOption

type IndexOption struct {
	NodeFormatter
	KeyBlockSize             uint64
	IType                    IndexType
	ParserName               string
	Comment                  string
	Visible                  VisibleType
	EngineAttribute          string
	SecondaryEngineAttribute string
	AlgoParamList            int64
	AlgoParamVectorOpType    string
}

func NewIndexOption

func NewIndexOption() *IndexOption

func (*IndexOption) Format

func (node *IndexOption) Format(ctx *FmtCtx)

Must follow the following sequence when test

func (*IndexOption) Free added in v1.2.0

func (node *IndexOption) Free()

func (IndexOption) TypeName added in v1.2.0

func (node IndexOption) TypeName() string

type IndexType

type IndexType int
const (
	INDEX_TYPE_INVALID IndexType = iota
	INDEX_TYPE_BTREE
	INDEX_TYPE_HASH
	INDEX_TYPE_RTREE
	INDEX_TYPE_BSI
	INDEX_TYPE_ZONEMAP
	INDEX_TYPE_IVFFLAT
	INDEX_TYPE_MASTER
)

func (IndexType) ToString

func (it IndexType) ToString() string

type Insert

type Insert struct {
	Table TableExpr

	Accounts          IdentifierList
	PartitionNames    IdentifierList
	Columns           IdentifierList
	Rows              *Select
	OnDuplicateUpdate UpdateExprs
	IsRestore         bool
	FromDataTenantID  uint32
	// contains filtered or unexported fields
}

the INSERT statement.

func NewInsert

func NewInsert(t TableExpr, c IdentifierList, r *Select, p IdentifierList) *Insert

func (*Insert) Format

func (node *Insert) Format(ctx *FmtCtx)

func (*Insert) Free added in v1.2.0

func (s *Insert) Free()

func (*Insert) GetQueryType added in v0.7.0

func (node *Insert) GetQueryType() string

func (*Insert) GetStatementType added in v0.7.0

func (node *Insert) GetStatementType() string

func (*Insert) StmtKind added in v1.2.0

func (node *Insert) StmtKind() StmtKind

type InternalType

type InternalType struct {
	//the group of types that are compatible with each other
	Family       Family
	FamilyString string
	/*
		From: https://dev.mysql.com/doc/refman/8.0/en/numeric-type-syntax.html

		For integer data types, M indicates the maximum display width.
		The maximum display width is 255. Display width is unrelated to the range of values a type can store.
		For floating-point and fixed-point data types, M is the total number of digits that can be stored.

		M is the total number of digits (the width) and D is the number of digits after the decimal point (the scale).
	*/
	//the size or scale of the data type, such as number of bits or characters.
	Width int32

	/*
		From: https://dev.mysql.com/doc/refman/8.0/en/numeric-type-attributes.html
		display width
	*/
	//TODO: Fix Typo
	DisplayWith int32

	//the accuracy of the data type.
	Scale int32

	//Unsigned or not
	Unsigned bool

	//binary or not
	Binary bool

	Zerofill bool

	Locale *string

	//The slice containing the type of each tuple field.
	TupleContents []*T

	//the slice containing the labels of each tuple field.
	TupleLabels []string

	//type id
	Oid uint32

	EnumValues []string

	//the type of array elements.
	ArrayContents *T

	//indicates whether the precision was explicitly set.
	//From https://dev.mysql.com/doc/refman/8.0/en/date-and-time-type-syntax.html
	//In mysql 8.0. Precision must be in the range 0 to 6.
	//A value of 0 signifies that there is no fractional part.
	//If omitted, the default precision is 0. (This differs from the standard SQL default of 6, for compatibility with previous MySQL versions.)
	// if Precision > 0, the precision
	// if TimePrecisionIsSet = true and precision = 0, then the precision = 0
	// if TimePrecisionIsSet = false and precision = 0, then the precision has not been indicated,
	//	so the default value is 0.
	TimePrecisionIsSet bool

	//interval type
	IntervalDurationField *IntervalDurationField

	//geospatial types.
	GeoMetadata *GeoMetadata

	//user defined types that are not arrays.
	UDTMetadata *PersistentUserDefinedTypeMetadata
}

for sql type

func (*InternalType) Format

func (node *InternalType) Format(ctx *FmtCtx)

type Interval added in v1.1.0

type Interval struct {
	Col  *UnresolvedName
	Val  Expr
	Unit string
}

func (*Interval) Format added in v1.1.0

func (node *Interval) Format(ctx *FmtCtx)

type IntervalDurationField

type IntervalDurationField struct {
}

type IntervalExpr

type IntervalExpr struct {
	Expr Expr
	Type IntervalType
	// contains filtered or unexported fields
}

INTERVAL / time unit

func NewIntervalExpr

func NewIntervalExpr(t IntervalType) *IntervalExpr

func (*IntervalExpr) Accept added in v0.8.0

func (node *IntervalExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*IntervalExpr) Format

func (node *IntervalExpr) Format(ctx *FmtCtx)

func (*IntervalExpr) String

func (node *IntervalExpr) String() string

type IntervalType

type IntervalType int

IntervalType is the type for time and timestamp units.

const (
	//an invalid time or timestamp unit
	INTERVAL_TYPE_INVALID IntervalType = iota
	//the time or timestamp unit MICROSECOND.
	INTERVAL_TYPE_MICROSECOND
	//the time or timestamp unit SECOND.
	INTERVAL_TYPE_SECOND
	//the time or timestamp unit MINUTE.
	INTERVAL_TYPE_MINUTE
	//the time or timestamp unit HOUR.
	INTERVAL_TYPE_HOUR
	//the time or timestamp unit DAY.
	INTERVAL_TYPE_DAY
	//the time or timestamp unit WEEK.
	INTERVAL_TYPE_WEEK
	//the time or timestamp unit MONTH.
	INTERVAL_TYPE_MONTH
	//the time or timestamp unit QUARTER.
	INTERVAL_TYPE_QUARTER
	//the time or timestamp unit YEAR.
	INTERVAL_TYPE_YEAR
	//the time unit SECOND_MICROSECOND.
	INTERVAL_TYPE_SECOND_MICROSECOND
	//the time unit MINUTE_MICROSECOND.
	INTERVAL_TYPE_MINUTE_MICROSECOND
	//the time unit MINUTE_SECOND.
	INTERVAL_TYPE_MINUTE_SECOND
	//the time unit HOUR_MICROSECOND.
	INTERVAL_TYPE_HOUR_MICROSECOND
	//the time unit HOUR_SECOND.
	INTERVAL_TYPE_HOUR_SECOND
	//the time unit HOUR_MINUTE.
	INTERVAL_TYPE_HOUR_MINUTE
	//the time unit DAY_MICROSECOND.
	INTERVAL_TYPE_DAY_MICROSECOND
	//the time unit DAY_SECOND.
	INTERVAL_TYPE_DAY_SECOND
	//the time unit DAY_MINUTE.
	INTERVAL_TYPE_DAYMINUTE
	//the time unit DAY_HOUR.
	INTERVAL_TYPE_DAYHOUR
	//the time unit YEAR_MONTH.
	INTERVAL_TYPE_YEARMONTH
)

func (*IntervalType) ToString

func (node *IntervalType) ToString() string

type IsFalseExpr added in v0.6.0

type IsFalseExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is false expression

func NewIsFalseExpr added in v0.6.0

func NewIsFalseExpr(e Expr) *IsFalseExpr

func (*IsFalseExpr) Accept added in v0.8.0

func (node *IsFalseExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsFalseExpr) Format added in v0.6.0

func (node *IsFalseExpr) Format(ctx *FmtCtx)

func (*IsFalseExpr) String added in v0.6.0

func (node *IsFalseExpr) String() string

type IsNotFalseExpr added in v0.6.0

type IsNotFalseExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is not false expression

func NewIsNotFalseExpr added in v0.6.0

func NewIsNotFalseExpr(e Expr) *IsNotFalseExpr

func (*IsNotFalseExpr) Accept added in v0.8.0

func (node *IsNotFalseExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsNotFalseExpr) Format added in v0.6.0

func (node *IsNotFalseExpr) Format(ctx *FmtCtx)

func (*IsNotFalseExpr) String added in v0.6.0

func (node *IsNotFalseExpr) String() string

type IsNotNullExpr

type IsNotNullExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is not null expression

func NewIsNotNullExpr

func NewIsNotNullExpr(e Expr) *IsNotNullExpr

func (*IsNotNullExpr) Accept added in v0.8.0

func (node *IsNotNullExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsNotNullExpr) Format

func (node *IsNotNullExpr) Format(ctx *FmtCtx)

func (*IsNotNullExpr) String

func (node *IsNotNullExpr) String() string

type IsNotTrueExpr added in v0.6.0

type IsNotTrueExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is not true expression

func NewIsNotTrueExpr added in v0.6.0

func NewIsNotTrueExpr(e Expr) *IsNotTrueExpr

func (*IsNotTrueExpr) Accept added in v0.8.0

func (node *IsNotTrueExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsNotTrueExpr) Format added in v0.6.0

func (node *IsNotTrueExpr) Format(ctx *FmtCtx)

func (*IsNotTrueExpr) String added in v0.6.0

func (node *IsNotTrueExpr) String() string

type IsNotUnknownExpr added in v0.6.0

type IsNotUnknownExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is not unknown expression

func NewIsNotUnknownExpr added in v0.6.0

func NewIsNotUnknownExpr(e Expr) *IsNotUnknownExpr

func (*IsNotUnknownExpr) Accept added in v0.8.0

func (node *IsNotUnknownExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsNotUnknownExpr) Format added in v0.6.0

func (node *IsNotUnknownExpr) Format(ctx *FmtCtx)

func (*IsNotUnknownExpr) String added in v0.6.0

func (node *IsNotUnknownExpr) String() string

type IsNullExpr

type IsNullExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is null expression

func NewIsNullExpr

func NewIsNullExpr(e Expr) *IsNullExpr

func (*IsNullExpr) Accept added in v0.8.0

func (node *IsNullExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsNullExpr) Format

func (node *IsNullExpr) Format(ctx *FmtCtx)

func (*IsNullExpr) String

func (node *IsNullExpr) String() string

type IsTrueExpr added in v0.6.0

type IsTrueExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is true expression

func NewIsTrueExpr added in v0.6.0

func NewIsTrueExpr(e Expr) *IsTrueExpr

func (*IsTrueExpr) Accept added in v0.8.0

func (node *IsTrueExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsTrueExpr) Format added in v0.6.0

func (node *IsTrueExpr) Format(ctx *FmtCtx)

func (*IsTrueExpr) String added in v0.6.0

func (node *IsTrueExpr) String() string

type IsUnknownExpr added in v0.6.0

type IsUnknownExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

is unknown expression

func NewIsUnknownExpr added in v0.6.0

func NewIsUnknownExpr(e Expr) *IsUnknownExpr

func (*IsUnknownExpr) Accept added in v0.8.0

func (node *IsUnknownExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*IsUnknownExpr) Format added in v0.6.0

func (node *IsUnknownExpr) Format(ctx *FmtCtx)

func (*IsUnknownExpr) String added in v0.6.0

func (node *IsUnknownExpr) String() string

type IsolationLevelType added in v0.8.0

type IsolationLevelType int
const (
	ISOLATION_LEVEL_NONE IsolationLevelType = iota
	ISOLATION_LEVEL_REPEATABLE_READ
	ISOLATION_LEVEL_READ_COMMITTED
	ISOLATION_LEVEL_READ_UNCOMMITTED
	ISOLATION_LEVEL_SERIALIZABLE
)

func (IsolationLevelType) String added in v0.8.0

func (ilt IsolationLevelType) String() string

type IterateStmt added in v0.8.0

type IterateStmt struct {
	Name Identifier
	// contains filtered or unexported fields
}

func (*IterateStmt) Format added in v0.8.0

func (node *IterateStmt) Format(ctx *FmtCtx)

func (*IterateStmt) Free added in v1.2.0

func (s *IterateStmt) Free()

func (*IterateStmt) GetQueryType added in v0.8.0

func (node *IterateStmt) GetQueryType() string

func (*IterateStmt) GetStatementType added in v0.8.0

func (node *IterateStmt) GetStatementType() string

type JoinCond

type JoinCond interface {
	NodeFormatter
}

the join condition.

type JoinTableExpr

type JoinTableExpr struct {
	TableExpr
	JoinType string
	Left     TableExpr
	Right    TableExpr
	Cond     JoinCond
}

func NewJoinTableExpr

func NewJoinTableExpr(jt string, l, r TableExpr, jc JoinCond) *JoinTableExpr

func (*JoinTableExpr) Format

func (node *JoinTableExpr) Format(ctx *FmtCtx)

type KeyPart

type KeyPart struct {
	ColName   *UnresolvedName
	Length    int
	Direction Direction // asc or desc
	Expr      Expr
	// contains filtered or unexported fields
}

func NewKeyPart

func NewKeyPart(c *UnresolvedName, l int, d Direction, e Expr) *KeyPart

func (*KeyPart) Format

func (node *KeyPart) Format(ctx *FmtCtx)

func (*KeyPart) Free added in v1.2.0

func (node *KeyPart) Free()

func (KeyPart) TypeName added in v1.2.0

func (node KeyPart) TypeName() string

type KeyType

type KeyType struct {
	Linear     bool
	ColumnList []*UnresolvedName
	Algorithm  int64
	// contains filtered or unexported fields
}

func NewKeyType

func NewKeyType() *KeyType

func (*KeyType) Format

func (node *KeyType) Format(ctx *FmtCtx)

func (*KeyType) Free added in v1.2.0

func (node *KeyType) Free()

func (KeyType) TypeName added in v1.2.0

func (node KeyType) TypeName() string

type Kill added in v0.7.0

type Kill struct {
	Option       KillOption
	ConnectionId uint64
	StmtOption   StatementOption
	// contains filtered or unexported fields
}

func (*Kill) Format added in v0.7.0

func (k *Kill) Format(ctx *FmtCtx)

func (*Kill) Free added in v1.2.0

func (s *Kill) Free()

func (*Kill) GetQueryType added in v0.7.0

func (k *Kill) GetQueryType() string

func (*Kill) GetStatementType added in v0.7.0

func (k *Kill) GetStatementType() string

func (*Kill) StmtKind added in v1.2.0

func (k *Kill) StmtKind() StmtKind

type KillOption added in v0.7.0

type KillOption struct {
	Exist bool
	Typ   KillType
}

func (KillOption) Format added in v0.7.0

func (ko KillOption) Format(ctx *FmtCtx)

type KillType added in v0.7.0

type KillType int
const (
	KillTypeConnection KillType = iota
	KillTypeQuery
)

func (KillType) String added in v0.7.0

func (k KillType) String() string

type LeaveStmt added in v0.8.0

type LeaveStmt struct {
	Name Identifier
	// contains filtered or unexported fields
}

func (*LeaveStmt) Format added in v0.8.0

func (node *LeaveStmt) Format(ctx *FmtCtx)

func (*LeaveStmt) Free added in v1.2.0

func (s *LeaveStmt) Free()

func (*LeaveStmt) GetQueryType added in v0.8.0

func (node *LeaveStmt) GetQueryType() string

func (*LeaveStmt) GetStatementType added in v0.8.0

func (node *LeaveStmt) GetStatementType() string

type LengthScaleOpt

type LengthScaleOpt struct {
	DisplayWith int32
	Scale       int32
}

type Limit

type Limit struct {
	Offset, Count Expr
}

the LIMIT clause.

func NewLimit

func NewLimit(o, c Expr) *Limit

func (*Limit) Format

func (node *Limit) Format(ctx *FmtCtx)

type Lines

type Lines struct {
	StartingBy   string
	TerminatedBy *Terminated
}

func NewLines

func NewLines(s string, t string) *Lines

func (*Lines) Format

func (node *Lines) Format(ctx *FmtCtx)

type ListType

type ListType struct {
	Expr       Expr
	ColumnList []*UnresolvedName
	// contains filtered or unexported fields
}

func NewListType

func NewListType() *ListType

func (*ListType) Format

func (node *ListType) Format(ctx *FmtCtx)

func (*ListType) Free added in v1.2.0

func (node *ListType) Free()

func (ListType) TypeName added in v1.2.0

func (node ListType) TypeName() string

type Load

type Load struct {
	Local             bool
	DuplicateHandling DuplicateKey
	Table             *TableName
	Accounts          IdentifierList
	//Partition
	Param *ExternParam
	// contains filtered or unexported fields
}

Load data statement

func (*Load) Format

func (node *Load) Format(ctx *FmtCtx)

func (*Load) Free added in v1.2.0

func (s *Load) Free()

func (*Load) GetQueryType added in v0.7.0

func (node *Load) GetQueryType() string

func (*Load) GetStatementType added in v0.7.0

func (node *Load) GetStatementType() string

func (*Load) StmtKind added in v1.2.0

func (node *Load) StmtKind() StmtKind

type LoadColumn

type LoadColumn interface {
	NodeFormatter
}

column element in load data column list

type LoadExtension added in v0.7.0

type LoadExtension struct {
	Name Identifier
	// contains filtered or unexported fields
}

func NewLoadExtension added in v1.2.0

func NewLoadExtension(name Identifier) *LoadExtension

func (*LoadExtension) Format added in v0.7.0

func (node *LoadExtension) Format(ctx *FmtCtx)

func (*LoadExtension) Free added in v1.2.0

func (node *LoadExtension) Free()

func (*LoadExtension) StmtKind added in v1.2.0

func (node *LoadExtension) StmtKind() StmtKind

func (LoadExtension) TypeName added in v1.2.0

func (node LoadExtension) TypeName() string

type LockDefault

type LockDefault struct {
	// contains filtered or unexported fields
}

type LockExclusive

type LockExclusive struct {
	// contains filtered or unexported fields
}

type LockNone

type LockNone struct {
	// contains filtered or unexported fields
}

type LockShared

type LockShared struct {
	// contains filtered or unexported fields
}

type LockTableStmt added in v0.7.0

type LockTableStmt struct {
	TableLocks []TableLock
	// contains filtered or unexported fields
}

func (*LockTableStmt) Format added in v0.7.0

func (node *LockTableStmt) Format(ctx *FmtCtx)

func (*LockTableStmt) Free added in v1.2.0

func (s *LockTableStmt) Free()

func (*LockTableStmt) GetQueryType added in v0.7.0

func (node *LockTableStmt) GetQueryType() string

func (*LockTableStmt) GetStatementType added in v0.7.0

func (node *LockTableStmt) GetStatementType() string

func (*LockTableStmt) StmtKind added in v1.2.0

func (node *LockTableStmt) StmtKind() StmtKind

type LoopStmt added in v0.8.0

type LoopStmt struct {
	Name Identifier
	Body []Statement
	// contains filtered or unexported fields
}

func (*LoopStmt) Format added in v0.8.0

func (node *LoopStmt) Format(ctx *FmtCtx)

func (*LoopStmt) Free added in v1.2.0

func (s *LoopStmt) Free()

func (*LoopStmt) GetQueryType added in v0.8.0

func (node *LoopStmt) GetQueryType() string

func (*LoopStmt) GetStatementType added in v0.8.0

func (node *LoopStmt) GetStatementType() string

type MatchType

type MatchType int

in reference definition

const (
	MATCH_INVALID MatchType = iota
	MATCH_FULL
	MATCH_PARTIAL
	MATCH_SIMPLE
)

func (*MatchType) ToString

func (node *MatchType) ToString() string

type MaxValue

type MaxValue struct {
	// contains filtered or unexported fields
}

func NewMaxValue

func NewMaxValue() *MaxValue

func (*MaxValue) Accept added in v0.8.0

func (node *MaxValue) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*MaxValue) Format added in v0.6.0

func (node *MaxValue) Format(ctx *FmtCtx)

func (*MaxValue) String

func (node *MaxValue) String() string

type MaxValueOption added in v0.8.0

type MaxValueOption struct {
	Minus bool
	Num   any
}

func (*MaxValueOption) Format added in v0.8.0

func (node *MaxValueOption) Format(ctx *FmtCtx)

type MinValueOption added in v0.8.0

type MinValueOption struct {
	Minus bool
	Num   any
}

func (*MinValueOption) Format added in v0.8.0

func (node *MinValueOption) Format(ctx *FmtCtx)

type MiscOption

type MiscOption interface {
	NodeFormatter
}

type MoDump added in v0.6.0

type MoDump struct {
	ExportParams *ExportParam
	// contains filtered or unexported fields
}

func (*MoDump) Format added in v0.6.0

func (node *MoDump) Format(ctx *FmtCtx)

func (*MoDump) Free added in v1.2.0

func (s *MoDump) Free()

func (*MoDump) GetQueryType added in v0.7.0

func (node *MoDump) GetQueryType() string

func (*MoDump) GetStatementType added in v0.7.0

func (node *MoDump) GetStatementType() string

func (*MoDump) StmtKind added in v1.2.0

func (node *MoDump) StmtKind() StmtKind

type NameParts

type NameParts = [4]string

the path in an UnresolvedName.

type NaturalJoinCond

type NaturalJoinCond struct {
	JoinCond
}

the NATURAL join condition

func NewNaturalJoinCond

func NewNaturalJoinCond() *NaturalJoinCond

func (*NaturalJoinCond) Format

func (node *NaturalJoinCond) Format(ctx *FmtCtx)

type NodeChecker added in v0.8.0

type NodeChecker interface {

	//	The general implementation logic of the `Accept` method is:
	//	First, call the Visitor.`Enter` method, and assign the returned `node` to the receiver of the `Accept` method,
	//	If the returnd `skipChildren` value is true, then it is necessary to stop accessing the receiver's child node
	//	Otherwise, recursively call the` Accept` of its children nodes,
	//	Finally, don't forget to call the Visitor's `Exit` method
	Accept(v Visitor) (node Expr, ok bool)
}

Visitor Design Pattern NodeChecker is abstract tree Node

type NodeFormatter

type NodeFormatter interface {
	Format(ctx *FmtCtx)
}

NodeFormatter for formatted output of the node.

type NotExpr

type NotExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

not expression

func NewNotExpr

func NewNotExpr(e Expr) *NotExpr

func (*NotExpr) Accept added in v0.8.0

func (node *NotExpr) Accept(v Visitor) (Expr, bool)

func (*NotExpr) Format

func (node *NotExpr) Format(ctx *FmtCtx)

func (*NotExpr) String

func (node *NotExpr) String() string

type NullsPosition added in v0.6.0

type NullsPosition int8
const (
	DefaultNullsPosition NullsPosition = iota
	NullsFirst
	NullsLast
)

func (NullsPosition) String added in v0.6.0

func (np NullsPosition) String() string

type NumVal

type NumVal struct {
	Constant
	Value constant.Value

	ValType P_TYPE
	// contains filtered or unexported fields
}

the AST for the constant numeric value.

func NewNumVal

func NewNumVal(value constant.Value, origString string, negative bool) *NumVal

func NewNumValWithResFoalt

func NewNumValWithResFoalt(value constant.Value, origString string, negative bool, resFloat float64) *NumVal

func NewNumValWithResInt

func NewNumValWithResInt(value constant.Value, origString string, negative bool, resInt int64) *NumVal

func NewNumValWithType added in v0.5.0

func NewNumValWithType(value constant.Value, origString string, negative bool, typ P_TYPE) *NumVal

func (*NumVal) Accept added in v0.8.0

func (n *NumVal) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*NumVal) Format

func (n *NumVal) Format(ctx *FmtCtx)

func (*NumVal) Negative

func (n *NumVal) Negative() bool

func (*NumVal) OrigString added in v0.8.0

func (n *NumVal) OrigString() string

func (*NumVal) String

func (n *NumVal) String() string

type ObjectInfo added in v1.2.0

type ObjectInfo struct {
	SLevel  SnapshotLevelType // snapshot level
	ObjName Identifier        // object name
}

func (*ObjectInfo) Format added in v1.2.0

func (node *ObjectInfo) Format(ctx *FmtCtx)

type ObjectName

type ObjectName interface {
	NodeFormatter
}

the common interface for qualified object names

type ObjectNamePrefix

type ObjectNamePrefix struct {
	CatalogName Identifier
	SchemaName  Identifier

	//true iff the catalog was explicitly specified
	ExplicitCatalog bool
	//true iff the schema was explicitly specified
	ExplicitSchema bool
}

the path prefix of an object name.

type ObjectType

type ObjectType int
const (
	OBJECT_TYPE_NONE ObjectType = iota
	OBJECT_TYPE_TABLE
	OBJECT_TYPE_DATABASE
	OBJECT_TYPE_FUNCTION
	OBJECT_TYPE_PROCEDURE
	OBJECT_TYPE_VIEW
	OBJECT_TYPE_ACCOUNT
)

func (*ObjectType) String added in v0.6.0

func (node *ObjectType) String() string

type OnJoinCond

type OnJoinCond struct {
	JoinCond
	Expr Expr
}

the ON condition for join

func NewOnJoinCond

func NewOnJoinCond(e Expr) *OnJoinCond

func (*OnJoinCond) Format

func (node *OnJoinCond) Format(ctx *FmtCtx)

type OptionElem added in v0.5.0

type OptionElem struct {
	Name  string
	Value string
}

func MakeOptionElem added in v0.5.0

func MakeOptionElem(name string, value string) OptionElem

func MakeOptions added in v0.5.0

func MakeOptions(elem OptionElem) []OptionElem

type OrExpr

type OrExpr struct {
	Left, Right Expr
	// contains filtered or unexported fields
}

or expression

func NewOrExpr

func NewOrExpr(l, r Expr) *OrExpr

func (*OrExpr) Accept added in v0.8.0

func (node *OrExpr) Accept(v Visitor) (Expr, bool)

func (*OrExpr) Format

func (node *OrExpr) Format(ctx *FmtCtx)

func (*OrExpr) String

func (node *OrExpr) String() string

type Order

type Order struct {
	Expr          Expr
	Direction     Direction
	NullsPosition NullsPosition
	//without order
	NullOrder bool
}

the ordering expression.

func NewOrder

func NewOrder(e Expr, d Direction, np NullsPosition, o bool) *Order

func (*Order) Format

func (node *Order) Format(ctx *FmtCtx)

type OrderBy

type OrderBy []*Order

OrderBy represents an ORDER BY clause.

func (*OrderBy) Format

func (node *OrderBy) Format(ctx *FmtCtx)

type OutputType added in v1.2.0

type OutputType int

type P_TYPE added in v0.5.0

type P_TYPE uint8
const (
	P_any P_TYPE = iota
	P_hexnum
	P_null
	P_bool
	P_int64
	P_uint64
	P_float64
	P_char
	P_decimal
	P_bit
	P_ScoreBinary
	P_nulltext
)

type ParamExpr added in v0.5.1

type ParamExpr struct {
	Offset int
	// contains filtered or unexported fields
}

select a from t1 where a > ?

func NewParamExpr added in v0.5.1

func NewParamExpr(offset int) *ParamExpr

func (*ParamExpr) Accept added in v0.8.0

func (node *ParamExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*ParamExpr) Format added in v0.5.1

func (node *ParamExpr) Format(ctx *FmtCtx)

func (*ParamExpr) String added in v0.5.1

func (node *ParamExpr) String() string

type ParenExpr

type ParenExpr struct {
	Expr Expr
	// contains filtered or unexported fields
}

the parenthesized expression.

func NewParentExpr added in v1.1.2

func NewParentExpr(e Expr) *ParenExpr

func (*ParenExpr) Accept added in v0.8.0

func (node *ParenExpr) Accept(v Visitor) (Expr, bool)

func (*ParenExpr) Format

func (node *ParenExpr) Format(ctx *FmtCtx)

func (*ParenExpr) String

func (node *ParenExpr) String() string

type ParenSelect

type ParenSelect struct {
	SelectStatement
	Select *Select
}

the parenthesized SELECT/UNION/VALUES statement.

func (*ParenSelect) Format

func (node *ParenSelect) Format(ctx *FmtCtx)

type ParenTableExpr

type ParenTableExpr struct {
	TableExpr
	Expr TableExpr
}

the parenthesized TableExpr.

func NewParenTableExpr

func NewParenTableExpr(e TableExpr) *ParenTableExpr

func (*ParenTableExpr) Format

func (node *ParenTableExpr) Format(ctx *FmtCtx)

type Partition

type Partition struct {
	Name    Identifier
	Values  Values
	Options []TableOption
	Subs    []*SubPartition
}

func NewPartition

func NewPartition(n Identifier, v Values, o []TableOption, s []*SubPartition) *Partition

func (*Partition) Format

func (node *Partition) Format(ctx *FmtCtx)

func (*Partition) Free added in v1.2.0

func (node *Partition) Free()

func (Partition) TypeName added in v1.2.0

func (node Partition) TypeName() string

type PartitionBy

type PartitionBy struct {
	IsSubPartition bool // for format
	PType          PartitionType
	Num            uint64
}

func NewPartitionBy

func NewPartitionBy(typ PartitionType) *PartitionBy

func NewPartitionBy2 added in v1.2.0

func NewPartitionBy2(issub bool, pt PartitionType, n uint64) *PartitionBy

func (*PartitionBy) Format

func (node *PartitionBy) Format(ctx *FmtCtx)

func (*PartitionBy) Free added in v1.2.0

func (node *PartitionBy) Free()

func (PartitionBy) TypeName added in v1.2.0

func (node PartitionBy) TypeName() string

type PartitionOption

type PartitionOption struct {
	PartBy     *PartitionBy
	SubPartBy  *PartitionBy
	Partitions []*Partition
	// contains filtered or unexported fields
}

func NewPartitionOption

func NewPartitionOption(pb *PartitionBy, spb *PartitionBy, parts []*Partition) *PartitionOption

func (*PartitionOption) Format

func (node *PartitionOption) Format(ctx *FmtCtx)

func (*PartitionOption) Free added in v1.2.0

func (node *PartitionOption) Free()

func (PartitionOption) TypeName added in v1.2.0

func (node PartitionOption) TypeName() string

type PartitionType

type PartitionType interface {
	NodeFormatter
}

type PauseDaemonTask added in v1.1.0

type PauseDaemonTask struct {
	TaskID uint64
	// contains filtered or unexported fields
}

func (*PauseDaemonTask) Format added in v1.1.0

func (node *PauseDaemonTask) Format(ctx *FmtCtx)

func (*PauseDaemonTask) Free added in v1.2.0

func (s *PauseDaemonTask) Free()

func (*PauseDaemonTask) GetQueryType added in v1.1.0

func (node *PauseDaemonTask) GetQueryType() string

func (*PauseDaemonTask) GetStatementType added in v1.1.0

func (node *PauseDaemonTask) GetStatementType() string

func (*PauseDaemonTask) StmtKind added in v1.2.0

func (node *PauseDaemonTask) StmtKind() StmtKind

type PersistentUserDefinedTypeMetadata

type PersistentUserDefinedTypeMetadata struct {
}

type Precedence added in v0.5.0

type Precedence int
const (
	Syntactic Precedence = iota
	P1
	P2
	P3
	P4
	P5
	P6
	P7
	P8
	P9
	P10
	P11
	P12
	P13
	P14
	P15
	P16
	P17
)

type Prepare added in v0.5.1

type Prepare interface {
	Statement
}

type PrepareStmt added in v0.5.1

type PrepareStmt struct {
	Name Identifier
	Stmt Statement
	// contains filtered or unexported fields
}

func NewPrepareStmt added in v0.5.1

func NewPrepareStmt(name Identifier, statement Statement) *PrepareStmt

func (*PrepareStmt) Format added in v0.5.1

func (node *PrepareStmt) Format(ctx *FmtCtx)

func (*PrepareStmt) Free added in v1.2.0

func (node *PrepareStmt) Free()

func (*PrepareStmt) GetQueryType added in v0.7.0

func (node *PrepareStmt) GetQueryType() string

func (*PrepareStmt) GetStatementType added in v0.7.0

func (node *PrepareStmt) GetStatementType() string

func (*PrepareStmt) StmtKind added in v1.2.0

func (node *PrepareStmt) StmtKind() StmtKind

func (PrepareStmt) TypeName added in v1.2.0

func (node PrepareStmt) TypeName() string

type PrepareString added in v0.5.1

type PrepareString struct {
	Name Identifier
	Sql  string
	// contains filtered or unexported fields
}

func NewPrepareString added in v0.5.1

func NewPrepareString(name Identifier, sql string) *PrepareString

func (*PrepareString) Format added in v0.5.1

func (node *PrepareString) Format(ctx *FmtCtx)

func (*PrepareString) Free added in v1.2.0

func (node *PrepareString) Free()

func (*PrepareString) GetQueryType added in v0.7.0

func (node *PrepareString) GetQueryType() string

func (*PrepareString) GetStatementType added in v0.7.0

func (node *PrepareString) GetStatementType() string

func (*PrepareString) StmtKind added in v1.2.0

func (node *PrepareString) StmtKind() StmtKind

func (PrepareString) TypeName added in v1.2.0

func (node PrepareString) TypeName() string

type PrimaryKeyIndex

type PrimaryKeyIndex struct {
	KeyParts         []*KeyPart
	Name             string
	ConstraintSymbol string
	Empty            bool
	IndexOption      *IndexOption
	// contains filtered or unexported fields
}

func NewPrimaryKeyIndex

func NewPrimaryKeyIndex(k []*KeyPart, n string, e bool, io *IndexOption) *PrimaryKeyIndex

func (*PrimaryKeyIndex) Format

func (node *PrimaryKeyIndex) Format(ctx *FmtCtx)

func (*PrimaryKeyIndex) Free added in v1.2.0

func (node *PrimaryKeyIndex) Free()

func (PrimaryKeyIndex) TypeName added in v1.2.0

func (node PrimaryKeyIndex) TypeName() string

type Privilege

type Privilege struct {
	NodeFormatter
	Type       PrivilegeType
	ColumnList []*UnresolvedName
}

func NewPrivilege

func NewPrivilege(t PrivilegeType, c []*UnresolvedName) *Privilege

func (*Privilege) Format

func (node *Privilege) Format(ctx *FmtCtx)

type PrivilegeLevel

type PrivilegeLevel struct {
	NodeFormatter
	Level       PrivilegeLevelType
	DbName      string
	TabName     string
	RoutineName string
}

func NewPrivilegeLevel

func NewPrivilegeLevel(l PrivilegeLevelType, d, t, r string) *PrivilegeLevel

func (*PrivilegeLevel) Format

func (node *PrivilegeLevel) Format(ctx *FmtCtx)

func (*PrivilegeLevel) String added in v0.6.0

func (node *PrivilegeLevel) String() string

type PrivilegeLevelType

type PrivilegeLevelType int
const (
	PRIVILEGE_LEVEL_TYPE_STAR           PrivilegeLevelType = iota //*
	PRIVILEGE_LEVEL_TYPE_STAR_STAR                                //*.*
	PRIVILEGE_LEVEL_TYPE_DATABASE                                 //db_name
	PRIVILEGE_LEVEL_TYPE_DATABASE_STAR                            //db_name.*
	PRIVILEGE_LEVEL_TYPE_DATABASE_TABLE                           //db_name.tbl_name
	PRIVILEGE_LEVEL_TYPE_TABLE                                    //tbl_name
	PRIVILEGE_LEVEL_TYPE_COLUMN                                   // (x,x)
	PRIVILEGE_LEVEL_TYPE_STORED_ROUTINE                           //procedure
	PRIVILEGE_LEVEL_TYPE_PROXY
	PRIVILEGE_LEVEL_TYPE_ROUTINE
)

type PrivilegeType

type PrivilegeType int
const (
	PRIVILEGE_TYPE_STATIC_ALL PrivilegeType = iota //Grant all privileges at specified access level except GRANT OPTION and PROXY.
	PRIVILEGE_TYPE_STATIC_CREATE_ACCOUNT
	PRIVILEGE_TYPE_STATIC_DROP_ACCOUNT
	PRIVILEGE_TYPE_STATIC_ALTER_ACCOUNT
	PRIVILEGE_TYPE_STATIC_UPGRADE_ACCOUNT
	PRIVILEGE_TYPE_STATIC_CREATE_USER //Enable use of CREATE USER, DROP USER, RENAME USER, and REVOKE ALL PRIVILEGES. Level: Global.
	PRIVILEGE_TYPE_STATIC_DROP_USER
	PRIVILEGE_TYPE_STATIC_ALTER_USER
	PRIVILEGE_TYPE_STATIC_CREATE_ROLE //Enable role creation. Level: Global.
	PRIVILEGE_TYPE_STATIC_DROP_ROLE   //Enable roles to be dropped. Level: Global.
	PRIVILEGE_TYPE_STATIC_ALTER_ROLE
	PRIVILEGE_TYPE_STATIC_CREATE_DATABASE
	PRIVILEGE_TYPE_STATIC_DROP_DATABASE
	PRIVILEGE_TYPE_STATIC_SHOW_DATABASES //Enable SHOW DATABASES to show all databases. Level: Global.
	PRIVILEGE_TYPE_STATIC_CONNECT
	PRIVILEGE_TYPE_STATIC_MANAGE_GRANTS
	PRIVILEGE_TYPE_STATIC_OWNERSHIP
	PRIVILEGE_TYPE_STATIC_SHOW_TABLES
	PRIVILEGE_TYPE_STATIC_CREATE_TABLE
	PRIVILEGE_TYPE_STATIC_DROP_TABLE
	PRIVILEGE_TYPE_STATIC_DROP_VIEW
	PRIVILEGE_TYPE_STATIC_ALTER_TABLE
	PRIVILEGE_TYPE_STATIC_ALTER_VIEW
	PRIVILEGE_TYPE_STATIC_SELECT     //Enable use of SELECT. Levels: Global, database, table, column.
	PRIVILEGE_TYPE_STATIC_INSERT     //Enable use of INSERT. Levels: Global, database, table, column.
	PRIVILEGE_TYPE_STATIC_TRUNCATE   //Enable use of REPLACE. Levels: Global, database, table, column.
	PRIVILEGE_TYPE_STATIC_UPDATE     //Enable use of UPDATE. Levels: Global, database, table, column.
	PRIVILEGE_TYPE_STATIC_DELETE     //Enable use of DELETE. Level: Global, database, table.
	PRIVILEGE_TYPE_STATIC_REFERENCES //Enable foreign key creation. Levels: Global, database, table, column.
	PRIVILEGE_TYPE_STATIC_REFERENCE
	PRIVILEGE_TYPE_STATIC_INDEX   //Enable indexes to be created or dropped. Levels: Global, database, table.
	PRIVILEGE_TYPE_STATIC_EXECUTE //Enable the user to execute stored routines. Levels: Global, database, routine.
	PRIVILEGE_TYPE_STATIC_VALUES  //Enable use of VALUES. Levels: Global, database, table.

	PRIVILEGE_TYPE_STATIC_ALTER
	PRIVILEGE_TYPE_STATIC_CREATE
	PRIVILEGE_TYPE_STATIC_DROP
	PRIVILEGE_TYPE_STATIC_ALTER_ROUTINE           //Enable stored routines to be altered or dropped. Levels: Global, database, routine.
	PRIVILEGE_TYPE_STATIC_CREATE_ROUTINE          //Enable stored routine creation. Levels: Global, database.
	PRIVILEGE_TYPE_STATIC_CREATE_TABLESPACE       //Enable tablespaces and log file groups to be created, altered, or dropped. Level: Global.
	PRIVILEGE_TYPE_STATIC_CREATE_TEMPORARY_TABLES //Enable use of CREATE TEMPORARY TABLE. Levels: Global, database.
	PRIVILEGE_TYPE_STATIC_CREATE_VIEW             //Enable views to be created or altered. Levels: Global, database, table.
	PRIVILEGE_TYPE_STATIC_EVENT                   //Enable use of events for the Event Scheduler. Levels: Global, database.
	PRIVILEGE_TYPE_STATIC_FILE                    //Enable the user to cause the server to read or write files. Level: Global.
	PRIVILEGE_TYPE_STATIC_GRANT_OPTION            //Enable privileges to be granted to or removed from other accounts. Levels: Global, database, table, routine, proxy.
	PRIVILEGE_TYPE_STATIC_LOCK_TABLES             //Enable use of LOCK TABLES on tables for which you have the SELECT privilege. Levels: Global, database.
	PRIVILEGE_TYPE_STATIC_PROCESS                 //Enable the user to see all processes with SHOW PROCESSLIST. Level: Global.
	PRIVILEGE_TYPE_STATIC_PROXY                   //Enable user proxying. Level: From user to user.
	PRIVILEGE_TYPE_STATIC_RELOAD                  //Enable use of FLUSH operations. Level: Global.
	PRIVILEGE_TYPE_STATIC_REPLICATION_CLIENT      //Enable the user to ask where source or replica servers are. Level: Global.
	PRIVILEGE_TYPE_STATIC_REPLICATION_SLAVE       //Enable replicas to read binary log events from the source. Level: Global.
	PRIVILEGE_TYPE_STATIC_SHOW_VIEW               //Enable use of SHOW CREATE VIEW. Levels: Global, database, table.
	PRIVILEGE_TYPE_STATIC_SHUTDOWN                //Enable use of mysqladmin shutdown. Level: Global.
	PRIVILEGE_TYPE_STATIC_SUPER                   //Enable use of other administrative operations such as CHANGE REPLICATION SOURCE TO, CHANGE MASTER TO, KILL, PURGE BINARY LOGS, SET GLOBAL, and mysqladmin debug command. Level: Global.
	PRIVILEGE_TYPE_STATIC_TRIGGER                 //Enable trigger operations. Levels: Global, database, table.
	PRIVILEGE_TYPE_STATIC_USAGE                   //Synonym for “no privileges”
	PRIVILEGE_TYPE_
	PRIVILEGE_TYPE_DYNAMIC_APPLICATION_PASSWORD_ADMIN //Enable dual password administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_AUDIT_ADMIN                //Enable audit log configuration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_BACKUP_ADMIN               //Enable backup administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_BINLOG_ADMIN               //Enable binary log control. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_BINLOG_ENCRYPTION_ADMIN    //Enable activation and deactivation of binary log encryption. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_CLONE_ADMIN                //Enable clone administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_CONNECTION_ADMIN           //Enable connection limit/restriction control. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_ENCRYPTION_KEY_ADMIN       //Enable InnoDB key rotation. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FIREWALL_ADMIN             //Enable firewall rule administration, any user. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FIREWALL_EXEMPT            //Exempt user from firewall restrictions. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FIREWALL_USER              //Enable firewall rule administration, self. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FLUSH_OPTIMIZER_COSTS      //Enable optimizer cost reloading. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FLUSH_STATUS               //Enable status indicator flushing. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FLUSH_TABLES               //Enable table flushing. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_FLUSH_USER_RESOURCES       //Enable user-resource flushing. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_GROUP_REPLICATION_ADMIN    //Enable Group Replication control. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_INNODB_REDO_LOG_Enable     //Enable or disable redo logging. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_INNODB_REDO_LOG_ARCHIVE    //Enable redo log archiving administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_NDB_STORED_USER            //Enable sharing of user or role between SQL nodes (NDB Cluster). Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_PERSIST_RO_VARIABLES_ADMIN //Enable persisting read-only system variables. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_REPLICATION_APPLIER        //Act as the PRIVILEGE_CHECKS_USER for a replication channel. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_REPLICATION_SLAVE_ADMIN    //Enable regular replication control. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_RESOURCE_GROUP_ADMIN       //Enable resource group administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_RESOURCE_GROUP_USER        //Enable resource group administration. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_ROLE_ADMIN                 //Enable roles to be granted or revoked, use of WITH ADMIN OPTION. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_SESSION_VARIABLES_ADMIN    //Enable setting restricted session system variables. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_SET_USER_ID                //Enable setting non-self DEFINER values. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_SHOW_ROUTINE               //Enable access to stored routine definitions. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_SYSTEM_USER                //Designate account as system account. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_SYSTEM_VARIABLES_ADMIN     //Enable modifying or persisting global system variables. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_TABLE_ENCRYPTION_ADMIN     //Enable overriding default encryption settings. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_VERSION_TOKEN_ADMIN        //Enable use of Version Tokens functions. Level: Global.
	PRIVILEGE_TYPE_DYNAMIC_XA_RECOVER_ADMIN           //Enable XA RECOVER execution. Level: Global.
)

* From: https://dev.mysql.com/doc/refman/8.0/en/grant.html

func (*PrivilegeType) ToString

func (node *PrivilegeType) ToString() string

type ProcedureArg added in v0.8.0

type ProcedureArg interface {
	NodeFormatter
	GetName(ctx *FmtCtx) string
	GetType() int
}

type ProcedureArgDecl added in v0.8.0

type ProcedureArgDecl struct {
	ProcedureArgImpl
	Name      *UnresolvedName
	Type      ResolvableTypeReference
	InOutType InOutArgType
}

func NewProcedureArgDecl added in v0.8.0

func (*ProcedureArgDecl) Format added in v0.8.0

func (node *ProcedureArgDecl) Format(ctx *FmtCtx)

func (*ProcedureArgDecl) Free added in v1.2.0

func (node *ProcedureArgDecl) Free()

func (*ProcedureArgDecl) GetName added in v0.8.0

func (node *ProcedureArgDecl) GetName(ctx *FmtCtx) string

func (*ProcedureArgDecl) GetType added in v0.8.0

func (node *ProcedureArgDecl) GetType() int

func (ProcedureArgDecl) TypeName added in v1.2.0

func (node ProcedureArgDecl) TypeName() string

type ProcedureArgForMarshal added in v0.8.0

type ProcedureArgForMarshal struct {
	Name      *UnresolvedName
	Type      ResolvableTypeReference
	InOutType InOutArgType
}

type ProcedureArgImpl added in v0.8.0

type ProcedureArgImpl struct {
	ProcedureArg
}

type ProcedureArgType added in v0.8.0

type ProcedureArgType struct {
	Type InOutArgType
}

type ProcedureArgs added in v0.8.0

type ProcedureArgs []ProcedureArg

container holding list of arguments in udf

type ProcedureName added in v0.8.0

type ProcedureName struct {
	Name objName
}

func NewProcedureName added in v0.8.0

func NewProcedureName(name Identifier, prefix ObjectNamePrefix) *ProcedureName

func (*ProcedureName) Format added in v0.8.0

func (node *ProcedureName) Format(ctx *FmtCtx)

func (*ProcedureName) Free added in v1.2.0

func (node *ProcedureName) Free()

func (*ProcedureName) HasNoNameQualifier added in v0.8.0

func (node *ProcedureName) HasNoNameQualifier() bool

func (ProcedureName) TypeName added in v1.2.0

func (node ProcedureName) TypeName() string

type Property

type Property struct {
	Key   string
	Value string
}

func NewProperty added in v1.2.0

func NewProperty(k, v string) *Property

func (*Property) Format

func (node *Property) Format(ctx *FmtCtx)

func (*Property) Free added in v1.2.0

func (node *Property) Free()

func (Property) TypeName added in v1.2.0

func (node Property) TypeName() string

type RangeCond

type RangeCond struct {
	Not      bool
	Left     Expr
	From, To Expr
	// contains filtered or unexported fields
}

the BETWEEN or a NOT BETWEEN expression

func NewRangeCond

func NewRangeCond(n bool, l, f, t Expr) *RangeCond

func (*RangeCond) Accept added in v0.8.0

func (node *RangeCond) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*RangeCond) Format

func (node *RangeCond) Format(ctx *FmtCtx)

func (*RangeCond) String

func (node *RangeCond) String() string

type RangeType

type RangeType struct {
	Expr       Expr
	ColumnList []*UnresolvedName
	// contains filtered or unexported fields
}

func NewRangeType

func NewRangeType() *RangeType

func (*RangeType) Format

func (node *RangeType) Format(ctx *FmtCtx)

func (*RangeType) Free added in v1.2.0

func (node *RangeType) Free()

func (RangeType) TypeName added in v1.2.0

func (node RangeType) TypeName() string

type ReadWriteMode

type ReadWriteMode int

the read and write mode for a transaction.

const (
	READ_WRITE_MODE_NONE ReadWriteMode = iota
	READ_WRITE_MODE_READ_ONLY
	READ_WRITE_MODE_READ_WRITE
)

type ReferenceOnRecord

type ReferenceOnRecord struct {
	OnDelete ReferenceOptionType
	OnUpdate ReferenceOptionType
}

type ReferenceOptionType

type ReferenceOptionType int
const (
	REFERENCE_OPTION_INVALID ReferenceOptionType = iota
	REFERENCE_OPTION_RESTRICT
	REFERENCE_OPTION_CASCADE
	REFERENCE_OPTION_SET_NULL
	REFERENCE_OPTION_NO_ACTION
	REFERENCE_OPTION_SET_DEFAULT
)

Reference option

func (*ReferenceOptionType) ToString

func (node *ReferenceOptionType) ToString() string

type RepeatStmt added in v0.8.0

type RepeatStmt struct {
	Name Identifier
	Body []Statement
	Cond Expr
	// contains filtered or unexported fields
}

func (*RepeatStmt) Format added in v0.8.0

func (node *RepeatStmt) Format(ctx *FmtCtx)

func (*RepeatStmt) Free added in v1.2.0

func (s *RepeatStmt) Free()

func (*RepeatStmt) GetQueryType added in v0.8.0

func (node *RepeatStmt) GetQueryType() string

func (*RepeatStmt) GetStatementType added in v0.8.0

func (node *RepeatStmt) GetStatementType() string

type Replace added in v0.6.0

type Replace struct {
	Table          TableExpr
	PartitionNames IdentifierList
	Columns        IdentifierList
	Rows           *Select
	// contains filtered or unexported fields
}

the REPLACE statement.

func NewReplace added in v0.6.0

func NewReplace(t TableExpr, c IdentifierList, r *Select, p IdentifierList) *Replace

func (*Replace) Format added in v0.6.0

func (node *Replace) Format(ctx *FmtCtx)

func (*Replace) Free added in v1.2.0

func (node *Replace) Free()

func (*Replace) GetQueryType added in v0.7.0

func (node *Replace) GetQueryType() string

func (*Replace) GetStatementType added in v0.7.0

func (node *Replace) GetStatementType() string

func (*Replace) StmtKind added in v1.2.0

func (node *Replace) StmtKind() StmtKind

func (Replace) TypeName added in v1.2.0

func (node Replace) TypeName() string

type Reset added in v0.7.0

type Reset struct {
	Statement
	Name Identifier
}

func NewReset added in v0.7.0

func NewReset(name Identifier) *Reset

func (*Reset) Format added in v0.7.0

func (node *Reset) Format(ctx *FmtCtx)

func (*Reset) Free added in v1.2.0

func (node *Reset) Free()

func (*Reset) GetQueryType added in v0.7.0

func (node *Reset) GetQueryType() string

func (*Reset) GetStatementType added in v0.7.0

func (node *Reset) GetStatementType() string

func (*Reset) StmtKind added in v1.2.0

func (node *Reset) StmtKind() StmtKind

type ResolvableFunctionReference

type ResolvableFunctionReference struct {
	FunctionReference
}

function reference

func FuncName2ResolvableFunctionReference

func FuncName2ResolvableFunctionReference(funcName *UnresolvedName) ResolvableFunctionReference

func (*ResolvableFunctionReference) Format

func (node *ResolvableFunctionReference) Format(ctx *FmtCtx)

type ResolvableTypeReference

type ResolvableTypeReference interface {
}

type reference

type ResourceOption

type ResourceOption interface {
	NodeFormatter
}

type ResourceOptionMaxConnectionPerHour

type ResourceOptionMaxConnectionPerHour struct {
	Count int64
	// contains filtered or unexported fields
}

func (*ResourceOptionMaxConnectionPerHour) Format

func (node *ResourceOptionMaxConnectionPerHour) Format(ctx *FmtCtx)

func (*ResourceOptionMaxConnectionPerHour) Free added in v1.2.0

func (ResourceOptionMaxConnectionPerHour) TypeName added in v1.2.0

type ResourceOptionMaxQueriesPerHour

type ResourceOptionMaxQueriesPerHour struct {
	Count int64
	// contains filtered or unexported fields
}

func (*ResourceOptionMaxQueriesPerHour) Format

func (node *ResourceOptionMaxQueriesPerHour) Format(ctx *FmtCtx)

func (*ResourceOptionMaxQueriesPerHour) Free added in v1.2.0

func (node *ResourceOptionMaxQueriesPerHour) Free()

func (ResourceOptionMaxQueriesPerHour) TypeName added in v1.2.0

func (node ResourceOptionMaxQueriesPerHour) TypeName() string

type ResourceOptionMaxUpdatesPerHour

type ResourceOptionMaxUpdatesPerHour struct {
	Count int64
	// contains filtered or unexported fields
}

func (*ResourceOptionMaxUpdatesPerHour) Format

func (node *ResourceOptionMaxUpdatesPerHour) Format(ctx *FmtCtx)

func (*ResourceOptionMaxUpdatesPerHour) Free added in v1.2.0

func (node *ResourceOptionMaxUpdatesPerHour) Free()

func (ResourceOptionMaxUpdatesPerHour) TypeName added in v1.2.0

func (node ResourceOptionMaxUpdatesPerHour) TypeName() string

type ResourceOptionMaxUserConnections

type ResourceOptionMaxUserConnections struct {
	Count int64
	// contains filtered or unexported fields
}

func (*ResourceOptionMaxUserConnections) Format

func (node *ResourceOptionMaxUserConnections) Format(ctx *FmtCtx)

func (*ResourceOptionMaxUserConnections) Free added in v1.2.0

func (node *ResourceOptionMaxUserConnections) Free()

func (ResourceOptionMaxUserConnections) TypeName added in v1.2.0

func (node ResourceOptionMaxUserConnections) TypeName() string

type RespType added in v1.2.0

type RespType int

type RestoreLevel added in v1.2.0

type RestoreLevel int
const (
	RESTORELEVELCLUSTER RestoreLevel = iota
	RESTORELEVELACCOUNT
	RESTORELEVELDATABASE
	RESTORELEVELTABLE
)

func (RestoreLevel) String added in v1.2.0

func (s RestoreLevel) String() string

type RestoreSnapShot added in v1.2.0

type RestoreSnapShot struct {
	Level         RestoreLevel
	AccountName   Identifier // account name
	DatabaseName  Identifier // database name
	TableName     Identifier // table name
	SnapShotName  Identifier // snapshot name
	ToAccountName Identifier // to account name
	// contains filtered or unexported fields
}

func (*RestoreSnapShot) Format added in v1.2.0

func (node *RestoreSnapShot) Format(ctx *FmtCtx)

func (*RestoreSnapShot) Free added in v1.2.0

func (s *RestoreSnapShot) Free()

func (*RestoreSnapShot) GetQueryType added in v1.2.0

func (node *RestoreSnapShot) GetQueryType() string

func (*RestoreSnapShot) GetStatementType added in v1.2.0

func (node *RestoreSnapShot) GetStatementType() string

func (*RestoreSnapShot) StmtKind added in v1.2.0

func (node *RestoreSnapShot) StmtKind() StmtKind

type ResumeDaemonTask added in v1.1.0

type ResumeDaemonTask struct {
	TaskID uint64
	// contains filtered or unexported fields
}

func (*ResumeDaemonTask) Format added in v1.1.0

func (node *ResumeDaemonTask) Format(ctx *FmtCtx)

func (*ResumeDaemonTask) Free added in v1.2.0

func (s *ResumeDaemonTask) Free()

func (*ResumeDaemonTask) GetQueryType added in v1.1.0

func (node *ResumeDaemonTask) GetQueryType() string

func (*ResumeDaemonTask) GetStatementType added in v1.1.0

func (node *ResumeDaemonTask) GetStatementType() string

func (*ResumeDaemonTask) StmtKind added in v1.2.0

func (node *ResumeDaemonTask) StmtKind() StmtKind

type ReturnType added in v0.7.0

type ReturnType struct {
	Type ResolvableTypeReference
}

func NewReturnType added in v0.7.0

func NewReturnType(t ResolvableTypeReference) *ReturnType

func (*ReturnType) Format added in v0.7.0

func (node *ReturnType) Format(ctx *FmtCtx)

func (*ReturnType) Free added in v1.2.0

func (node *ReturnType) Free()

func (ReturnType) TypeName added in v1.2.0

func (node ReturnType) TypeName() string

type Revoke

type Revoke struct {
	Typ             RevokeType
	RevokePrivilege RevokePrivilege
	RevokeRole      RevokeRole
	// contains filtered or unexported fields
}

func NewRevoke

func NewRevoke() *Revoke

func (*Revoke) Format

func (node *Revoke) Format(ctx *FmtCtx)

func (*Revoke) Free added in v1.2.0

func (s *Revoke) Free()

func (*Revoke) GetQueryType added in v0.7.0

func (node *Revoke) GetQueryType() string

func (*Revoke) GetStatementType added in v0.7.0

func (node *Revoke) GetStatementType() string

func (*Revoke) StmtKind added in v1.2.0

func (node *Revoke) StmtKind() StmtKind

type RevokePrivilege added in v0.6.0

type RevokePrivilege struct {
	IfExists   bool
	Privileges []*Privilege
	ObjType    ObjectType
	Level      *PrivilegeLevel
	Roles      []*Role
	// contains filtered or unexported fields
}

func (*RevokePrivilege) Format added in v0.6.0

func (node *RevokePrivilege) Format(ctx *FmtCtx)

func (*RevokePrivilege) Free added in v1.2.0

func (s *RevokePrivilege) Free()

func (*RevokePrivilege) GetQueryType added in v0.7.0

func (node *RevokePrivilege) GetQueryType() string

func (*RevokePrivilege) GetStatementType added in v0.7.0

func (node *RevokePrivilege) GetStatementType() string

type RevokeRole added in v0.6.0

type RevokeRole struct {
	IfExists bool
	Roles    []*Role
	Users    []*User
	// contains filtered or unexported fields
}

func (*RevokeRole) Format added in v0.6.0

func (node *RevokeRole) Format(ctx *FmtCtx)

func (*RevokeRole) Free added in v1.2.0

func (s *RevokeRole) Free()

func (*RevokeRole) GetQueryType added in v0.7.0

func (node *RevokeRole) GetQueryType() string

func (*RevokeRole) GetStatementType added in v0.7.0

func (node *RevokeRole) GetStatementType() string

type RevokeType added in v0.6.0

type RevokeType int
const (
	RevokeTypePrivilege RevokeType = iota
	RevokeTypeRole
)

type Role

type Role struct {
	NodeFormatter
	UserName string
}

func NewRole

func NewRole(u string) *Role

func (*Role) Format

func (node *Role) Format(ctx *FmtCtx)

func (*Role) Free added in v1.2.0

func (node *Role) Free()

func (Role) TypeName added in v1.2.0

func (node Role) TypeName() string

type RollbackTransaction

type RollbackTransaction struct {
	Type CompletionType
	// contains filtered or unexported fields
}

Rollback statement

func NewRollbackTransaction

func NewRollbackTransaction(t CompletionType) *RollbackTransaction

func (*RollbackTransaction) Format

func (node *RollbackTransaction) Format(ctx *FmtCtx)

func (*RollbackTransaction) Free added in v1.2.0

func (s *RollbackTransaction) Free()

func (*RollbackTransaction) GetQueryType added in v0.7.0

func (node *RollbackTransaction) GetQueryType() string

func (*RollbackTransaction) GetStatementType added in v0.7.0

func (node *RollbackTransaction) GetStatementType() string

func (*RollbackTransaction) StmtKind added in v1.2.0

func (node *RollbackTransaction) StmtKind() StmtKind

type RowFormatType

type RowFormatType uint64
const (
	ROW_FORMAT_DEFAULT RowFormatType = iota
	ROW_FORMAT_DYNAMIC
	ROW_FORMAT_FIXED
	ROW_FORMAT_COMPRESSED
	ROW_FORMAT_REDUNDANT
	ROW_FORMAT_COMPACT
)

func (*RowFormatType) ToString

func (node *RowFormatType) ToString() string

type S3Parameter added in v0.6.0

type S3Parameter struct {
	Endpoint   string `json:"s3-test-endpoint"`
	Region     string `json:"s3-test-region"`
	APIKey     string `json:"s3-test-key"`
	APISecret  string `json:"s3-test-secret"`
	Bucket     string `json:"s3-test-bucket"`
	Provider   string `json:"s3-test-rovider"`
	RoleArn    string `json:"s3-test-rolearn"`
	ExternalId string `json:"s3-test-externalid"`
}

type SampleExpr added in v1.1.0

type SampleExpr struct {
	// contains filtered or unexported fields
}

SampleExpr for sample(exprList, N rows / R percent)

func NewSamplePercentFuncExpression1 added in v1.1.0

func NewSamplePercentFuncExpression1(percent int64, isStar bool, columns Exprs) (*SampleExpr, error)

func NewSamplePercentFuncExpression2 added in v1.1.0

func NewSamplePercentFuncExpression2(percent float64, isStar bool, columns Exprs) (*SampleExpr, error)

func NewSampleRowsFuncExpression added in v1.1.0

func NewSampleRowsFuncExpression(number int, isStar bool, columns Exprs, sampleUnit string) (*SampleExpr, error)

func (SampleExpr) Accept added in v1.1.0

func (s SampleExpr) Accept(v Visitor) (node Expr, ok bool)

func (SampleExpr) Format added in v1.1.0

func (s SampleExpr) Format(ctx *FmtCtx)

func (SampleExpr) GetColumns added in v1.1.0

func (s SampleExpr) GetColumns() (columns Exprs, isStar bool)

func (SampleExpr) GetSampleDetail added in v1.1.0

func (s SampleExpr) GetSampleDetail() (isSampleRows bool, usingRow bool, n int32, k float64)

func (SampleExpr) String added in v1.1.0

func (s SampleExpr) String() string

func (SampleExpr) Valid added in v1.1.0

func (s SampleExpr) Valid() error

type SecondaryRoleType added in v0.6.0

type SecondaryRoleType int
const (
	SecondaryRoleTypeAll SecondaryRoleType = iota
	SecondaryRoleTypeNone
)

type Select

type Select struct {
	Select         SelectStatement
	TimeWindow     *TimeWindow
	OrderBy        OrderBy
	Limit          *Limit
	With           *With
	Ep             *ExportParam
	SelectLockInfo *SelectLockInfo
	// contains filtered or unexported fields
}

Select represents a SelectStatement with an ORDER and/or LIMIT.

func NewSelect

func NewSelect(s SelectStatement, o OrderBy, l *Limit) *Select

func (*Select) Format

func (node *Select) Format(ctx *FmtCtx)

func (*Select) Free added in v1.2.0

func (s *Select) Free()

func (*Select) GetQueryType added in v0.7.0

func (node *Select) GetQueryType() string

func (*Select) GetStatementType added in v0.7.0

func (node *Select) GetStatementType() string

func (*Select) StmtKind added in v1.2.0

func (node *Select) StmtKind() StmtKind

type SelectClause

type SelectClause struct {
	SelectStatement
	Distinct bool
	Exprs    SelectExprs
	From     *From
	Where    *Where
	GroupBy  GroupBy
	Having   *Where
	Option   string
}

SelectClause represents a SELECT statement.

func (*SelectClause) Format

func (node *SelectClause) Format(ctx *FmtCtx)

func (*SelectClause) GetQueryType added in v0.7.0

func (node *SelectClause) GetQueryType() string

func (*SelectClause) GetStatementType added in v0.7.0

func (node *SelectClause) GetStatementType() string

type SelectExpr

type SelectExpr struct {
	Expr Expr
	As   *CStr
	// contains filtered or unexported fields
}

a SELECT expression.

func (*SelectExpr) Format

func (node *SelectExpr) Format(ctx *FmtCtx)

func (*SelectExpr) String

func (node *SelectExpr) String() string

type SelectExprs

type SelectExprs []SelectExpr

SELECT expressions.

func (*SelectExprs) Format

func (node *SelectExprs) Format(ctx *FmtCtx)

type SelectLockInfo added in v0.8.0

type SelectLockInfo struct {
	LockType SelectLockType
	WaitSec  uint64
	Tables   []*TableName
}

func (*SelectLockInfo) Format added in v0.8.0

func (node *SelectLockInfo) Format(ctx *FmtCtx)

type SelectLockType added in v0.8.0

type SelectLockType int

SelectLockType is the lock type for SelectStmt.

const (
	SelectLockNone SelectLockType = iota
	SelectLockForUpdate
	SelectLockForShare
	SelectLockForUpdateNoWait
	SelectLockForUpdateWaitN
	SelectLockForShareNoWait
	SelectLockForUpdateSkipLocked
	SelectLockForShareSkipLocked
)

Select lock types.

func (SelectLockType) String added in v0.8.0

func (n SelectLockType) String() string

String implements fmt.Stringer.

type SelectStatement

type SelectStatement interface {
	Statement
}

type SerialExtractExpr added in v1.2.0

type SerialExtractExpr struct {
	SerialExpr Expr
	IndexExpr  Expr
	ResultType ResolvableTypeReference
	// contains filtered or unexported fields
}

func NewSerialExtractExpr added in v1.2.0

func NewSerialExtractExpr(serialExpr Expr, indexExpr Expr, typ ResolvableTypeReference) *SerialExtractExpr

func (*SerialExtractExpr) Accept added in v1.2.0

func (node *SerialExtractExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*SerialExtractExpr) Format added in v1.2.0

func (node *SerialExtractExpr) Format(ctx *FmtCtx)

func (*SerialExtractExpr) String added in v1.2.0

func (node *SerialExtractExpr) String() string

type SetDefaultRole

type SetDefaultRole struct {
	Type  SetDefaultRoleType
	Roles []*Role
	Users []*User
	// contains filtered or unexported fields
}

func NewSetDefaultRole

func NewSetDefaultRole(t SetDefaultRoleType, r []*Role, u []*User) *SetDefaultRole

func (*SetDefaultRole) Format

func (node *SetDefaultRole) Format(ctx *FmtCtx)

func (*SetDefaultRole) Free added in v1.2.0

func (s *SetDefaultRole) Free()

func (*SetDefaultRole) GetQueryType added in v0.7.0

func (node *SetDefaultRole) GetQueryType() string

func (*SetDefaultRole) GetStatementType added in v0.7.0

func (node *SetDefaultRole) GetStatementType() string

func (*SetDefaultRole) StmtKind added in v1.2.0

func (node *SetDefaultRole) StmtKind() StmtKind

type SetDefaultRoleType

type SetDefaultRoleType int
const (
	SET_DEFAULT_ROLE_TYPE_NONE SetDefaultRoleType = iota
	SET_DEFAULT_ROLE_TYPE_ALL
	SET_DEFAULT_ROLE_TYPE_NORMAL
)

type SetPassword

type SetPassword struct {
	User     *User
	Password string
	// contains filtered or unexported fields
}

func NewSetPassword

func NewSetPassword(u *User, p string) *SetPassword

func (*SetPassword) Format

func (node *SetPassword) Format(ctx *FmtCtx)

func (*SetPassword) Free added in v1.2.0

func (s *SetPassword) Free()

func (*SetPassword) GetQueryType added in v0.7.0

func (node *SetPassword) GetQueryType() string

func (*SetPassword) GetStatementType added in v0.7.0

func (node *SetPassword) GetStatementType() string

func (*SetPassword) StmtKind added in v1.2.0

func (node *SetPassword) StmtKind() StmtKind

type SetRole

type SetRole struct {
	SecondaryRole     bool
	SecondaryRoleType SecondaryRoleType
	Role              *Role
	// contains filtered or unexported fields
}

func (*SetRole) Format

func (node *SetRole) Format(ctx *FmtCtx)

func (*SetRole) Free added in v1.2.0

func (s *SetRole) Free()

func (*SetRole) GetQueryType added in v0.7.0

func (node *SetRole) GetQueryType() string

func (*SetRole) GetStatementType added in v0.7.0

func (node *SetRole) GetStatementType() string

func (*SetRole) StmtKind added in v1.2.0

func (node *SetRole) StmtKind() StmtKind

type SetRoleType

type SetRoleType int
const (
	SET_ROLE_TYPE_NORMAL SetRoleType = iota
	SET_ROLE_TYPE_DEFAULT
	SET_ROLE_TYPE_NONE
	SET_ROLE_TYPE_ALL
	SET_ROLE_TYPE_ALL_EXCEPT
)

type SetTransaction added in v0.8.0

type SetTransaction struct {
	Global        bool
	CharacterList []*TransactionCharacteristic
	// contains filtered or unexported fields
}

func (*SetTransaction) Format added in v0.8.0

func (node *SetTransaction) Format(ctx *FmtCtx)

func (*SetTransaction) Free added in v1.2.0

func (s *SetTransaction) Free()

func (*SetTransaction) GetQueryType added in v0.8.0

func (node *SetTransaction) GetQueryType() string

func (*SetTransaction) GetStatementType added in v0.8.0

func (node *SetTransaction) GetStatementType() string

func (*SetTransaction) StmtKind added in v1.2.0

func (node *SetTransaction) StmtKind() StmtKind

type SetVar

type SetVar struct {
	Assignments []*VarAssignmentExpr
	// contains filtered or unexported fields
}

func NewSetVar

func NewSetVar(a []*VarAssignmentExpr) *SetVar

func (*SetVar) Accept added in v0.8.0

func (node *SetVar) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface.

func (*SetVar) Format

func (node *SetVar) Format(ctx *FmtCtx)

func (*SetVar) Free added in v1.2.0

func (s *SetVar) Free()

func (*SetVar) GetQueryType added in v0.7.0

func (node *SetVar) GetQueryType() string

func (*SetVar) GetStatementType added in v0.7.0

func (node *SetVar) GetStatementType() string

func (*SetVar) StmtKind added in v1.2.0

func (node *SetVar) StmtKind() StmtKind

type Show

type Show interface {
	Explain
}

type ShowAccountUpgrade added in v1.2.0

type ShowAccountUpgrade struct {
	// contains filtered or unexported fields
}

func (*ShowAccountUpgrade) Format added in v1.2.0

func (node *ShowAccountUpgrade) Format(ctx *FmtCtx)

func (*ShowAccountUpgrade) Free added in v1.2.0

func (s *ShowAccountUpgrade) Free()

func (*ShowAccountUpgrade) GetQueryType added in v1.2.0

func (node *ShowAccountUpgrade) GetQueryType() string

func (*ShowAccountUpgrade) GetStatementType added in v1.2.0

func (node *ShowAccountUpgrade) GetStatementType() string

type ShowAccounts added in v0.7.0

type ShowAccounts struct {
	Like *ComparisonExpr
	// contains filtered or unexported fields
}

func (*ShowAccounts) Format added in v0.7.0

func (node *ShowAccounts) Format(ctx *FmtCtx)

func (*ShowAccounts) Free added in v1.2.0

func (s *ShowAccounts) Free()

func (*ShowAccounts) GetQueryType added in v0.7.0

func (node *ShowAccounts) GetQueryType() string

func (*ShowAccounts) GetStatementType added in v0.7.0

func (node *ShowAccounts) GetStatementType() string

func (*ShowAccounts) StmtKind added in v1.2.0

func (node *ShowAccounts) StmtKind() StmtKind

type ShowBackendServers added in v0.8.0

type ShowBackendServers struct {
	// contains filtered or unexported fields
}

ShowBackendServers indicates SHOW BACKEND SERVERS statement.

func (*ShowBackendServers) Format added in v0.8.0

func (node *ShowBackendServers) Format(ctx *FmtCtx)

func (*ShowBackendServers) Free added in v1.2.0

func (s *ShowBackendServers) Free()

func (*ShowBackendServers) GetQueryType added in v0.8.0

func (node *ShowBackendServers) GetQueryType() string

func (*ShowBackendServers) GetStatementType added in v0.8.0

func (node *ShowBackendServers) GetStatementType() string

func (*ShowBackendServers) StmtKind added in v1.2.0

func (node *ShowBackendServers) StmtKind() StmtKind

type ShowCollation added in v0.6.0

type ShowCollation struct {
	Like  *ComparisonExpr
	Where *Where
	// contains filtered or unexported fields
}

SHOW collation statement

func (*ShowCollation) Format added in v0.6.0

func (node *ShowCollation) Format(ctx *FmtCtx)

func (*ShowCollation) Free added in v1.2.0

func (s *ShowCollation) Free()

func (*ShowCollation) GetQueryType added in v0.7.0

func (node *ShowCollation) GetQueryType() string

func (*ShowCollation) GetStatementType added in v0.7.0

func (node *ShowCollation) GetStatementType() string

func (*ShowCollation) StmtKind added in v1.2.0

func (node *ShowCollation) StmtKind() StmtKind

type ShowColumnNumber added in v0.7.0

type ShowColumnNumber struct {
	Table  *UnresolvedObjectName
	DbName string
	// contains filtered or unexported fields
}

show column number

func NewShowColumnNumber added in v0.7.0

func NewShowColumnNumber(table *UnresolvedObjectName, dbname string) *ShowColumnNumber

func (*ShowColumnNumber) Format added in v0.7.0

func (node *ShowColumnNumber) Format(ctx *FmtCtx)

func (*ShowColumnNumber) Free added in v1.2.0

func (s *ShowColumnNumber) Free()

func (*ShowColumnNumber) GetQueryType added in v0.7.0

func (node *ShowColumnNumber) GetQueryType() string

func (*ShowColumnNumber) GetStatementType added in v0.7.0

func (node *ShowColumnNumber) GetStatementType() string

func (*ShowColumnNumber) StmtKind added in v1.2.0

func (node *ShowColumnNumber) StmtKind() StmtKind

type ShowColumns

type ShowColumns struct {
	Ext     bool
	Full    bool
	Table   *UnresolvedObjectName
	ColName *UnresolvedName
	DBName  string
	Like    *ComparisonExpr
	Where   *Where
	// contains filtered or unexported fields
}

SHOW COLUMNS statement.

func NewShowColumns

func NewShowColumns(e bool, f bool, t *UnresolvedObjectName, d string, l *ComparisonExpr, w *Where, cn *UnresolvedName) *ShowColumns

func (*ShowColumns) Format

func (node *ShowColumns) Format(ctx *FmtCtx)

func (*ShowColumns) Free added in v1.2.0

func (s *ShowColumns) Free()

func (*ShowColumns) GetQueryType added in v0.7.0

func (node *ShowColumns) GetQueryType() string

func (*ShowColumns) GetStatementType added in v0.7.0

func (node *ShowColumns) GetStatementType() string

func (*ShowColumns) StmtKind added in v1.2.0

func (node *ShowColumns) StmtKind() StmtKind

type ShowConnectors added in v1.1.0

type ShowConnectors struct {
	// contains filtered or unexported fields
}

func NewShowConnectors added in v1.1.0

func NewShowConnectors(f bool) *ShowConnectors

func (*ShowConnectors) Format added in v1.1.0

func (node *ShowConnectors) Format(ctx *FmtCtx)

func (*ShowConnectors) Free added in v1.2.0

func (s *ShowConnectors) Free()

func (*ShowConnectors) GetQueryType added in v1.1.0

func (node *ShowConnectors) GetQueryType() string

func (*ShowConnectors) GetStatementType added in v1.1.0

func (node *ShowConnectors) GetStatementType() string

func (*ShowConnectors) StmtKind added in v1.2.0

func (node *ShowConnectors) StmtKind() StmtKind

type ShowCreateDatabase

type ShowCreateDatabase struct {
	IfNotExists bool
	Name        string
	// contains filtered or unexported fields
}

SHOW CREATE DATABASE statement

func NewShowCreateDatabase

func NewShowCreateDatabase(i bool, n string) *ShowCreateDatabase

func (*ShowCreateDatabase) Format

func (node *ShowCreateDatabase) Format(ctx *FmtCtx)

func (*ShowCreateDatabase) Free added in v1.2.0

func (s *ShowCreateDatabase) Free()

func (*ShowCreateDatabase) GetQueryType added in v0.7.0

func (node *ShowCreateDatabase) GetQueryType() string

func (*ShowCreateDatabase) GetStatementType added in v0.7.0

func (node *ShowCreateDatabase) GetStatementType() string

func (*ShowCreateDatabase) StmtKind added in v1.2.0

func (node *ShowCreateDatabase) StmtKind() StmtKind

type ShowCreatePublications added in v0.8.0

type ShowCreatePublications struct {
	Name string
	// contains filtered or unexported fields
}

func (*ShowCreatePublications) Format added in v0.8.0

func (node *ShowCreatePublications) Format(ctx *FmtCtx)

func (*ShowCreatePublications) Free added in v1.2.0

func (s *ShowCreatePublications) Free()

func (*ShowCreatePublications) GetQueryType added in v0.8.0

func (node *ShowCreatePublications) GetQueryType() string

func (*ShowCreatePublications) GetStatementType added in v0.8.0

func (node *ShowCreatePublications) GetStatementType() string

func (*ShowCreatePublications) StmtKind added in v1.2.0

func (node *ShowCreatePublications) StmtKind() StmtKind

type ShowCreateTable

type ShowCreateTable struct {
	Name         *UnresolvedObjectName
	SnapshotName string
	// contains filtered or unexported fields
}

SHOW CREATE TABLE statement

func NewShowCreate

func NewShowCreate(n *UnresolvedObjectName) *ShowCreateTable

func (*ShowCreateTable) Format

func (node *ShowCreateTable) Format(ctx *FmtCtx)

func (*ShowCreateTable) Free added in v1.2.0

func (s *ShowCreateTable) Free()

func (*ShowCreateTable) GetQueryType added in v0.7.0

func (node *ShowCreateTable) GetQueryType() string

func (*ShowCreateTable) GetStatementType added in v0.7.0

func (node *ShowCreateTable) GetStatementType() string

func (*ShowCreateTable) StmtKind added in v1.2.0

func (node *ShowCreateTable) StmtKind() StmtKind

type ShowCreateView added in v0.6.0

type ShowCreateView struct {
	Name         *UnresolvedObjectName
	SnapshotName string
	// contains filtered or unexported fields
}

SHOW CREATE VIEW statement

func NewShowCreateView added in v0.6.0

func NewShowCreateView(n *UnresolvedObjectName) *ShowCreateView

func (*ShowCreateView) Format added in v0.6.0

func (node *ShowCreateView) Format(ctx *FmtCtx)

func (*ShowCreateView) Free added in v1.2.0

func (s *ShowCreateView) Free()

func (*ShowCreateView) GetQueryType added in v0.7.0

func (node *ShowCreateView) GetQueryType() string

func (*ShowCreateView) GetStatementType added in v0.7.0

func (node *ShowCreateView) GetStatementType() string

func (*ShowCreateView) StmtKind added in v1.2.0

func (node *ShowCreateView) StmtKind() StmtKind

type ShowDatabases

type ShowDatabases struct {
	Like         *ComparisonExpr
	Where        *Where
	SnapshotName string
	// contains filtered or unexported fields
}

the SHOW DATABASES statement.

func NewShowDatabases

func NewShowDatabases(l *ComparisonExpr, w *Where) *ShowDatabases

func (*ShowDatabases) Format

func (node *ShowDatabases) Format(ctx *FmtCtx)

func (*ShowDatabases) Free added in v1.2.0

func (s *ShowDatabases) Free()

func (*ShowDatabases) GetQueryType added in v0.7.0

func (node *ShowDatabases) GetQueryType() string

func (*ShowDatabases) GetStatementType added in v0.7.0

func (node *ShowDatabases) GetStatementType() string

func (*ShowDatabases) StmtKind added in v1.2.0

func (node *ShowDatabases) StmtKind() StmtKind

type ShowErrors

type ShowErrors struct {
	// contains filtered or unexported fields
}

func NewShowErrors

func NewShowErrors() *ShowErrors

func (*ShowErrors) Format

func (node *ShowErrors) Format(ctx *FmtCtx)

func (*ShowErrors) Free added in v1.2.0

func (s *ShowErrors) Free()

func (*ShowErrors) GetQueryType added in v0.7.0

func (node *ShowErrors) GetQueryType() string

func (*ShowErrors) GetStatementType added in v0.7.0

func (node *ShowErrors) GetStatementType() string

func (*ShowErrors) StmtKind added in v1.2.0

func (node *ShowErrors) StmtKind() StmtKind

type ShowFunctionOrProcedureStatus added in v0.8.0

type ShowFunctionOrProcedureStatus struct {
	Like       *ComparisonExpr
	Where      *Where
	IsFunction bool
	// contains filtered or unexported fields
}

func NewShowFunctionOrProcedureStatus added in v0.8.0

func NewShowFunctionOrProcedureStatus(l *ComparisonExpr, w *Where, i bool) *ShowFunctionOrProcedureStatus

func (*ShowFunctionOrProcedureStatus) Format added in v0.8.0

func (node *ShowFunctionOrProcedureStatus) Format(ctx *FmtCtx)

func (*ShowFunctionOrProcedureStatus) Free added in v1.2.0

func (s *ShowFunctionOrProcedureStatus) Free()

func (*ShowFunctionOrProcedureStatus) GetQueryType added in v0.8.0

func (node *ShowFunctionOrProcedureStatus) GetQueryType() string

func (*ShowFunctionOrProcedureStatus) GetStatementType added in v0.8.0

func (node *ShowFunctionOrProcedureStatus) GetStatementType() string

func (*ShowFunctionOrProcedureStatus) StmtKind added in v1.2.0

func (node *ShowFunctionOrProcedureStatus) StmtKind() StmtKind

type ShowGrantType added in v0.7.0

type ShowGrantType int

type ShowGrants added in v0.6.0

type ShowGrants struct {
	Username      string
	Hostname      string
	Roles         []*Role
	ShowGrantType ShowGrantType
	// contains filtered or unexported fields
}

func (*ShowGrants) Format added in v0.6.0

func (node *ShowGrants) Format(ctx *FmtCtx)

func (*ShowGrants) Free added in v1.2.0

func (s *ShowGrants) Free()

func (*ShowGrants) GetQueryType added in v0.7.0

func (node *ShowGrants) GetQueryType() string

func (*ShowGrants) GetStatementType added in v0.7.0

func (node *ShowGrants) GetStatementType() string

func (*ShowGrants) StmtKind added in v1.2.0

func (node *ShowGrants) StmtKind() StmtKind

type ShowIndex

type ShowIndex struct {
	TableName *UnresolvedObjectName
	DbName    string
	Where     *Where
	// contains filtered or unexported fields
}

show index statement

func NewShowIndex

func NewShowIndex(t *UnresolvedObjectName, w *Where) *ShowIndex

func (*ShowIndex) Format

func (node *ShowIndex) Format(ctx *FmtCtx)

func (*ShowIndex) Free added in v1.2.0

func (s *ShowIndex) Free()

func (*ShowIndex) GetQueryType added in v0.7.0

func (node *ShowIndex) GetQueryType() string

func (*ShowIndex) GetStatementType added in v0.7.0

func (node *ShowIndex) GetStatementType() string

func (*ShowIndex) StmtKind added in v1.2.0

func (node *ShowIndex) StmtKind() StmtKind

type ShowLocks added in v0.7.0

type ShowLocks struct {
	// contains filtered or unexported fields
}

show locks

func NewShowLocks added in v0.7.0

func NewShowLocks() *ShowLocks

func (*ShowLocks) Format added in v0.7.0

func (node *ShowLocks) Format(ctx *FmtCtx)

func (*ShowLocks) Free added in v1.2.0

func (s *ShowLocks) Free()

func (*ShowLocks) GetQueryType added in v0.7.0

func (node *ShowLocks) GetQueryType() string

func (*ShowLocks) GetStatementType added in v0.7.0

func (node *ShowLocks) GetStatementType() string

func (*ShowLocks) StmtKind added in v1.2.0

func (node *ShowLocks) StmtKind() StmtKind

type ShowNodeList added in v0.7.0

type ShowNodeList struct {
	// contains filtered or unexported fields
}

show node list

func NewShowNodeList added in v0.7.0

func NewShowNodeList() *ShowNodeList

func (*ShowNodeList) Format added in v0.7.0

func (node *ShowNodeList) Format(ctx *FmtCtx)

func (*ShowNodeList) Free added in v1.2.0

func (s *ShowNodeList) Free()

func (*ShowNodeList) GetQueryType added in v0.7.0

func (node *ShowNodeList) GetQueryType() string

func (*ShowNodeList) GetStatementType added in v0.7.0

func (node *ShowNodeList) GetStatementType() string

func (*ShowNodeList) StmtKind added in v1.2.0

func (node *ShowNodeList) StmtKind() StmtKind

type ShowProcessList

type ShowProcessList struct {
	Full bool
	// contains filtered or unexported fields
}

SHOW PROCESSLIST

func NewShowProcessList

func NewShowProcessList(f bool) *ShowProcessList

func (*ShowProcessList) Format

func (node *ShowProcessList) Format(ctx *FmtCtx)

func (*ShowProcessList) Free added in v1.2.0

func (s *ShowProcessList) Free()

func (*ShowProcessList) GetQueryType added in v0.7.0

func (node *ShowProcessList) GetQueryType() string

func (*ShowProcessList) GetStatementType added in v0.7.0

func (node *ShowProcessList) GetStatementType() string

func (*ShowProcessList) StmtKind added in v1.2.0

func (node *ShowProcessList) StmtKind() StmtKind

type ShowPublications added in v0.8.0

type ShowPublications struct {
	Like *ComparisonExpr
	// contains filtered or unexported fields
}

func (*ShowPublications) Format added in v0.8.0

func (node *ShowPublications) Format(ctx *FmtCtx)

func (*ShowPublications) Free added in v1.2.0

func (s *ShowPublications) Free()

func (*ShowPublications) GetQueryType added in v0.8.0

func (node *ShowPublications) GetQueryType() string

func (*ShowPublications) GetStatementType added in v0.8.0

func (node *ShowPublications) GetStatementType() string

func (*ShowPublications) StmtKind added in v1.2.0

func (node *ShowPublications) StmtKind() StmtKind

type ShowRolesStmt added in v0.8.0

type ShowRolesStmt struct {
	Like *ComparisonExpr
	// contains filtered or unexported fields
}

func (*ShowRolesStmt) Format added in v0.8.0

func (node *ShowRolesStmt) Format(ctx *FmtCtx)

func (*ShowRolesStmt) Free added in v1.2.0

func (s *ShowRolesStmt) Free()

func (*ShowRolesStmt) GetQueryType added in v0.8.0

func (node *ShowRolesStmt) GetQueryType() string

func (*ShowRolesStmt) GetStatementType added in v0.8.0

func (node *ShowRolesStmt) GetStatementType() string

func (*ShowRolesStmt) StmtKind added in v1.2.0

func (node *ShowRolesStmt) StmtKind() StmtKind

type ShowSequences added in v0.8.0

type ShowSequences struct {
	DBName string
	Where  *Where
	// contains filtered or unexported fields
}

SHOW SEQUENCES statement.

func (*ShowSequences) Format added in v0.8.0

func (node *ShowSequences) Format(ctx *FmtCtx)

func (*ShowSequences) Free added in v1.2.0

func (s *ShowSequences) Free()

func (*ShowSequences) GetQueryType added in v0.8.0

func (node *ShowSequences) GetQueryType() string

func (*ShowSequences) GetStatementType added in v0.8.0

func (node *ShowSequences) GetStatementType() string

func (*ShowSequences) StmtKind added in v1.2.0

func (node *ShowSequences) StmtKind() StmtKind

type ShowSnapShots added in v1.2.0

type ShowSnapShots struct {
	Where *Where
	// contains filtered or unexported fields
}

func (*ShowSnapShots) Format added in v1.2.0

func (node *ShowSnapShots) Format(ctx *FmtCtx)

func (*ShowSnapShots) Free added in v1.2.0

func (s *ShowSnapShots) Free()

func (*ShowSnapShots) GetQueryType added in v1.2.0

func (node *ShowSnapShots) GetQueryType() string

func (*ShowSnapShots) GetStatementType added in v1.2.0

func (node *ShowSnapShots) GetStatementType() string

func (*ShowSnapShots) StmtKind added in v1.2.0

func (node *ShowSnapShots) StmtKind() StmtKind

type ShowStages added in v1.0.0

type ShowStages struct {
	Like *ComparisonExpr
	// contains filtered or unexported fields
}

func (*ShowStages) Format added in v1.0.0

func (node *ShowStages) Format(ctx *FmtCtx)

func (*ShowStages) Free added in v1.2.0

func (s *ShowStages) Free()

func (*ShowStages) GetQueryType added in v1.0.0

func (node *ShowStages) GetQueryType() string

func (*ShowStages) GetStatementType added in v1.0.0

func (node *ShowStages) GetStatementType() string

func (*ShowStages) StmtKind added in v1.2.0

func (node *ShowStages) StmtKind() StmtKind

type ShowStatus

type ShowStatus struct {
	Global bool
	Like   *ComparisonExpr
	Where  *Where
	// contains filtered or unexported fields
}

SHOW STATUS statement

func NewShowStatus

func NewShowStatus(g bool, l *ComparisonExpr, w *Where) *ShowStatus

func (*ShowStatus) Format

func (node *ShowStatus) Format(ctx *FmtCtx)

func (*ShowStatus) Free added in v1.2.0

func (s *ShowStatus) Free()

func (*ShowStatus) GetQueryType added in v0.7.0

func (node *ShowStatus) GetQueryType() string

func (*ShowStatus) GetStatementType added in v0.7.0

func (node *ShowStatus) GetStatementType() string

func (*ShowStatus) StmtKind added in v1.2.0

func (node *ShowStatus) StmtKind() StmtKind

type ShowSubscriptions added in v0.8.0

type ShowSubscriptions struct {
	All  bool
	Like *ComparisonExpr
	// contains filtered or unexported fields
}

func (*ShowSubscriptions) Format added in v0.8.0

func (node *ShowSubscriptions) Format(ctx *FmtCtx)

func (*ShowSubscriptions) Free added in v1.2.0

func (s *ShowSubscriptions) Free()

func (*ShowSubscriptions) GetQueryType added in v0.8.0

func (node *ShowSubscriptions) GetQueryType() string

func (*ShowSubscriptions) GetStatementType added in v0.8.0

func (node *ShowSubscriptions) GetStatementType() string

func (*ShowSubscriptions) StmtKind added in v1.2.0

func (node *ShowSubscriptions) StmtKind() StmtKind

type ShowTableNumber added in v0.7.0

type ShowTableNumber struct {
	DbName string
	// contains filtered or unexported fields
}

show table number

func NewShowTableNumber added in v0.7.0

func NewShowTableNumber(dbname string) *ShowTableNumber

func (*ShowTableNumber) Format added in v0.7.0

func (node *ShowTableNumber) Format(ctx *FmtCtx)

func (*ShowTableNumber) Free added in v1.2.0

func (s *ShowTableNumber) Free()

func (*ShowTableNumber) GetQueryType added in v0.7.0

func (node *ShowTableNumber) GetQueryType() string

func (*ShowTableNumber) GetStatementType added in v0.7.0

func (node *ShowTableNumber) GetStatementType() string

func (*ShowTableNumber) StmtKind added in v1.2.0

func (node *ShowTableNumber) StmtKind() StmtKind

type ShowTableSize added in v0.8.0

type ShowTableSize struct {
	Table  *UnresolvedObjectName
	DbName string
	// contains filtered or unexported fields
}

func NewShowTableSize added in v0.8.0

func NewShowTableSize(table *UnresolvedObjectName, dbname string) *ShowTableSize

func (*ShowTableSize) Format added in v0.8.0

func (node *ShowTableSize) Format(ctx *FmtCtx)

func (*ShowTableSize) Free added in v1.2.0

func (s *ShowTableSize) Free()

func (*ShowTableSize) GetQueryType added in v0.8.0

func (node *ShowTableSize) GetQueryType() string

func (*ShowTableSize) GetStatementType added in v0.8.0

func (node *ShowTableSize) GetStatementType() string

func (*ShowTableSize) StmtKind added in v1.2.0

func (node *ShowTableSize) StmtKind() StmtKind

type ShowTableStatus added in v0.6.0

type ShowTableStatus struct {
	DbName string
	Like   *ComparisonExpr
	Where  *Where
	// contains filtered or unexported fields
}

func (*ShowTableStatus) Format added in v0.6.0

func (node *ShowTableStatus) Format(ctx *FmtCtx)

func (*ShowTableStatus) Free added in v1.2.0

func (s *ShowTableStatus) Free()

func (*ShowTableStatus) GetQueryType added in v0.7.0

func (node *ShowTableStatus) GetQueryType() string

func (*ShowTableStatus) GetStatementType added in v0.7.0

func (node *ShowTableStatus) GetStatementType() string

func (*ShowTableStatus) StmtKind added in v1.2.0

func (node *ShowTableStatus) StmtKind() StmtKind

type ShowTableValues added in v0.7.0

type ShowTableValues struct {
	Table  *UnresolvedObjectName
	DbName string
	// contains filtered or unexported fields
}

show table values

func NewShowTableValues added in v0.7.0

func NewShowTableValues(table *UnresolvedObjectName, dbname string) *ShowTableValues

func (*ShowTableValues) Format added in v0.7.0

func (node *ShowTableValues) Format(ctx *FmtCtx)

func (*ShowTableValues) Free added in v1.2.0

func (s *ShowTableValues) Free()

func (*ShowTableValues) GetQueryType added in v0.7.0

func (node *ShowTableValues) GetQueryType() string

func (*ShowTableValues) GetStatementType added in v0.7.0

func (node *ShowTableValues) GetStatementType() string

func (*ShowTableValues) StmtKind added in v1.2.0

func (node *ShowTableValues) StmtKind() StmtKind

type ShowTables

type ShowTables struct {
	Ext          bool
	Open         bool
	Full         bool
	DBName       string
	Like         *ComparisonExpr
	Where        *Where
	SnapshotName string
	// contains filtered or unexported fields
}

SHOW TABLES statement.

func NewShowTables

func NewShowTables(e bool, f bool, n string, l *ComparisonExpr, w *Where) *ShowTables

func (*ShowTables) Format

func (node *ShowTables) Format(ctx *FmtCtx)

func (*ShowTables) Free added in v1.2.0

func (s *ShowTables) Free()

func (*ShowTables) GetQueryType added in v0.7.0

func (node *ShowTables) GetQueryType() string

func (*ShowTables) GetStatementType added in v0.7.0

func (node *ShowTables) GetStatementType() string

func (*ShowTables) StmtKind added in v1.2.0

func (node *ShowTables) StmtKind() StmtKind

type ShowTarget added in v0.5.0

type ShowTarget struct {
	Global bool
	Type   ShowType
	DbName string
	Like   *ComparisonExpr
	Where  *Where
	// contains filtered or unexported fields
}

func (*ShowTarget) Format added in v0.5.0

func (node *ShowTarget) Format(ctx *FmtCtx)

func (*ShowTarget) Free added in v1.2.0

func (s *ShowTarget) Free()

func (*ShowTarget) GetQueryType added in v0.7.0

func (node *ShowTarget) GetQueryType() string

func (*ShowTarget) GetStatementType added in v0.7.0

func (node *ShowTarget) GetStatementType() string

func (*ShowTarget) StmtKind added in v1.2.0

func (node *ShowTarget) StmtKind() StmtKind

type ShowType added in v0.6.0

type ShowType int

func (ShowType) String added in v0.6.0

func (s ShowType) String() string

type ShowVariables

type ShowVariables struct {
	Global bool
	Like   *ComparisonExpr
	Where  *Where
	// contains filtered or unexported fields
}

SHOW VARIABLES statement System Variables

func NewShowVariables

func NewShowVariables(g bool, l *ComparisonExpr, w *Where) *ShowVariables

func (*ShowVariables) Format

func (node *ShowVariables) Format(ctx *FmtCtx)

func (*ShowVariables) Free added in v1.2.0

func (s *ShowVariables) Free()

func (*ShowVariables) GetQueryType added in v0.7.0

func (node *ShowVariables) GetQueryType() string

func (*ShowVariables) GetStatementType added in v0.7.0

func (node *ShowVariables) GetStatementType() string

func (*ShowVariables) StmtKind added in v1.2.0

func (node *ShowVariables) StmtKind() StmtKind

type ShowWarnings

type ShowWarnings struct {
	// contains filtered or unexported fields
}

func NewShowWarnings

func NewShowWarnings() *ShowWarnings

func (*ShowWarnings) Format

func (node *ShowWarnings) Format(ctx *FmtCtx)

func (*ShowWarnings) Free added in v1.2.0

func (s *ShowWarnings) Free()

func (*ShowWarnings) GetQueryType added in v0.7.0

func (node *ShowWarnings) GetQueryType() string

func (*ShowWarnings) GetStatementType added in v0.7.0

func (node *ShowWarnings) GetStatementType() string

func (*ShowWarnings) StmtKind added in v1.2.0

func (node *ShowWarnings) StmtKind() StmtKind

type Sliding added in v1.1.0

type Sliding struct {
	Val  Expr
	Unit string
}

func (*Sliding) Format added in v1.1.0

func (node *Sliding) Format(ctx *FmtCtx)

type SnapshotLevel added in v1.2.0

type SnapshotLevel int
const (
	SNAPSHOTLEVELCLUSTER SnapshotLevel = iota
	SNAPSHOTLEVELACCOUNT
	SNAPSHOTLEVELDATABASE
	SNAPSHOTLEVELTABLE
)

func (SnapshotLevel) String added in v1.2.0

func (s SnapshotLevel) String() string

type SnapshotLevelType added in v1.2.0

type SnapshotLevelType struct {
	Level SnapshotLevel
}

func (*SnapshotLevelType) Format added in v1.2.0

func (node *SnapshotLevelType) Format(ctx *FmtCtx)

type StageComment added in v1.0.0

type StageComment struct {
	Exist   bool
	Comment string
}

func (*StageComment) Format added in v1.0.0

func (node *StageComment) Format(ctx *FmtCtx)

type StageCredentials added in v1.0.0

type StageCredentials struct {
	Exist       bool
	Credentials []string
}

func (*StageCredentials) Format added in v1.0.0

func (node *StageCredentials) Format(ctx *FmtCtx)

type StageStatus added in v1.0.0

type StageStatus struct {
	Exist  bool
	Option StageStatusOption
}

func (*StageStatus) Format added in v1.0.0

func (node *StageStatus) Format(ctx *FmtCtx)

type StageStatusOption added in v1.0.0

type StageStatusOption int
const (
	StageStatusEnabled StageStatusOption = iota
	StageStatusDisabled
)

func (StageStatusOption) String added in v1.0.0

func (sso StageStatusOption) String() string

type StageUrl added in v1.0.0

type StageUrl struct {
	Exist bool
	Url   string
}

func (*StageUrl) Format added in v1.0.0

func (node *StageUrl) Format(ctx *FmtCtx)

type StartWithOption added in v0.8.0

type StartWithOption struct {
	Minus bool
	Num   any
}

func (*StartWithOption) Format added in v0.8.0

func (node *StartWithOption) Format(ctx *FmtCtx)

type Statement

type Statement interface {
	fmt.Stringer
	NodeFormatter
	StatementType
	StmtKind() StmtKind
	Free()
}

type StatementOption added in v0.7.0

type StatementOption struct {
	Exist       bool
	StatementId string
}

func (StatementOption) Format added in v0.7.0

func (so StatementOption) Format(ctx *FmtCtx)

type StatementSource

type StatementSource struct {
	TableExpr
	Statement Statement
}

the statements as a data source includes the select statement.

func NewStatementSource

func NewStatementSource(s Statement) *StatementSource

type StatementType added in v0.7.0

type StatementType interface {
	// GetStatementType return like insert, update, delete, begin, rename database, rename table, ...
	GetStatementType() string
	// GetQueryType return val like DQL, DML, DDL, ...
	GetQueryType() string
}

type StmtKind added in v1.2.0

type StmtKind int

func MakeStmtKind added in v1.2.0

func MakeStmtKind(resTyp OutputType, respTyp RespType, handleTyp ExecLocation) StmtKind

func (StmtKind) ExecLocation added in v1.2.0

func (t StmtKind) ExecLocation() ExecLocation

func (StmtKind) OutputType added in v1.2.0

func (t StmtKind) OutputType() OutputType

func (StmtKind) RespType added in v1.2.0

func (t StmtKind) RespType() RespType

type StrVal

type StrVal struct {
	Constant
	// contains filtered or unexported fields
}

StrVal represents a constant string value.

func NewStrVal

func NewStrVal(s string) *StrVal

func (*StrVal) Accept added in v0.8.0

func (node *StrVal) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*StrVal) Format

func (node *StrVal) Format(ctx *FmtCtx)

type SubPartition

type SubPartition struct {
	Name    Identifier
	Options []TableOption
}

func NewSubPartition

func NewSubPartition(n Identifier, o []TableOption) *SubPartition

func (*SubPartition) Format

func (node *SubPartition) Format(ctx *FmtCtx)

func (*SubPartition) Free added in v1.2.0

func (node *SubPartition) Free()

func (SubPartition) TypeName added in v1.2.0

func (node SubPartition) TypeName() string

type Subquery

type Subquery struct {
	SubqueryExpr

	Select SelectStatement
	Exists bool
}

subquery

func NewSubquery

func NewSubquery(s SelectStatement, e bool) *Subquery

func (*Subquery) Accept added in v0.8.0

func (node *Subquery) Accept(v Visitor) (Expr, bool)

func (*Subquery) Format

func (node *Subquery) Format(ctx *FmtCtx)

func (*Subquery) String added in v1.1.1

func (node *Subquery) String() string

type SubqueryExpr

type SubqueryExpr interface {
	Expr
}

subquery interface

type SubscriptionOption added in v0.8.0

type SubscriptionOption struct {
	From        Identifier
	Publication Identifier
	// contains filtered or unexported fields
}

func NewSubscriptionOption added in v1.2.0

func NewSubscriptionOption(from Identifier, publication Identifier) *SubscriptionOption

func (*SubscriptionOption) Format added in v0.8.0

func (node *SubscriptionOption) Format(ctx *FmtCtx)

func (*SubscriptionOption) Free added in v1.2.0

func (node *SubscriptionOption) Free()

func (SubscriptionOption) TypeName added in v1.2.0

func (node SubscriptionOption) TypeName() string

type T

type T struct {
	InternalType InternalType
}

sql type

type TableDef

type TableDef interface {
	NodeFormatter
}

type TableDefs

type TableDefs []TableDef

the list of table definitions

type TableExpr

type TableExpr interface {
	NodeFormatter
}

the table expression

type TableExprs

type TableExprs []TableExpr

the list of table expressions.

func (*TableExprs) Format

func (node *TableExprs) Format(ctx *FmtCtx)

type TableFunction added in v0.6.0

type TableFunction struct {
	Func       *FuncExpr
	SelectStmt *Select
	// contains filtered or unexported fields
}

func (*TableFunction) Format added in v0.6.0

func (t *TableFunction) Format(ctx *FmtCtx)

func (*TableFunction) Free added in v1.2.0

func (s *TableFunction) Free()

func (*TableFunction) GetQueryType added in v0.7.0

func (t *TableFunction) GetQueryType() string

func (*TableFunction) GetStatementType added in v0.7.0

func (t *TableFunction) GetStatementType() string

func (TableFunction) Id added in v0.6.0

func (t TableFunction) Id() string

type TableLock added in v0.7.0

type TableLock struct {
	Table    TableName
	LockType TableLockType
}

type TableLockType added in v0.7.0

type TableLockType int32

TableLockType is the type of the table lock.

const (
	// TableLockNone means this table lock is absent.
	TableLockNone TableLockType = iota
	// TableLockRead means the session with this lock can read the table (but not write it).
	// Multiple sessions can acquire a READ lock for the table at the same time.
	// Other sessions can read the table without explicitly acquiring a READ lock.
	TableLockRead
	// The locks are the same as READ except that they allow INSERT commands to be executed
	TableLockReadLocal
	// TableLockWrite means only the session with this lock has write/read permission.
	// Only the session that holds the lock can access the table. No other session can access it until the lock is released.
	TableLockWrite
	// Low priority write locks
	TableLockLowPriorityWrite
)

func (TableLockType) String added in v0.7.0

func (t TableLockType) String() string

type TableName

type TableName struct {
	TableExpr

	AtTsExpr *AtTimeStamp
	// contains filtered or unexported fields
}

func NewTableName

func NewTableName(name Identifier, prefix ObjectNamePrefix, AtTsExpr *AtTimeStamp) *TableName

func (*TableName) Catalog

func (tn *TableName) Catalog() Identifier

func (TableName) Format

func (tn TableName) Format(ctx *FmtCtx)

func (*TableName) Name

func (tn *TableName) Name() Identifier

func (*TableName) Schema

func (tn *TableName) Schema() Identifier

type TableNames

type TableNames []*TableName

table name array

func (*TableNames) Format

func (node *TableNames) Format(ctx *FmtCtx)

type TableOption

type TableOption interface {
	AlterTableOption
}

type TableOptionAUTOEXTEND_SIZE added in v1.0.0

type TableOptionAUTOEXTEND_SIZE struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionAUTOEXTEND_SIZE added in v1.0.0

func NewTableOptionAUTOEXTEND_SIZE(v uint64) *TableOptionAUTOEXTEND_SIZE

func (*TableOptionAUTOEXTEND_SIZE) Format added in v1.0.0

func (node *TableOptionAUTOEXTEND_SIZE) Format(ctx *FmtCtx)

func (*TableOptionAUTOEXTEND_SIZE) Free added in v1.2.0

func (node *TableOptionAUTOEXTEND_SIZE) Free()

func (TableOptionAUTOEXTEND_SIZE) TypeName added in v1.2.0

func (node TableOptionAUTOEXTEND_SIZE) TypeName() string

type TableOptionAutoIncrement

type TableOptionAutoIncrement struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionAutoIncrement

func NewTableOptionAutoIncrement(v uint64) *TableOptionAutoIncrement

func (*TableOptionAutoIncrement) Format

func (node *TableOptionAutoIncrement) Format(ctx *FmtCtx)

func (*TableOptionAutoIncrement) Free added in v1.2.0

func (node *TableOptionAutoIncrement) Free()

func (TableOptionAutoIncrement) TypeName added in v1.2.0

func (node TableOptionAutoIncrement) TypeName() string

type TableOptionAvgRowLength

type TableOptionAvgRowLength struct {
	Length uint64
	// contains filtered or unexported fields
}

func NewTableOptionAvgRowLength

func NewTableOptionAvgRowLength(l uint64) *TableOptionAvgRowLength

func (*TableOptionAvgRowLength) Format

func (node *TableOptionAvgRowLength) Format(ctx *FmtCtx)

func (*TableOptionAvgRowLength) Free added in v1.2.0

func (node *TableOptionAvgRowLength) Free()

func (TableOptionAvgRowLength) TypeName added in v1.2.0

func (node TableOptionAvgRowLength) TypeName() string

type TableOptionCharset

type TableOptionCharset struct {
	Charset string
	// contains filtered or unexported fields
}

func NewTableOptionCharset

func NewTableOptionCharset(s string) *TableOptionCharset

func (*TableOptionCharset) Format

func (node *TableOptionCharset) Format(ctx *FmtCtx)

func (*TableOptionCharset) Free added in v1.2.0

func (node *TableOptionCharset) Free()

func (TableOptionCharset) TypeName added in v1.2.0

func (node TableOptionCharset) TypeName() string

type TableOptionChecksum

type TableOptionChecksum struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionChecksum

func NewTableOptionChecksum(v uint64) *TableOptionChecksum

func (*TableOptionChecksum) Format

func (node *TableOptionChecksum) Format(ctx *FmtCtx)

func (*TableOptionChecksum) Free added in v1.2.0

func (node *TableOptionChecksum) Free()

func (TableOptionChecksum) TypeName added in v1.2.0

func (node TableOptionChecksum) TypeName() string

type TableOptionCollate

type TableOptionCollate struct {
	Collate string
	// contains filtered or unexported fields
}

func NewTableOptionCollate

func NewTableOptionCollate(s string) *TableOptionCollate

func (*TableOptionCollate) Format

func (node *TableOptionCollate) Format(ctx *FmtCtx)

func (*TableOptionCollate) Free added in v1.2.0

func (node *TableOptionCollate) Free()

func (TableOptionCollate) TypeName added in v1.2.0

func (node TableOptionCollate) TypeName() string

type TableOptionComment

type TableOptionComment struct {
	Comment string
	// contains filtered or unexported fields
}

func NewTableOptionComment

func NewTableOptionComment(c string) *TableOptionComment

func (*TableOptionComment) Format

func (node *TableOptionComment) Format(ctx *FmtCtx)

func (*TableOptionComment) Free added in v1.2.0

func (node *TableOptionComment) Free()

func (TableOptionComment) TypeName added in v1.2.0

func (node TableOptionComment) TypeName() string

type TableOptionCompression

type TableOptionCompression struct {
	Compression string
	// contains filtered or unexported fields
}

func NewTableOptionCompression

func NewTableOptionCompression(c string) *TableOptionCompression

func (*TableOptionCompression) Format

func (node *TableOptionCompression) Format(ctx *FmtCtx)

func (*TableOptionCompression) Free added in v1.2.0

func (node *TableOptionCompression) Free()

func (TableOptionCompression) TypeName added in v1.2.0

func (node TableOptionCompression) TypeName() string

type TableOptionConnection

type TableOptionConnection struct {
	Connection string
	// contains filtered or unexported fields
}

func NewTableOptionConnection

func NewTableOptionConnection(c string) *TableOptionConnection

func (*TableOptionConnection) Format

func (node *TableOptionConnection) Format(ctx *FmtCtx)

func (*TableOptionConnection) Free added in v1.2.0

func (node *TableOptionConnection) Free()

func (TableOptionConnection) TypeName added in v1.2.0

func (node TableOptionConnection) TypeName() string

type TableOptionDataDirectory

type TableOptionDataDirectory struct {
	Dir string
	// contains filtered or unexported fields
}

func NewTableOptionDataDirectory

func NewTableOptionDataDirectory(d string) *TableOptionDataDirectory

func (*TableOptionDataDirectory) Format

func (node *TableOptionDataDirectory) Format(ctx *FmtCtx)

func (*TableOptionDataDirectory) Free added in v1.2.0

func (node *TableOptionDataDirectory) Free()

func (TableOptionDataDirectory) TypeName added in v1.2.0

func (node TableOptionDataDirectory) TypeName() string

type TableOptionDelayKeyWrite

type TableOptionDelayKeyWrite struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionDelayKeyWrite

func NewTableOptionDelayKeyWrite(v uint64) *TableOptionDelayKeyWrite

func (*TableOptionDelayKeyWrite) Format

func (node *TableOptionDelayKeyWrite) Format(ctx *FmtCtx)

func (*TableOptionDelayKeyWrite) Free added in v1.2.0

func (node *TableOptionDelayKeyWrite) Free()

func (TableOptionDelayKeyWrite) TypeName added in v1.2.0

func (node TableOptionDelayKeyWrite) TypeName() string

type TableOptionEncryption

type TableOptionEncryption struct {
	Encryption string
	// contains filtered or unexported fields
}

func NewTableOptionEncryption

func NewTableOptionEncryption(e string) *TableOptionEncryption

func (*TableOptionEncryption) Format

func (node *TableOptionEncryption) Format(ctx *FmtCtx)

func (*TableOptionEncryption) Free added in v1.2.0

func (node *TableOptionEncryption) Free()

func (TableOptionEncryption) TypeName added in v1.2.0

func (node TableOptionEncryption) TypeName() string

type TableOptionEngine

type TableOptionEngine struct {
	Engine string
	// contains filtered or unexported fields
}

func NewTableOptionEngine

func NewTableOptionEngine(s string) *TableOptionEngine

func (*TableOptionEngine) Format

func (node *TableOptionEngine) Format(ctx *FmtCtx)

func (*TableOptionEngine) Free added in v1.2.0

func (node *TableOptionEngine) Free()

func (TableOptionEngine) TypeName added in v1.2.0

func (node TableOptionEngine) TypeName() string

type TableOptionEngineAttr added in v1.0.0

type TableOptionEngineAttr struct {
	Engine string
	// contains filtered or unexported fields
}

func NewTableOptionEngineAttr added in v1.0.0

func NewTableOptionEngineAttr(s string) *TableOptionEngineAttr

func (*TableOptionEngineAttr) Format added in v1.0.0

func (node *TableOptionEngineAttr) Format(ctx *FmtCtx)

func (*TableOptionEngineAttr) Free added in v1.2.0

func (node *TableOptionEngineAttr) Free()

func (TableOptionEngineAttr) TypeName added in v1.2.0

func (node TableOptionEngineAttr) TypeName() string

type TableOptionIndexDirectory

type TableOptionIndexDirectory struct {
	Dir string
	// contains filtered or unexported fields
}

func NewTableOptionIndexDirectory

func NewTableOptionIndexDirectory(d string) *TableOptionIndexDirectory

func (*TableOptionIndexDirectory) Format

func (node *TableOptionIndexDirectory) Format(ctx *FmtCtx)

func (*TableOptionIndexDirectory) Free added in v1.2.0

func (node *TableOptionIndexDirectory) Free()

func (TableOptionIndexDirectory) TypeName added in v1.2.0

func (node TableOptionIndexDirectory) TypeName() string

type TableOptionInsertMethod added in v1.0.0

type TableOptionInsertMethod struct {
	Method string
	// contains filtered or unexported fields
}

func NewTableOptionInsertMethod added in v1.0.0

func NewTableOptionInsertMethod(s string) *TableOptionInsertMethod

func (*TableOptionInsertMethod) Format added in v1.0.0

func (node *TableOptionInsertMethod) Format(ctx *FmtCtx)

func (*TableOptionInsertMethod) Free added in v1.2.0

func (node *TableOptionInsertMethod) Free()

func (TableOptionInsertMethod) TypeName added in v1.2.0

func (node TableOptionInsertMethod) TypeName() string

type TableOptionKeyBlockSize

type TableOptionKeyBlockSize struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionKeyBlockSize

func NewTableOptionKeyBlockSize(v uint64) *TableOptionKeyBlockSize

func (*TableOptionKeyBlockSize) Format

func (node *TableOptionKeyBlockSize) Format(ctx *FmtCtx)

func (*TableOptionKeyBlockSize) Free added in v1.2.0

func (node *TableOptionKeyBlockSize) Free()

func (TableOptionKeyBlockSize) TypeName added in v1.2.0

func (node TableOptionKeyBlockSize) TypeName() string

type TableOptionMaxRows

type TableOptionMaxRows struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionMaxRows

func NewTableOptionMaxRows(v uint64) *TableOptionMaxRows

func (*TableOptionMaxRows) Format

func (node *TableOptionMaxRows) Format(ctx *FmtCtx)

func (*TableOptionMaxRows) Free added in v1.2.0

func (node *TableOptionMaxRows) Free()

func (TableOptionMaxRows) TypeName added in v1.2.0

func (node TableOptionMaxRows) TypeName() string

type TableOptionMinRows

type TableOptionMinRows struct {
	Value uint64
	// contains filtered or unexported fields
}

func NewTableOptionMinRows

func NewTableOptionMinRows(v uint64) *TableOptionMinRows

func (*TableOptionMinRows) Format

func (node *TableOptionMinRows) Format(ctx *FmtCtx)

func (*TableOptionMinRows) Free added in v1.2.0

func (node *TableOptionMinRows) Free()

func (TableOptionMinRows) TypeName added in v1.2.0

func (node TableOptionMinRows) TypeName() string

type TableOptionPackKeys

type TableOptionPackKeys struct {
	Value   int64
	Default bool
	// contains filtered or unexported fields
}

func NewTableOptionPackKeys

func NewTableOptionPackKeys() *TableOptionPackKeys

func (*TableOptionPackKeys) Format

func (node *TableOptionPackKeys) Format(ctx *FmtCtx)

func (*TableOptionPackKeys) Free added in v1.2.0

func (node *TableOptionPackKeys) Free()

func (TableOptionPackKeys) TypeName added in v1.2.0

func (node TableOptionPackKeys) TypeName() string

type TableOptionPassword

type TableOptionPassword struct {
	Password string
	// contains filtered or unexported fields
}

func NewTableOptionPassword

func NewTableOptionPassword(p string) *TableOptionPassword

func (*TableOptionPassword) Format

func (node *TableOptionPassword) Format(ctx *FmtCtx)

func (*TableOptionPassword) Free added in v1.2.0

func (node *TableOptionPassword) Free()

func (TableOptionPassword) TypeName added in v1.2.0

func (node TableOptionPassword) TypeName() string

type TableOptionProperties

type TableOptionProperties struct {
	Preperties []Property
	// contains filtered or unexported fields
}

func NewTableOptionProperties added in v1.2.0

func NewTableOptionProperties(p []Property) *TableOptionProperties

func (*TableOptionProperties) Format

func (node *TableOptionProperties) Format(ctx *FmtCtx)

func (*TableOptionProperties) Free added in v1.2.0

func (node *TableOptionProperties) Free()

func (TableOptionProperties) TypeName added in v1.2.0

func (node TableOptionProperties) TypeName() string

type TableOptionRowFormat

type TableOptionRowFormat struct {
	Value RowFormatType
	// contains filtered or unexported fields
}

func NewTableOptionRowFormat

func NewTableOptionRowFormat(v RowFormatType) *TableOptionRowFormat

func (*TableOptionRowFormat) Format

func (node *TableOptionRowFormat) Format(ctx *FmtCtx)

func (*TableOptionRowFormat) Free added in v1.2.0

func (node *TableOptionRowFormat) Free()

func (TableOptionRowFormat) TypeName added in v1.2.0

func (node TableOptionRowFormat) TypeName() string

type TableOptionSecondaryEngine

type TableOptionSecondaryEngine struct {
	Engine string
	// contains filtered or unexported fields
}

func NewTableOptionSecondaryEngine

func NewTableOptionSecondaryEngine(s string) *TableOptionSecondaryEngine

func (*TableOptionSecondaryEngine) Format

func (node *TableOptionSecondaryEngine) Format(ctx *FmtCtx)

func (*TableOptionSecondaryEngine) Free added in v1.2.0

func (node *TableOptionSecondaryEngine) Free()

func (TableOptionSecondaryEngine) TypeName added in v1.2.0

func (node TableOptionSecondaryEngine) TypeName() string

type TableOptionSecondaryEngineAttr added in v1.0.0

type TableOptionSecondaryEngineAttr struct {
	Attr string
	// contains filtered or unexported fields
}

func NewTTableOptionSecondaryEngineAttr added in v1.0.0

func NewTTableOptionSecondaryEngineAttr(v string) *TableOptionSecondaryEngineAttr

func (*TableOptionSecondaryEngineAttr) Format added in v1.0.0

func (node *TableOptionSecondaryEngineAttr) Format(ctx *FmtCtx)

func (*TableOptionSecondaryEngineAttr) Free added in v1.2.0

func (node *TableOptionSecondaryEngineAttr) Free()

func (TableOptionSecondaryEngineAttr) TypeName added in v1.2.0

func (node TableOptionSecondaryEngineAttr) TypeName() string

type TableOptionSecondaryEngineNull

type TableOptionSecondaryEngineNull struct {
	// contains filtered or unexported fields
}

func NewTableOptionSecondaryEngineNull

func NewTableOptionSecondaryEngineNull() *TableOptionSecondaryEngineNull

func (TableOptionSecondaryEngineNull) TypeName added in v1.2.0

func (node TableOptionSecondaryEngineNull) TypeName() string

type TableOptionStartTrans added in v1.0.0

type TableOptionStartTrans struct {
	Value bool
	// contains filtered or unexported fields
}

func NewTTableOptionStartTrans added in v1.0.0

func NewTTableOptionStartTrans(v bool) *TableOptionStartTrans

func (*TableOptionStartTrans) Format added in v1.0.0

func (node *TableOptionStartTrans) Format(ctx *FmtCtx)

func (*TableOptionStartTrans) Free added in v1.2.0

func (node *TableOptionStartTrans) Free()

func (TableOptionStartTrans) TypeName added in v1.2.0

func (node TableOptionStartTrans) TypeName() string

type TableOptionStatsAutoRecalc

type TableOptionStatsAutoRecalc struct {
	Value   uint64
	Default bool // false -- see Value; true -- Value is useless
	// contains filtered or unexported fields
}

func NewTableOptionStatsAutoRecalc

func NewTableOptionStatsAutoRecalc() *TableOptionStatsAutoRecalc

func (*TableOptionStatsAutoRecalc) Format

func (node *TableOptionStatsAutoRecalc) Format(ctx *FmtCtx)

func (*TableOptionStatsAutoRecalc) Free added in v1.2.0

func (node *TableOptionStatsAutoRecalc) Free()

func (TableOptionStatsAutoRecalc) TypeName added in v1.2.0

func (node TableOptionStatsAutoRecalc) TypeName() string

type TableOptionStatsPersistent

type TableOptionStatsPersistent struct {
	Value   uint64
	Default bool
	// contains filtered or unexported fields
}

func NewTableOptionStatsPersistent

func NewTableOptionStatsPersistent() *TableOptionStatsPersistent

func (*TableOptionStatsPersistent) Format

func (node *TableOptionStatsPersistent) Format(ctx *FmtCtx)

func (*TableOptionStatsPersistent) Free added in v1.2.0

func (node *TableOptionStatsPersistent) Free()

func (TableOptionStatsPersistent) TypeName added in v1.2.0

func (node TableOptionStatsPersistent) TypeName() string

type TableOptionStatsSamplePages

type TableOptionStatsSamplePages struct {
	Value   uint64
	Default bool // false -- see Value; true -- Value is useless
	// contains filtered or unexported fields
}

func NewTableOptionStatsSamplePages

func NewTableOptionStatsSamplePages() *TableOptionStatsSamplePages

func (*TableOptionStatsSamplePages) Format

func (node *TableOptionStatsSamplePages) Format(ctx *FmtCtx)

func (*TableOptionStatsSamplePages) Free added in v1.2.0

func (node *TableOptionStatsSamplePages) Free()

func (TableOptionStatsSamplePages) TypeName added in v1.2.0

func (node TableOptionStatsSamplePages) TypeName() string

type TableOptionStorageMedia

type TableOptionStorageMedia struct {
	Media string
	// contains filtered or unexported fields
}

func NewTableOptionStorageMedia

func NewTableOptionStorageMedia(m string) *TableOptionStorageMedia

func (*TableOptionStorageMedia) Format

func (node *TableOptionStorageMedia) Format(ctx *FmtCtx)

func (*TableOptionStorageMedia) Free added in v1.2.0

func (node *TableOptionStorageMedia) Free()

func (TableOptionStorageMedia) TypeName added in v1.2.0

func (node TableOptionStorageMedia) TypeName() string

type TableOptionTablespace

type TableOptionTablespace struct {
	Name       string
	StorageOpt string
	// contains filtered or unexported fields
}

func NewTableOptionTablespace

func NewTableOptionTablespace(n string, s string) *TableOptionTablespace

func (*TableOptionTablespace) Format

func (node *TableOptionTablespace) Format(ctx *FmtCtx)

func (*TableOptionTablespace) Free added in v1.2.0

func (node *TableOptionTablespace) Free()

func (TableOptionTablespace) TypeName added in v1.2.0

func (node TableOptionTablespace) TypeName() string

type TableOptionUnion

type TableOptionUnion struct {
	Names TableNames
	// contains filtered or unexported fields
}

func NewTableOptionUnion

func NewTableOptionUnion(n TableNames) *TableOptionUnion

func (*TableOptionUnion) Format

func (node *TableOptionUnion) Format(ctx *FmtCtx)

func (*TableOptionUnion) Free added in v1.2.0

func (node *TableOptionUnion) Free()

func (TableOptionUnion) TypeName added in v1.2.0

func (node TableOptionUnion) TypeName() string

type TailParameter added in v0.6.0

type TailParameter struct {
	//Charset
	Charset string
	//Fields
	Fields *Fields
	//Lines
	Lines *Lines
	//Ignored lines
	IgnoredLines uint64
	//col_name_or_user_var
	ColumnList []LoadColumn
	//set col_name
	Assignments UpdateExprs
}

type Target added in v1.2.0

type Target struct {
	NodeFormatter
	AccountName  string
	IsALLAccount bool // Add attribute to indicate whether it is an ALL account
}

input: "upgrade account all with retry 10",

func (*Target) Format added in v1.2.0

func (node *Target) Format(ctx *FmtCtx)

type Terminated added in v1.2.0

type Terminated struct {
	Value string
}

type TimeWindow added in v1.1.0

type TimeWindow struct {
	Interval *Interval
	Sliding  *Sliding
	Fill     *Fill
}

func (*TimeWindow) Format added in v1.1.0

func (node *TimeWindow) Format(ctx *FmtCtx)

type TlsOption

type TlsOption interface {
	NodeFormatter
}

type TlsOptionCipher

type TlsOptionCipher struct {
	Cipher string
	// contains filtered or unexported fields
}

func (*TlsOptionCipher) Format

func (node *TlsOptionCipher) Format(ctx *FmtCtx)

func (*TlsOptionCipher) Free added in v1.2.0

func (node *TlsOptionCipher) Free()

func (TlsOptionCipher) TypeName added in v1.2.0

func (node TlsOptionCipher) TypeName() string

type TlsOptionIssuer

type TlsOptionIssuer struct {
	Issuer string
	// contains filtered or unexported fields
}

func (*TlsOptionIssuer) Format

func (node *TlsOptionIssuer) Format(ctx *FmtCtx)

func (*TlsOptionIssuer) Free added in v1.2.0

func (node *TlsOptionIssuer) Free()

func (TlsOptionIssuer) TypeName added in v1.2.0

func (node TlsOptionIssuer) TypeName() string

type TlsOptionNone

type TlsOptionNone struct {
	// contains filtered or unexported fields
}

func (*TlsOptionNone) Format

func (node *TlsOptionNone) Format(ctx *FmtCtx)

func (*TlsOptionNone) Free added in v1.2.0

func (node *TlsOptionNone) Free()

func (TlsOptionNone) TypeName added in v1.2.0

func (node TlsOptionNone) TypeName() string

type TlsOptionSSL

type TlsOptionSSL struct {
	// contains filtered or unexported fields
}

func (*TlsOptionSSL) Format

func (node *TlsOptionSSL) Format(ctx *FmtCtx)

func (*TlsOptionSSL) Free added in v1.2.0

func (node *TlsOptionSSL) Free()

func (TlsOptionSSL) TypeName added in v1.2.0

func (node TlsOptionSSL) TypeName() string

type TlsOptionSan

type TlsOptionSan struct {
	San string
	// contains filtered or unexported fields
}

func (*TlsOptionSan) Format

func (node *TlsOptionSan) Format(ctx *FmtCtx)

func (*TlsOptionSan) Free added in v1.2.0

func (node *TlsOptionSan) Free()

func (TlsOptionSan) TypeName added in v1.2.0

func (node TlsOptionSan) TypeName() string

type TlsOptionSubject

type TlsOptionSubject struct {
	Subject string
	// contains filtered or unexported fields
}

func (*TlsOptionSubject) Format

func (node *TlsOptionSubject) Format(ctx *FmtCtx)

func (*TlsOptionSubject) Free added in v1.2.0

func (node *TlsOptionSubject) Free()

func (TlsOptionSubject) TypeName added in v1.2.0

func (node TlsOptionSubject) TypeName() string

type TlsOptionX509

type TlsOptionX509 struct {
	// contains filtered or unexported fields
}

func (*TlsOptionX509) Format

func (node *TlsOptionX509) Format(ctx *FmtCtx)

func (*TlsOptionX509) Free added in v1.2.0

func (node *TlsOptionX509) Free()

func (TlsOptionX509) TypeName added in v1.2.0

func (node TlsOptionX509) TypeName() string

type TransactionCharacteristic added in v0.8.0

type TransactionCharacteristic struct {
	IsLevel   bool
	Isolation IsolationLevelType
	Access    AccessModeType
}

func (*TransactionCharacteristic) Format added in v0.8.0

func (tc *TransactionCharacteristic) Format(ctx *FmtCtx)

type TransactionModes

type TransactionModes struct {
	RwMode ReadWriteMode
}

modes for a transaction

func MakeTransactionModes

func MakeTransactionModes(rwm ReadWriteMode) TransactionModes

func (*TransactionModes) Format

func (node *TransactionModes) Format(ctx *FmtCtx)

type TruncateTable added in v0.6.0

type TruncateTable struct {
	Name *TableName
	// contains filtered or unexported fields
}

truncate table statement

func NewTruncateTable added in v0.6.0

func NewTruncateTable(name *TableName) *TruncateTable

func (*TruncateTable) Format added in v0.6.0

func (node *TruncateTable) Format(ctx *FmtCtx)

func (*TruncateTable) Free added in v1.2.0

func (node *TruncateTable) Free()

func (*TruncateTable) GetQueryType added in v0.7.0

func (node *TruncateTable) GetQueryType() string

func (*TruncateTable) GetStatementType added in v0.7.0

func (node *TruncateTable) GetStatementType() string

func (*TruncateTable) StmtKind added in v1.2.0

func (node *TruncateTable) StmtKind() StmtKind

func (TruncateTable) TypeName added in v1.2.0

func (node TruncateTable) TypeName() string

type Tuple

type Tuple struct {
	Exprs Exprs
	// contains filtered or unexported fields
}

the parenthesized list of expressions.

func NewTuple

func NewTuple(e Exprs) *Tuple

func (*Tuple) Accept added in v0.8.0

func (node *Tuple) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*Tuple) Format

func (node *Tuple) Format(ctx *FmtCtx)

func (*Tuple) String

func (node *Tuple) String() string

type TypeExpr

type TypeExpr interface {
	Expr
}

type TypeOption added in v1.0.0

type TypeOption struct {
	Type ResolvableTypeReference
}

func (*TypeOption) Format added in v1.0.0

func (node *TypeOption) Format(ctx *FmtCtx)

type UnLockTableStmt added in v0.7.0

type UnLockTableStmt struct {
	// contains filtered or unexported fields
}

func (*UnLockTableStmt) Format added in v0.7.0

func (node *UnLockTableStmt) Format(ctx *FmtCtx)

func (*UnLockTableStmt) Free added in v1.2.0

func (s *UnLockTableStmt) Free()

func (*UnLockTableStmt) GetQueryType added in v0.7.0

func (node *UnLockTableStmt) GetQueryType() string

func (*UnLockTableStmt) GetStatementType added in v0.7.0

func (node *UnLockTableStmt) GetStatementType() string

func (*UnLockTableStmt) StmtKind added in v1.2.0

func (node *UnLockTableStmt) StmtKind() StmtKind

type UnaryExpr

type UnaryExpr struct {

	//operator
	Op UnaryOp

	//expression
	Expr Expr
	// contains filtered or unexported fields
}

unary expression

func NewUnaryExpr

func NewUnaryExpr(op UnaryOp, expr Expr) *UnaryExpr

func (*UnaryExpr) Accept added in v0.8.0

func (e *UnaryExpr) Accept(v Visitor) (Expr, bool)

func (*UnaryExpr) Format

func (e *UnaryExpr) Format(ctx *FmtCtx)

func (*UnaryExpr) String

func (e *UnaryExpr) String() string

type UnaryOp

type UnaryOp int

unary expression

const (
	//-
	UNARY_MINUS UnaryOp = iota
	//+
	UNARY_PLUS
	//~
	UNARY_TILDE
	//!
	UNARY_MARK
)

func (UnaryOp) ToString

func (op UnaryOp) ToString() string

type UnionClause

type UnionClause struct {
	SelectStatement
	Type UnionType
	//Left, Right *Select
	Left, Right SelectStatement
	All         bool
	Distinct    bool
}

the UNION statement

func NewUnionClause

func NewUnionClause(t UnionType, l, r SelectStatement, a bool) *UnionClause

func NewUnionClause(t UnionType,l,r *Select,a bool)*UnionClause{

func (*UnionClause) Format

func (node *UnionClause) Format(ctx *FmtCtx)

type UnionType

type UnionType int

UnionType set operations

const (
	UNION UnionType = iota
	INTERSECT
	EXCEPT
	UT_MINUS
)

func (UnionType) String

func (i UnionType) String() string

type UnionTypeRecord

type UnionTypeRecord struct {
	Type     UnionType
	All      bool
	Distinct bool
}

type UniqueIndex

type UniqueIndex struct {
	KeyParts         []*KeyPart
	Name             string
	ConstraintSymbol string
	Empty            bool
	IndexOption      *IndexOption
	// contains filtered or unexported fields
}

func NewUniqueIndex

func NewUniqueIndex(k []*KeyPart, n string, e bool, io *IndexOption) *UniqueIndex

func (*UniqueIndex) Format

func (node *UniqueIndex) Format(ctx *FmtCtx)

func (*UniqueIndex) Free added in v1.2.0

func (node *UniqueIndex) Free()

func (*UniqueIndex) GetIndexName added in v0.8.0

func (node *UniqueIndex) GetIndexName() string

func (UniqueIndex) TypeName added in v1.2.0

func (node UniqueIndex) TypeName() string

type UnqualifiedStar

type UnqualifiedStar struct {
	VarName
}

'*' in the scalar expression

func (UnqualifiedStar) Format

func (node UnqualifiedStar) Format(ctx *FmtCtx)

type UnresolvedName

type UnresolvedName struct {

	//the number of name parts specified, including the star. Always 1 or greater.
	NumParts int

	//the name ends with a star. then the first element is empty in the Parts
	Star bool

	// Parts are the name components (at most 4: column, table, db/schema, catalog.), in reverse order.
	Parts NameParts

	CStrParts CStrParts
	// contains filtered or unexported fields
}

the unresolved qualified name like column name.

func NewUnresolvedName

func NewUnresolvedName(ctx context.Context, parts ...string) (*UnresolvedName, error)

func NewUnresolvedNameWithStar

func NewUnresolvedNameWithStar(ctx context.Context, parts ...string) (*UnresolvedName, error)

func SetUnresolvedName

func SetUnresolvedName(parts ...string) *UnresolvedName

func SetUnresolvedNameWithStar

func SetUnresolvedNameWithStar(parts ...string) *UnresolvedName

func (*UnresolvedName) Accept added in v0.8.0

func (node *UnresolvedName) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*UnresolvedName) Format

func (node *UnresolvedName) Format(ctx *FmtCtx)

func (*UnresolvedName) GetNames added in v0.6.0

func (node *UnresolvedName) GetNames() (string, string, string)

GetNames dbName, tableName, colName

func (*UnresolvedName) SetUnresolvedNameCStrParts added in v1.2.0

func (node *UnresolvedName) SetUnresolvedNameCStrParts(useOrigin int64, parts ...string)

func (*UnresolvedName) String

func (node *UnresolvedName) String() string

type UnresolvedObjectName

type UnresolvedObjectName struct {
	//the number of name parts; >= 1
	NumParts int

	//At most three components, in reverse order.
	//object name, db/schema, catalog.
	Parts [3]string
}

the unresolved qualified name for a database object (table, view, etc)

func NewUnresolvedObjectName

func NewUnresolvedObjectName(ctx context.Context, num int, parts [3]string) (*UnresolvedObjectName, error)

func SetUnresolvedObjectName

func SetUnresolvedObjectName(num int, parts [3]string) *UnresolvedObjectName

func (*UnresolvedObjectName) Format

func (node *UnresolvedObjectName) Format(ctx *FmtCtx)

func (*UnresolvedObjectName) GetDBName added in v0.6.0

func (node *UnresolvedObjectName) GetDBName() string

func (*UnresolvedObjectName) GetTableName added in v1.1.0

func (node *UnresolvedObjectName) GetTableName() string

func (*UnresolvedObjectName) ToTableName

func (node *UnresolvedObjectName) ToTableName() TableName

type UnrestrictedIdentifier

type UnrestrictedIdentifier string

type Update

type Update struct {
	Tables  TableExprs
	Exprs   UpdateExprs
	Where   *Where
	OrderBy OrderBy
	Limit   *Limit
	With    *With
	// contains filtered or unexported fields
}

update statement

func (*Update) Format

func (node *Update) Format(ctx *FmtCtx)

func (*Update) Free added in v1.2.0

func (s *Update) Free()

func (*Update) GetQueryType added in v0.7.0

func (node *Update) GetQueryType() string

func (*Update) GetStatementType added in v0.7.0

func (node *Update) GetStatementType() string

func (*Update) StmtKind added in v1.2.0

func (node *Update) StmtKind() StmtKind

type UpdateExpr

type UpdateExpr struct {
	NodeFormatter
	Tuple bool
	Names []*UnresolvedName
	Expr  Expr
}

the update expression.

func NewUpdateExpr

func NewUpdateExpr(t bool, n []*UnresolvedName, e Expr) *UpdateExpr

func (*UpdateExpr) Format

func (node *UpdateExpr) Format(ctx *FmtCtx)

type UpdateExprs

type UpdateExprs []*UpdateExpr

func (*UpdateExprs) Format

func (node *UpdateExprs) Format(ctx *FmtCtx)

type UpdateVal added in v0.6.0

type UpdateVal struct {
	// contains filtered or unexported fields
}

func (*UpdateVal) Accept added in v0.8.0

func (node *UpdateVal) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker interface

func (*UpdateVal) Format added in v0.6.0

func (node *UpdateVal) Format(ctx *FmtCtx)

func (*UpdateVal) String added in v0.6.0

func (node *UpdateVal) String() string

type UpgradeStatement added in v1.2.0

type UpgradeStatement struct {
	Target *Target
	Retry  int64
	// contains filtered or unexported fields
}

func (*UpgradeStatement) Format added in v1.2.0

func (node *UpgradeStatement) Format(ctx *FmtCtx)

func (*UpgradeStatement) Free added in v1.2.0

func (s *UpgradeStatement) Free()

func (*UpgradeStatement) GetQueryType added in v1.2.0

func (node *UpgradeStatement) GetQueryType() string

func (*UpgradeStatement) GetStatementType added in v1.2.0

func (node *UpgradeStatement) GetStatementType() string

func (*UpgradeStatement) StmtKind added in v1.2.0

func (node *UpgradeStatement) StmtKind() StmtKind

func (UpgradeStatement) TypeName added in v1.2.0

func (node UpgradeStatement) TypeName() string

type Use

type Use struct {
	Name              *CStr
	SecondaryRole     bool
	SecondaryRoleType SecondaryRoleType
	Role              *Role
	// contains filtered or unexported fields
}

Use statement

func NewUse

func NewUse(name *CStr, secondaryRole bool, secondaryRoleType SecondaryRoleType, role *Role) *Use

func (*Use) Format

func (node *Use) Format(ctx *FmtCtx)

func (*Use) Free added in v1.2.0

func (node *Use) Free()

func (*Use) GetQueryType added in v0.7.0

func (node *Use) GetQueryType() string

func (*Use) GetStatementType added in v0.7.0

func (node *Use) GetStatementType() string

func (*Use) IsUseRole added in v0.6.0

func (node *Use) IsUseRole() bool

IsUseRole checks the statement is:

USE SECONDARY ROLE { ALL | NONE };
USE ROLE role;

func (*Use) StmtKind added in v1.2.0

func (node *Use) StmtKind() StmtKind

func (Use) TypeName added in v1.2.0

func (node Use) TypeName() string

type User

type User struct {
	NodeFormatter
	Username   string
	Hostname   string
	AuthOption *AccountIdentified
}

func NewUser

func NewUser(u, h string, a *AccountIdentified) *User

func (*User) Format

func (node *User) Format(ctx *FmtCtx)

func (*User) Free added in v1.2.0

func (node *User) Free()

func (User) TypeName added in v1.2.0

func (node User) TypeName() string

type UserMiscOption

type UserMiscOption interface {
	NodeFormatter
}

type UserMiscOptionAccountLock

type UserMiscOptionAccountLock struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionAccountLock added in v1.2.0

func NewUserMiscOptionAccountLock() *UserMiscOptionAccountLock

func (*UserMiscOptionAccountLock) Format

func (node *UserMiscOptionAccountLock) Format(ctx *FmtCtx)

func (*UserMiscOptionAccountLock) Free added in v1.2.0

func (node *UserMiscOptionAccountLock) Free()

func (UserMiscOptionAccountLock) TypeName added in v1.2.0

func (node UserMiscOptionAccountLock) TypeName() string

type UserMiscOptionAccountUnlock

type UserMiscOptionAccountUnlock struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionAccountUnlock added in v1.2.0

func NewUserMiscOptionAccountUnlock() *UserMiscOptionAccountUnlock

func (*UserMiscOptionAccountUnlock) Format

func (node *UserMiscOptionAccountUnlock) Format(ctx *FmtCtx)

func (*UserMiscOptionAccountUnlock) Free added in v1.2.0

func (node *UserMiscOptionAccountUnlock) Free()

func (UserMiscOptionAccountUnlock) TypeName added in v1.2.0

func (node UserMiscOptionAccountUnlock) TypeName() string

type UserMiscOptionFailedLoginAttempts

type UserMiscOptionFailedLoginAttempts struct {
	Value int64
	// contains filtered or unexported fields
}

func NewUserMiscOptionFailedLoginAttempts added in v1.2.0

func NewUserMiscOptionFailedLoginAttempts(v int64) *UserMiscOptionFailedLoginAttempts

func (*UserMiscOptionFailedLoginAttempts) Format added in v0.6.0

func (node *UserMiscOptionFailedLoginAttempts) Format(ctx *FmtCtx)

func (*UserMiscOptionFailedLoginAttempts) Free added in v1.2.0

func (node *UserMiscOptionFailedLoginAttempts) Free()

func (UserMiscOptionFailedLoginAttempts) TypeName added in v1.2.0

func (node UserMiscOptionFailedLoginAttempts) TypeName() string

type UserMiscOptionPasswordExpireDefault

type UserMiscOptionPasswordExpireDefault struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordExpireDefault added in v1.2.0

func NewUserMiscOptionPasswordExpireDefault() *UserMiscOptionPasswordExpireDefault

func (*UserMiscOptionPasswordExpireDefault) Format

func (node *UserMiscOptionPasswordExpireDefault) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordExpireDefault) Free added in v1.2.0

func (UserMiscOptionPasswordExpireDefault) TypeName added in v1.2.0

type UserMiscOptionPasswordExpireInterval

type UserMiscOptionPasswordExpireInterval struct {
	Value int64
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordExpireInterval added in v1.2.0

func NewUserMiscOptionPasswordExpireInterval(v int64) *UserMiscOptionPasswordExpireInterval

func (*UserMiscOptionPasswordExpireInterval) Format

func (node *UserMiscOptionPasswordExpireInterval) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordExpireInterval) Free added in v1.2.0

func (UserMiscOptionPasswordExpireInterval) TypeName added in v1.2.0

type UserMiscOptionPasswordExpireNever

type UserMiscOptionPasswordExpireNever struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordExpireNever added in v1.2.0

func NewUserMiscOptionPasswordExpireNever() *UserMiscOptionPasswordExpireNever

func (*UserMiscOptionPasswordExpireNever) Format

func (node *UserMiscOptionPasswordExpireNever) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordExpireNever) Free added in v1.2.0

func (node *UserMiscOptionPasswordExpireNever) Free()

func (UserMiscOptionPasswordExpireNever) TypeName added in v1.2.0

func (node UserMiscOptionPasswordExpireNever) TypeName() string

type UserMiscOptionPasswordExpireNone

type UserMiscOptionPasswordExpireNone struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordExpireNone added in v1.2.0

func NewUserMiscOptionPasswordExpireNone() *UserMiscOptionPasswordExpireNone

func (*UserMiscOptionPasswordExpireNone) Format

func (node *UserMiscOptionPasswordExpireNone) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordExpireNone) Free added in v1.2.0

func (node *UserMiscOptionPasswordExpireNone) Free()

func (UserMiscOptionPasswordExpireNone) TypeName added in v1.2.0

func (node UserMiscOptionPasswordExpireNone) TypeName() string

type UserMiscOptionPasswordHistoryCount

type UserMiscOptionPasswordHistoryCount struct {
	Value int64
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordHistoryCount added in v1.2.0

func NewUserMiscOptionPasswordHistoryCount(v int64) *UserMiscOptionPasswordHistoryCount

func (*UserMiscOptionPasswordHistoryCount) Format added in v0.6.0

func (node *UserMiscOptionPasswordHistoryCount) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordHistoryCount) Free added in v1.2.0

func (UserMiscOptionPasswordHistoryCount) TypeName added in v1.2.0

type UserMiscOptionPasswordHistoryDefault

type UserMiscOptionPasswordHistoryDefault struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordHistoryDefault added in v1.2.0

func NewUserMiscOptionPasswordHistoryDefault() *UserMiscOptionPasswordHistoryDefault

func (*UserMiscOptionPasswordHistoryDefault) Format added in v0.6.0

func (node *UserMiscOptionPasswordHistoryDefault) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordHistoryDefault) Free added in v1.2.0

func (UserMiscOptionPasswordHistoryDefault) TypeName added in v1.2.0

type UserMiscOptionPasswordLockTimeCount

type UserMiscOptionPasswordLockTimeCount struct {
	Value int64
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordLockTimeCount added in v1.2.0

func NewUserMiscOptionPasswordLockTimeCount(v int64) *UserMiscOptionPasswordLockTimeCount

func (*UserMiscOptionPasswordLockTimeCount) Format added in v0.6.0

func (node *UserMiscOptionPasswordLockTimeCount) Format(ctx *FmtCtx)

func (*UserMiscOptionPasswordLockTimeCount) Free added in v1.2.0

func (UserMiscOptionPasswordLockTimeCount) TypeName added in v1.2.0

type UserMiscOptionPasswordLockTimeUnbounded

type UserMiscOptionPasswordLockTimeUnbounded struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordLockTimeUnbounded added in v1.2.0

func NewUserMiscOptionPasswordLockTimeUnbounded() *UserMiscOptionPasswordLockTimeUnbounded

func (*UserMiscOptionPasswordLockTimeUnbounded) Format added in v0.6.0

func (*UserMiscOptionPasswordLockTimeUnbounded) Free added in v1.2.0

func (UserMiscOptionPasswordLockTimeUnbounded) TypeName added in v1.2.0

type UserMiscOptionPasswordRequireCurrentDefault

type UserMiscOptionPasswordRequireCurrentDefault struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordRequireCurrentDefault added in v1.2.0

func NewUserMiscOptionPasswordRequireCurrentDefault() *UserMiscOptionPasswordRequireCurrentDefault

func (*UserMiscOptionPasswordRequireCurrentDefault) Format added in v0.6.0

func (*UserMiscOptionPasswordRequireCurrentDefault) Free added in v1.2.0

func (UserMiscOptionPasswordRequireCurrentDefault) TypeName added in v1.2.0

type UserMiscOptionPasswordRequireCurrentNone added in v0.6.0

type UserMiscOptionPasswordRequireCurrentNone struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordRequireCurrentNone added in v1.2.0

func NewUserMiscOptionPasswordRequireCurrentNone() *UserMiscOptionPasswordRequireCurrentNone

func (*UserMiscOptionPasswordRequireCurrentNone) Format added in v0.6.0

func (*UserMiscOptionPasswordRequireCurrentNone) Free added in v1.2.0

func (UserMiscOptionPasswordRequireCurrentNone) TypeName added in v1.2.0

type UserMiscOptionPasswordRequireCurrentOptional

type UserMiscOptionPasswordRequireCurrentOptional struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordRequireCurrentOptional added in v1.2.0

func NewUserMiscOptionPasswordRequireCurrentOptional() *UserMiscOptionPasswordRequireCurrentOptional

func (*UserMiscOptionPasswordRequireCurrentOptional) Format added in v0.6.0

func (*UserMiscOptionPasswordRequireCurrentOptional) Free added in v1.2.0

func (UserMiscOptionPasswordRequireCurrentOptional) TypeName added in v1.2.0

type UserMiscOptionPasswordReuseIntervalCount

type UserMiscOptionPasswordReuseIntervalCount struct {
	Value int64
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordReuseIntervalCount added in v1.2.0

func NewUserMiscOptionPasswordReuseIntervalCount(v int64) *UserMiscOptionPasswordReuseIntervalCount

func (*UserMiscOptionPasswordReuseIntervalCount) Format added in v0.6.0

func (*UserMiscOptionPasswordReuseIntervalCount) Free added in v1.2.0

func (UserMiscOptionPasswordReuseIntervalCount) TypeName added in v1.2.0

type UserMiscOptionPasswordReuseIntervalDefault

type UserMiscOptionPasswordReuseIntervalDefault struct {
	// contains filtered or unexported fields
}

func NewUserMiscOptionPasswordReuseIntervalDefault added in v1.2.0

func NewUserMiscOptionPasswordReuseIntervalDefault() *UserMiscOptionPasswordReuseIntervalDefault

func (*UserMiscOptionPasswordReuseIntervalDefault) Format added in v0.6.0

func (*UserMiscOptionPasswordReuseIntervalDefault) Free added in v1.2.0

func (UserMiscOptionPasswordReuseIntervalDefault) TypeName added in v1.2.0

type UsernameRecord

type UsernameRecord struct {
	Username string
	Hostname string
}

type UsingJoinCond

type UsingJoinCond struct {
	JoinCond
	Cols IdentifierList
}

the USING condition

func NewUsingJoinCond

func NewUsingJoinCond(c IdentifierList) *UsingJoinCond

func (*UsingJoinCond) Format

func (node *UsingJoinCond) Format(ctx *FmtCtx)

type Values

type Values interface {
	NodeFormatter
}

type ValuesClause

type ValuesClause struct {
	SelectStatement
	RowWord bool
	Rows    []Exprs
}

the VALUES clause

func NewValuesClause

func NewValuesClause(r []Exprs) *ValuesClause

func (*ValuesClause) Format

func (node *ValuesClause) Format(ctx *FmtCtx)

type ValuesIn

type ValuesIn struct {
	ValueList Exprs
	// contains filtered or unexported fields
}

func NewValuesIn

func NewValuesIn(vl Exprs) *ValuesIn

func (*ValuesIn) Format added in v0.6.0

func (node *ValuesIn) Format(ctx *FmtCtx)

func (*ValuesIn) Free added in v1.2.0

func (node *ValuesIn) Free()

func (ValuesIn) TypeName added in v1.2.0

func (node ValuesIn) TypeName() string

type ValuesLessThan

type ValuesLessThan struct {
	ValueList Exprs
	// contains filtered or unexported fields
}

func NewValuesLessThan

func NewValuesLessThan(vl Exprs) *ValuesLessThan

func (*ValuesLessThan) Format

func (node *ValuesLessThan) Format(ctx *FmtCtx)

func (*ValuesLessThan) Free added in v1.2.0

func (node *ValuesLessThan) Free()

func (ValuesLessThan) TypeName added in v1.2.0

func (node ValuesLessThan) TypeName() string

type ValuesStatement added in v0.6.0

type ValuesStatement struct {
	NodeFormatter
	Rows    []Exprs
	OrderBy OrderBy
	Limit   *Limit
	// contains filtered or unexported fields
}

ValuesStatement the VALUES Statement

func (*ValuesStatement) Format added in v0.6.0

func (node *ValuesStatement) Format(ctx *FmtCtx)

func (*ValuesStatement) Free added in v1.2.0

func (s *ValuesStatement) Free()

func (*ValuesStatement) GetQueryType added in v0.7.0

func (node *ValuesStatement) GetQueryType() string

func (*ValuesStatement) GetStatementType added in v0.7.0

func (node *ValuesStatement) GetStatementType() string

func (*ValuesStatement) StmtKind added in v1.2.0

func (node *ValuesStatement) StmtKind() StmtKind

type VarAssignmentExpr

type VarAssignmentExpr struct {
	NodeFormatter
	System   bool
	Global   bool
	Name     string
	Value    Expr
	Reserved Expr
}

for variable = expr

func NewVarAssignmentExpr

func NewVarAssignmentExpr(s bool, g bool, n string, v Expr, r Expr) *VarAssignmentExpr

func (*VarAssignmentExpr) Format

func (node *VarAssignmentExpr) Format(ctx *FmtCtx)

type VarExpr

type VarExpr struct {
	Name   string
	System bool
	Global bool
	Expr   Expr
	// contains filtered or unexported fields
}

func NewVarExpr

func NewVarExpr(n string, s bool, g bool, e Expr) *VarExpr

func (*VarExpr) Accept added in v0.8.0

func (node *VarExpr) Accept(v Visitor) (Expr, bool)

Accept implements NodeChecker Accept interface.

func (*VarExpr) Format

func (node *VarExpr) Format(ctx *FmtCtx)

incomplete

func (*VarExpr) String

func (node *VarExpr) String() string

type VarName

type VarName interface {
	Expr
}

variable in the scalar expression

func StarExpr

func StarExpr() VarName

type VisibleType

type VisibleType int
const (
	VISIBLE_TYPE_INVALID VisibleType = iota
	VISIBLE_TYPE_VISIBLE
	VISIBLE_TYPE_INVISIBLE
)

func (VisibleType) ToString

func (vt VisibleType) ToString() string

type Visitor

type Visitor interface {
	// Call the 'Enter' method before visiting the children nodes.
	// The node type returned by the `Enter` method must be the same as the input node type
	// SkipChildren returning true means that access to child nodes should be skipped.
	Enter(n Expr) (node Expr, skipChildren bool)

	//`Exit` is called after all children nodes are visited.
	//The returned node of the `Exit` method is `Expr`, which is of the same type as the input node.
	//if `Exit` method returns OK as false ,means stop visiting.
	Exit(n Expr) (node Expr, ok bool)
}

Visitor Design Pattern Visitor visits the ast node or sub ast nodes

type When

type When struct {
	Cond Expr
	Val  Expr
}

When sub-expression.

func NewWhen

func NewWhen(c, v Expr) *When

func (*When) Format

func (node *When) Format(ctx *FmtCtx)

type WhenStmt added in v0.8.0

type WhenStmt struct {
	Cond Expr
	Body []Statement
	// contains filtered or unexported fields
}

func (*WhenStmt) Format added in v0.8.0

func (node *WhenStmt) Format(ctx *FmtCtx)

func (*WhenStmt) Free added in v1.2.0

func (s *WhenStmt) Free()

func (*WhenStmt) GetQueryType added in v0.8.0

func (node *WhenStmt) GetQueryType() string

func (*WhenStmt) GetStatementType added in v0.8.0

func (node *WhenStmt) GetStatementType() string

type Where

type Where struct {
	Type string
	Expr Expr
}

WHERE or HAVING clause.

func NewWhere

func NewWhere(e Expr) *Where

func (*Where) Format

func (node *Where) Format(ctx *FmtCtx)

type WhileStmt added in v0.8.0

type WhileStmt struct {
	Name Identifier
	Cond Expr
	Body []Statement
	// contains filtered or unexported fields
}

func (*WhileStmt) Format added in v0.8.0

func (node *WhileStmt) Format(ctx *FmtCtx)

func (*WhileStmt) Free added in v1.2.0

func (s *WhileStmt) Free()

func (*WhileStmt) GetQueryType added in v0.8.0

func (node *WhileStmt) GetQueryType() string

func (*WhileStmt) GetStatementType added in v0.8.0

func (node *WhileStmt) GetStatementType() string

type WindowSpec added in v0.7.0

type WindowSpec struct {
	PartitionBy Exprs
	OrderBy     OrderBy
	HasFrame    bool
	Frame       *FrameClause
}

func (*WindowSpec) Format added in v0.8.0

func (node *WindowSpec) Format(ctx *FmtCtx)

type With

type With struct {
	IsRecursive bool
	CTEs        []*CTE
	// contains filtered or unexported fields
}

func (*With) Format

func (node *With) Format(ctx *FmtCtx)

func (*With) Free added in v1.2.0

func (s *With) Free()

func (*With) GetQueryType added in v0.7.0

func (node *With) GetQueryType() string

func (*With) GetStatementType added in v0.7.0

func (node *With) GetStatementType() string

type XorExpr

type XorExpr struct {
	Left, Right Expr
	// contains filtered or unexported fields
}

xor expression

func NewXorExpr

func NewXorExpr(l, r Expr) *XorExpr

func (*XorExpr) Accept added in v0.8.0

func (node *XorExpr) Accept(v Visitor) (Expr, bool)

func (*XorExpr) Format

func (node *XorExpr) Format(ctx *FmtCtx)

func (*XorExpr) String

func (node *XorExpr) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL