Documentation
¶
Index ¶
- Constants
- Variables
- func FormatString(str string) string
- func GetDisplayWith(val int32) int32
- func IsValue(node Expr) bool
- func OptionContains(options []OptionElem, option string) bool
- func String(node NodeFormatter, dialectType dialect.DialectType) string
- func StringWithOpts(node NodeFormatter, dialectType dialect.DialectType, opts ...FmtCtxOption) string
- type ATTimeStampType
- type AccessModeType
- type AccountAuthOption
- type AccountComment
- type AccountCommentOrAttribute
- type AccountIdentified
- type AccountIdentifiedOption
- type AccountStatus
- type AccountStatusOption
- type AccountsSetOption
- type AggType
- type AlgorithmCopy
- type AlgorithmDefault
- type AlgorithmInplace
- type AliasClause
- type AliasedTableExpr
- type AllOrNotCDC
- type AlterAccount
- type AlterAccountAuthOption
- type AlterAddCol
- type AlterColPos
- type AlterColumnOptionType
- type AlterColumnOrder
- type AlterDataBaseConfig
- func (node *AlterDataBaseConfig) Format(ctx *FmtCtx)
- func (node *AlterDataBaseConfig) Free()
- func (node *AlterDataBaseConfig) GetQueryType() string
- func (node *AlterDataBaseConfig) GetStatementType() string
- func (node *AlterDataBaseConfig) StmtKind() StmtKind
- func (node AlterDataBaseConfig) TypeName() string
- type AlterOptionAdd
- type AlterOptionAlterAutoUpdate
- type AlterOptionAlterCheck
- type AlterOptionAlterIndex
- type AlterOptionAlterReIndex
- type AlterOptionDrop
- type AlterOptionTableName
- type AlterPartitionAddPartitionClause
- type AlterPartitionDropPartitionClause
- type AlterPartitionOption
- type AlterPartitionOptionType
- type AlterPartitionRedefinePartitionClause
- type AlterPartitionTruncatePartitionClause
- type AlterPitr
- type AlterPublication
- type AlterRole
- type AlterRoleAddRule
- type AlterRoleDropRule
- type AlterSQLTask
- type AlterSequence
- type AlterStage
- type AlterTable
- type AlterTableAddColumnClause
- type AlterTableAlterColumnClause
- type AlterTableChangeColumnClause
- type AlterTableDropType
- type AlterTableModifyColumnClause
- type AlterTableOption
- type AlterTableOptionType
- type AlterTableOptions
- type AlterTableOrderByColumnClause
- type AlterTableRenameColumnClause
- type AlterTaskAction
- type AlterUser
- type AlterView
- type AnalyzeStmt
- type AndExpr
- type ApplyCond
- type ApplyTableExpr
- type Assignment
- type AtTimeStamp
- type AttributeAutoIncrement
- type AttributeAutoRandom
- type AttributeCheckConstraint
- type AttributeCollate
- type AttributeColumnFormat
- type AttributeComment
- type AttributeDefault
- type AttributeGeneratedAlways
- type AttributeHeader
- type AttributeHeaders
- type AttributeKey
- type AttributeLowCardinality
- type AttributeNull
- type AttributeOnUpdate
- type AttributePrimaryKey
- type AttributeReference
- type AttributeSRID
- type AttributeStorage
- type AttributeUnique
- type AttributeUniqueKey
- type AttributeVisable
- type AuthRecord
- type BackupStart
- type BeginCompound
- type BeginTransaction
- type BinaryExpr
- type BinaryOp
- type BitCastExpr
- type BoundType
- type CStr
- type CStrParts
- type CTE
- type CallStmt
- type CancelDaemonTask
- type CaseExpr
- type CaseStmt
- type CastExpr
- type CheckIndex
- type CheckSnapshotFlushed
- type CloneDatabase
- type CloneLevelCtxKey
- type CloneLevelType
- type CloneStmtType
- type CloneTable
- type ClusterByOption
- type ColumnAttribute
- type ColumnItem
- type ColumnPosition
- type ColumnPositionType
- type ColumnTableDef
- type CommitTransaction
- type ComparisonExpr
- func NewComparisonExpr(op ComparisonOp, l, r Expr) *ComparisonExpr
- func NewComparisonExprWithEscape(op ComparisonOp, l, r, e Expr) *ComparisonExpr
- func NewComparisonExprWithSubop(op, subop ComparisonOp, l, r Expr) *ComparisonExpr
- func NewSubqueryComparisonExpr(op ComparisonOp, subOp ComparisonOp, l, r Expr) *ComparisonExpr
- type ComparisonOp
- type CompletionType
- type CompoundStmt
- type ConflictOpt
- type ConnectorOption
- type CreateAccount
- type CreateCDC
- type CreateCDCOption
- type CreateConnector
- type CreateDatabase
- type CreateExtension
- type CreateFunction
- func (node *CreateFunction) Format(ctx *FmtCtx)
- func (node *CreateFunction) Free()
- func (node *CreateFunction) GetQueryType() string
- func (node *CreateFunction) GetStatementType() string
- func (node *CreateFunction) StmtKind() StmtKind
- func (node CreateFunction) TypeName() string
- func (node *CreateFunction) Valid() error
- type CreateIndex
- type CreateOption
- type CreateOptionCharset
- type CreateOptionCollate
- type CreateOptionDefault
- type CreateOptionEncryption
- type CreatePitr
- type CreateProcedure
- type CreatePublication
- type CreateRole
- type CreateSQLTask
- type CreateSequence
- type CreateSnapShot
- type CreateSource
- type CreateSourceWithOption
- type CreateStage
- type CreateSubscription
- func (node *CreateSubscription) Format(ctx *FmtCtx)
- func (node *CreateSubscription) Free()
- func (node *CreateSubscription) GetQueryType() string
- func (node *CreateSubscription) GetStatementType() string
- func (node *CreateSubscription) SetAccountName(name string)
- func (node *CreateSubscription) SetIfNotExists(ifNotExists bool)
- func (node *CreateSubscription) StmtKind() StmtKind
- func (node CreateSubscription) TypeName() string
- type CreateTable
- type CreateUser
- type CreateView
- type CycleOption
- type DBool
- type DataBranchCreateDatabase
- func (d *DataBranchCreateDatabase) DataBranchType() DataBranchType
- func (d *DataBranchCreateDatabase) Format(ctx *FmtCtx)
- func (d *DataBranchCreateDatabase) Free()
- func (d *DataBranchCreateDatabase) GetQueryType() string
- func (d *DataBranchCreateDatabase) GetStatementType() string
- func (d *DataBranchCreateDatabase) StmtKind() StmtKind
- func (d *DataBranchCreateDatabase) String() string
- func (d *DataBranchCreateDatabase) TypeName() string
- type DataBranchCreateTable
- func (d *DataBranchCreateTable) DataBranchType() DataBranchType
- func (d *DataBranchCreateTable) Format(ctx *FmtCtx)
- func (d *DataBranchCreateTable) Free()
- func (d *DataBranchCreateTable) GetQueryType() string
- func (d *DataBranchCreateTable) GetStatementType() string
- func (d *DataBranchCreateTable) StmtKind() StmtKind
- func (d *DataBranchCreateTable) String() string
- func (d *DataBranchCreateTable) TypeName() string
- type DataBranchDeleteDatabase
- func (d *DataBranchDeleteDatabase) DataBranchType() DataBranchType
- func (d *DataBranchDeleteDatabase) Format(ctx *FmtCtx)
- func (d *DataBranchDeleteDatabase) Free()
- func (d *DataBranchDeleteDatabase) GetQueryType() string
- func (d *DataBranchDeleteDatabase) GetStatementType() string
- func (d *DataBranchDeleteDatabase) StmtKind() StmtKind
- func (d *DataBranchDeleteDatabase) String() string
- func (d *DataBranchDeleteDatabase) TypeName() string
- type DataBranchDeleteTable
- func (d *DataBranchDeleteTable) DataBranchType() DataBranchType
- func (d *DataBranchDeleteTable) Format(ctx *FmtCtx)
- func (d *DataBranchDeleteTable) Free()
- func (d *DataBranchDeleteTable) GetQueryType() string
- func (d *DataBranchDeleteTable) GetStatementType() string
- func (d *DataBranchDeleteTable) StmtKind() StmtKind
- func (d *DataBranchDeleteTable) String() string
- func (d *DataBranchDeleteTable) TypeName() string
- type DataBranchDiff
- func (s *DataBranchDiff) Format(ctx *FmtCtx)
- func (s *DataBranchDiff) Free()
- func (s *DataBranchDiff) GetQueryType() string
- func (s *DataBranchDiff) GetStatementType() string
- func (s *DataBranchDiff) StmtKind() StmtKind
- func (s *DataBranchDiff) String() string
- func (s *DataBranchDiff) TypeName() string
- type DataBranchMerge
- func (s *DataBranchMerge) Format(ctx *FmtCtx)
- func (s *DataBranchMerge) Free()
- func (s *DataBranchMerge) GetQueryType() string
- func (s *DataBranchMerge) GetStatementType() string
- func (s *DataBranchMerge) StmtKind() StmtKind
- func (s *DataBranchMerge) String() string
- func (s *DataBranchMerge) TypeName() string
- type DataBranchPick
- func (s *DataBranchPick) Format(ctx *FmtCtx)
- func (s *DataBranchPick) Free()
- func (s *DataBranchPick) GetQueryType() string
- func (s *DataBranchPick) GetStatementType() string
- func (s *DataBranchPick) StmtKind() StmtKind
- func (s *DataBranchPick) String() string
- func (s *DataBranchPick) TypeName() string
- type DataBranchType
- type DatabaseConfig
- type Datum
- type Deallocate
- type Declare
- type DefaultVal
- type Delete
- type DiffOutputOpt
- type Direction
- type Do
- type DropAccount
- type DropCDC
- type DropCcprSubscription
- func (node *DropCcprSubscription) Format(ctx *FmtCtx)
- func (node *DropCcprSubscription) Free()
- func (node *DropCcprSubscription) GetQueryType() string
- func (node *DropCcprSubscription) GetStatementType() string
- func (node *DropCcprSubscription) StmtKind() StmtKind
- func (node DropCcprSubscription) TypeName() string
- type DropConnector
- type DropDatabase
- type DropFunction
- type DropIndex
- type DropPitr
- type DropProcedure
- type DropPublication
- type DropRole
- type DropSQLTask
- type DropSequence
- type DropSnapShot
- type DropStage
- type DropTable
- type DropUser
- type DropView
- type DuplicateKey
- type DuplicateKeyError
- type DuplicateKeyIgnore
- type DuplicateKeyReplace
- type ElseIfStmt
- type EmptyStmt
- type EnclosedBy
- type EndCompound
- type EscapedBy
- type ExParam
- type ExParamConst
- type ExecLocation
- type Execute
- type ExecuteSQLTask
- type Explain
- type ExplainAnalyze
- type ExplainFor
- type ExplainPhyPlan
- type ExplainStmt
- type ExportParam
- type Expr
- type ExprList
- type Exprs
- type ExternParam
- type Family
- type Fields
- type Fill
- type FillMode
- type FmtCtx
- type FmtCtxOption
- type ForeignKey
- type FrameBound
- type FrameClause
- type FrameType
- type From
- type FullTextIndex
- type FullTextMatchExpr
- type FullTextSearchType
- type FuncExpr
- type FuncType
- type FunctionArg
- type FunctionArgDecl
- type FunctionArgImpl
- type FunctionArgs
- type FunctionLanguage
- type FunctionName
- type FunctionReference
- type GeoMetadata
- type GetDdl
- type GetObject
- type Grant
- type GrantPrivilege
- type GrantProxy
- type GrantRole
- type GrantType
- type GroupByClause
- type HashType
- type HivePartColType
- type Identifier
- type IdentifierList
- type IdentifierName
- type IfStmt
- type InOutArgType
- type IncrementByOption
- type Index
- type IndexCategory
- type IndexHint
- type IndexHintScope
- type IndexHintType
- type IndexOption
- type IndexType
- type Insert
- type InternalType
- type Interval
- type IntervalDurationField
- type IntervalExpr
- type IntervalType
- type IsFalseExpr
- type IsNotFalseExpr
- type IsNotNullExpr
- type IsNotTrueExpr
- type IsNotUnknownExpr
- type IsNullExpr
- type IsTrueExpr
- type IsUnknownExpr
- type IsolationLevelType
- type IterateStmt
- type JoinCond
- type JoinTableExpr
- type KeyPart
- type KeyType
- type Kill
- type KillOption
- type KillType
- type LeaveStmt
- type LengthScaleOpt
- type Limit
- type Lines
- type ListType
- type Load
- type LoadColumn
- type LoadExtension
- type LockDefault
- type LockExclusive
- type LockNone
- type LockShared
- type LockTableStmt
- type LoopStmt
- type MatchType
- type MaxValue
- type MaxValueOption
- type MinValueOption
- type MiscOption
- type MoDump
- type NaturalJoinCond
- type NodeChecker
- type NodeFormatter
- type NotExpr
- type NullsPosition
- type NumVal
- func (node *NumVal) Accept(v Visitor) (Expr, bool)
- func (node *NumVal) Bool() bool
- func (node *NumVal) Float64() (float64, bool)
- func (node *NumVal) Format(ctx *FmtCtx)
- func (node *NumVal) Int64() (int64, bool)
- func (node *NumVal) Kind() P_KIND
- func (node *NumVal) Negative() bool
- func (node *NumVal) String() string
- func (node *NumVal) Uint64() (uint64, bool)
- type ObjectInfo
- type ObjectList
- type ObjectName
- type ObjectNamePrefix
- type ObjectType
- type OnJoinCond
- type OptionElem
- type OrExpr
- type Order
- type OrderBy
- type OutputType
- type P_KIND
- type P_TYPE
- type ParamExpr
- type ParenExpr
- type ParenSelect
- type ParenTableExpr
- type Partition
- type PartitionBy
- type PartitionOption
- type PartitionType
- type PauseCDC
- type PauseCcprSubscription
- func (node *PauseCcprSubscription) Format(ctx *FmtCtx)
- func (node *PauseCcprSubscription) Free()
- func (node *PauseCcprSubscription) GetQueryType() string
- func (node *PauseCcprSubscription) GetStatementType() string
- func (node *PauseCcprSubscription) StmtKind() StmtKind
- func (node PauseCcprSubscription) TypeName() string
- type PauseDaemonTask
- type PersistentUserDefinedTypeMetadata
- type PickKeys
- type PickKeysType
- type PitrLevel
- type Precedence
- type Prepare
- type PrepareStmt
- type PrepareString
- type PrepareVar
- type PrimaryKeyIndex
- type Privilege
- type PrivilegeLevel
- type PrivilegeLevelType
- type PrivilegeType
- type ProcedureArg
- type ProcedureArgDecl
- type ProcedureArgForMarshal
- type ProcedureArgImpl
- type ProcedureArgType
- type ProcedureArgs
- type ProcedureName
- type Property
- type RangeCond
- type RangeType
- type RankOption
- type ReadWriteMode
- type RecoveryWindowLevel
- type ReferenceOnRecord
- type ReferenceOptionType
- type ReleaseSavePoint
- type RemoveStageFiles
- type RenameTable
- type RepeatStmt
- type Replace
- type Reset
- type ResolvableFunctionReference
- type ResolvableTypeReference
- type ResourceOption
- type ResourceOptionMaxConnectionPerHour
- type ResourceOptionMaxQueriesPerHour
- type ResourceOptionMaxUpdatesPerHour
- type ResourceOptionMaxUserConnections
- type RespType
- type RestartCDC
- type RestoreLevel
- type RestorePitr
- type RestoreSnapShot
- type ResumeCDC
- type ResumeCcprSubscription
- func (node *ResumeCcprSubscription) Format(ctx *FmtCtx)
- func (node *ResumeCcprSubscription) Free()
- func (node *ResumeCcprSubscription) GetQueryType() string
- func (node *ResumeCcprSubscription) GetStatementType() string
- func (node *ResumeCcprSubscription) StmtKind() StmtKind
- func (node ResumeCcprSubscription) TypeName() string
- type ResumeDaemonTask
- type ReturnType
- type Revoke
- type RevokePrivilege
- type RevokeRole
- type RevokeType
- type Rewrite
- type RewriteOption
- type Role
- type RollbackToSavePoint
- type RollbackTransaction
- type RowFormatType
- type S3Parameter
- type SQLTaskSchedule
- type SampleExpr
- func NewSamplePercentFuncExpression1(percent int64, isStar bool, columns Exprs) (*SampleExpr, error)
- func NewSamplePercentFuncExpression2(percent float64, isStar bool, columns Exprs) (*SampleExpr, error)
- func NewSampleRowsFuncExpression(number int, isStar bool, columns Exprs, sampleUnit string) (*SampleExpr, error)
- func (s SampleExpr) Accept(v Visitor) (node Expr, ok bool)
- func (s SampleExpr) Format(ctx *FmtCtx)
- func (s SampleExpr) GetColumns() (columns Exprs, isStar bool)
- func (s SampleExpr) GetSampleDetail() (isSampleRows bool, usingRow bool, n int32, k float64)
- func (s SampleExpr) String() string
- func (s SampleExpr) Valid() error
- type SavePoint
- type SecondaryRoleType
- type Select
- type SelectClause
- type SelectExpr
- type SelectExprs
- type SelectLockInfo
- type SelectLockType
- type SelectStatement
- type SerialExtractExpr
- type SetConnectionID
- type SetDefaultRole
- type SetDefaultRoleType
- type SetLogserviceSettings
- type SetPassword
- type SetRole
- type SetRoleType
- type SetTransaction
- type SetVar
- type Show
- type ShowAccountUpgrade
- type ShowAccounts
- type ShowBackendServers
- type ShowCDC
- type ShowCcprSubscriptions
- type ShowCollation
- type ShowColumnNumber
- type ShowColumns
- type ShowConnectors
- type ShowCreateDatabase
- type ShowCreatePublications
- type ShowCreateTable
- type ShowCreateView
- type ShowDatabases
- type ShowErrors
- type ShowFunctionOrProcedureStatus
- func (node *ShowFunctionOrProcedureStatus) Format(ctx *FmtCtx)
- func (s *ShowFunctionOrProcedureStatus) Free()
- func (node *ShowFunctionOrProcedureStatus) GetQueryType() string
- func (node *ShowFunctionOrProcedureStatus) GetStatementType() string
- func (node *ShowFunctionOrProcedureStatus) StmtKind() StmtKind
- type ShowGrantType
- type ShowGrants
- type ShowIndex
- type ShowLocks
- type ShowLogserviceReplicas
- type ShowLogserviceSettings
- type ShowLogserviceStores
- type ShowNodeList
- type ShowPitr
- type ShowProcessList
- type ShowPublicationCoverage
- type ShowPublications
- type ShowRecoveryWindow
- type ShowRolesStmt
- type ShowRules
- type ShowSQLTaskRuns
- type ShowSQLTasks
- type ShowSequences
- type ShowSnapShots
- type ShowStages
- type ShowStatus
- type ShowSubscriptions
- type ShowTableNumber
- type ShowTableSize
- type ShowTableStatus
- type ShowTableValues
- type ShowTables
- type ShowTarget
- type ShowType
- type ShowVariables
- type ShowWarnings
- type Sliding
- type SnapshotLevel
- type SnapshotLevelType
- type StageComment
- type StageCredentials
- type StageStatus
- type StageStatusOption
- type StageUrl
- type StartWithOption
- type Statement
- type StatementOption
- type StatementSource
- type StatementType
- type StmtKind
- type StrVal
- type SubPartition
- type Subquery
- type SubqueryExpr
- type SubscriptionOption
- type T
- type TableDef
- type TableDefs
- type TableExpr
- type TableExprs
- type TableFunction
- type TableLock
- type TableLockType
- type TableName
- type TableNames
- type TableOption
- type TableOptionAUTOEXTEND_SIZE
- type TableOptionAutoIncrement
- type TableOptionAvgRowLength
- type TableOptionCharset
- type TableOptionChecksum
- type TableOptionCollate
- type TableOptionComment
- type TableOptionCompression
- type TableOptionConnection
- type TableOptionDataDirectory
- type TableOptionDelayKeyWrite
- type TableOptionEncryption
- type TableOptionEngine
- type TableOptionEngineAttr
- type TableOptionIndexDirectory
- type TableOptionInsertMethod
- type TableOptionKeyBlockSize
- type TableOptionMaxRows
- type TableOptionMinRows
- type TableOptionPackKeys
- type TableOptionPassword
- type TableOptionProperties
- type TableOptionRowFormat
- type TableOptionSecondaryEngine
- type TableOptionSecondaryEngineAttr
- type TableOptionSecondaryEngineNull
- type TableOptionStartTrans
- type TableOptionStatsAutoRecalc
- type TableOptionStatsPersistent
- type TableOptionStatsSamplePages
- type TableOptionStorageMedia
- type TableOptionTablespace
- type TableOptionUnion
- type TailParameter
- type Target
- type Terminated
- type TimeUnitExpr
- type TimeWindow
- type TlsOption
- type TlsOptionCipher
- type TlsOptionIssuer
- type TlsOptionNone
- type TlsOptionSSL
- type TlsOptionSan
- type TlsOptionSubject
- type TlsOptionX509
- type ToAccountOpt
- type TransactionCharacteristic
- type TransactionModes
- type TruncateTable
- type Tuple
- type TypeExpr
- type TypeOption
- type UnLockTableStmt
- type UnaryExpr
- type UnaryOp
- type UnionClause
- type UnionType
- type UnionTypeRecord
- type UniqueIndex
- type UnqualifiedStar
- type UnresolvedName
- func (node *UnresolvedName) Accept(v Visitor) (Expr, bool)
- func (node *UnresolvedName) ColName() string
- func (node *UnresolvedName) ColNameOrigin() string
- func (node *UnresolvedName) DbName() string
- func (node *UnresolvedName) DbNameOrigin() string
- func (node *UnresolvedName) Format(ctx *FmtCtx)
- func (node *UnresolvedName) String() string
- func (node *UnresolvedName) TblName() string
- func (node *UnresolvedName) TblNameOrigin() string
- type UnresolvedObjectName
- type UnrestrictedIdentifier
- type Update
- type UpdateExpr
- type UpdateExprs
- type UpdateVal
- type UpgradeStatement
- type Use
- type User
- type UserMiscOption
- type UserMiscOptionAccountLock
- type UserMiscOptionAccountUnlock
- type UserMiscOptionFailedLoginAttempts
- type UserMiscOptionPasswordExpireDefault
- type UserMiscOptionPasswordExpireInterval
- type UserMiscOptionPasswordExpireNever
- type UserMiscOptionPasswordExpireNone
- type UserMiscOptionPasswordHistoryCount
- type UserMiscOptionPasswordHistoryDefault
- type UserMiscOptionPasswordLockTimeCount
- type UserMiscOptionPasswordLockTimeUnbounded
- type UserMiscOptionPasswordRequireCurrentDefault
- type UserMiscOptionPasswordRequireCurrentNone
- type UserMiscOptionPasswordRequireCurrentOptional
- type UserMiscOptionPasswordReuseIntervalCount
- type UserMiscOptionPasswordReuseIntervalDefault
- type UsernameRecord
- type UsingJoinCond
- type Values
- type ValuesClause
- type ValuesIn
- type ValuesLessThan
- type ValuesStatement
- type VarAssignmentExpr
- type VarExpr
- type VarName
- type VisibleType
- type Visitor
- type When
- type WhenStmt
- type Where
- type WhileStmt
- type WindowSpec
- type With
- type XorExpr
Constants ¶
const ( CONFLICT_FAIL = iota CONFLICT_SKIP CONFLICT_ACCEPT )
const ( PhyPlanOption = "phyplan" AnalyzeOption = "analyze" VerboseOption = "verbose" ForceOption = "force" CheckOption = "check" FormatOption = "format" )
const ( SampleRows sampleType = 0 SamplePercent sampleType = 1 SampleUsingBlock sampleLevel = 0 SampleUsingRow sampleLevel = 1 )
const ( QuerySpecOptionNone uint64 = 0 QuerySpecOptionAll uint64 = 1 << 1 QuerySpecOptionDistinct uint64 = 1 << 2 QuerySpecOptionDistinctRow uint64 = 1 << 3 QuerySpecOptionHighPriority uint64 = 1 << 4 QuerySpecOptionStraightJoin uint64 = 1 << 5 QuerySpecOptionSqlSmallResult uint64 = 1 << 6 QuerySpecOptionSqlBigResult uint64 = 1 << 7 QuerySpecOptionSqlBufferResult uint64 = 1 << 8 QuerySpecOptionSqlNoCache uint64 = 1 << 9 QuerySpecOptionSqlCalcFoundRows uint64 = 1 << 10 )
const ( AstWhere = "where" AstHaving = "having" )
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" JOIN_TYPE_NATURAL_FULL = "NATURAL FULL" JOIN_TYPE_CENTROIDX = "CENTROIDX" JOIN_TYPE_DEDUP = "DEDUP" )
const ( APPLY_TYPE_CROSS = "CROSS APPLY" APPLY_TYPE_OUTER = "OUTER APPLY" )
const ( ShowEngines = iota ShowCharset ShowCreateUser ShowTriggers ShowConfig ShowEvents ShowPlugins ShowProfile ShowProfiles ShowPrivileges )
const ( GrantForUser = iota GrantForRole )
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" )
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 )
const ( DefaultDisplayWidth = -1 NotDefineDisplayWidth = 0 NotDefineDec = -1 )
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" )
const ( CSV = "csv" JSONLINE = "jsonline" PARQUET = "parquet" )
load data fotmat
const ( OBJECT = "object" ARRAY = "array" )
if $format is jsonline
const ( INFILE = 0 S3 = 1 INLINE = 2 )
const ( DefaultFieldsTerminated = "," DefaultFieldsEnclosedBy = "\"" DefaultFieldsEscapedBy = "\\" )
Variables ¶
var ( DBoolTrue = &constDBoolTrue DBoolFalse = &constDBoolFalse DNull Datum = &dNull{} )
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), }} )
var ( QuerySpecOptionNames = map[uint64]string{ QuerySpecOptionNone: "none", QuerySpecOptionAll: "all", QuerySpecOptionDistinct: "distinct", QuerySpecOptionDistinctRow: "distinctrow", QuerySpecOptionHighPriority: "high_priority", QuerySpecOptionStraightJoin: "straight_join", QuerySpecOptionSqlSmallResult: "sql_small_result", QuerySpecOptionSqlBigResult: "sql_big_result", QuerySpecOptionSqlBufferResult: "sql_buffer_result", QuerySpecOptionSqlNoCache: "sql_no_cache", QuerySpecOptionSqlCalcFoundRows: "sql_calc_found_rows", } )
Functions ¶
func FormatString ¶ added in v0.5.0
func GetDisplayWith ¶
func IsValue ¶
IsValue returns true if the Expr is a string, integral or value arg. NULL is not considered to be a value.
func OptionContains ¶
func OptionContains(options []OptionElem, option string) bool
OptionContains checks if the option is in the options list and returns the value of the option
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 ASOFTIMESTAMP )
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
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
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 string, i IdentifierList) *AliasedTableExpr
func (*AliasedTableExpr) Format ¶
func (node *AliasedTableExpr) Format(ctx *FmtCtx)
type AllOrNotCDC ¶
type AllOrNotCDC struct {
TaskName Identifier
All bool
}
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
ConfigType DatabaseConfig
UpdateConfig string
// contains filtered or unexported fields
}
func NewAlterDataBaseConfig ¶ added in v1.2.0
func NewAlterDataBaseConfig(accountName, dbName string, isAccountLevel bool, configType DatabaseConfig, 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 AlterOptionAlterAutoUpdate ¶
type AlterOptionAlterAutoUpdate struct {
Name Identifier
KeyType IndexType
AutoUpdate bool
Day int64
Hour int64
// contains filtered or unexported fields
}
func NewAlterOptionAlterAutoUpdate ¶
func NewAlterOptionAlterAutoUpdate(name Identifier, option *IndexOption) *AlterOptionAlterAutoUpdate
func (*AlterOptionAlterAutoUpdate) Format ¶
func (node *AlterOptionAlterAutoUpdate) Format(ctx *FmtCtx)
func (*AlterOptionAlterAutoUpdate) Free ¶
func (node *AlterOptionAlterAutoUpdate) Free()
func (AlterOptionAlterAutoUpdate) TypeName ¶
func (node AlterOptionAlterAutoUpdate) 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
// Mirrors tree.IndexOption (create.go): the REINDEX rule shares
// index_option_list with CREATE INDEX, so all options parse. They are carried
// here (not dropped) so the compile phase can read the full set off the parse
// tree and each algorithm's Compile.ValidateReindexParams hook can merge the
// options it honors on a rebuild and reject the rest, instead of silently
// dropping them.
KeyBlockSize uint64
ParserName string
Comment string
Visible VisibleType
EngineAttribute string
SecondaryEngineAttribute string
AlgoParamList int64
AlgoParamVectorOpType string
AlgoParamM int64
HnswEfConstruction int64
HnswEfSearch int64
BitsPerCode int64
Async bool
ForceSync bool
AutoUpdate bool
Day int64
Hour int64
IntermediateGraphDegree int64
GraphDegree int64
Quantization string
DistributionMode string
ITopkSize int64
KmeansTrainPercent int64
KmeansMaxIteration int64
MaxIndexCapacity int64
IncludeColumns []*UnresolvedName
// contains filtered or unexported fields
}
func NewAlterOptionAlterReIndex ¶ added in v1.2.0
func NewAlterOptionAlterReIndex(name Identifier, option *IndexOption) *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 (node *AlterPartitionRedefinePartitionClause) Free()
func (AlterPartitionRedefinePartitionClause) TypeName ¶ added in v1.2.0
func (node AlterPartitionRedefinePartitionClause) TypeName() string
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 (node *AlterPartitionTruncatePartitionClause) Free()
func (AlterPartitionTruncatePartitionClause) TypeName ¶ added in v1.2.0
func (node AlterPartitionTruncatePartitionClause) TypeName() string
type AlterPitr ¶
type AlterPitr struct {
IfExists bool
Name Identifier // pitr name
PitrValue int64
PitrUnit string
// contains filtered or unexported fields
}
func NewAlterPitr ¶
func NewAlterPitr(ifExists bool, Name Identifier, PitrValue int64, PitrUnit string) *AlterPitr
func (*AlterPitr) GetQueryType ¶
func (*AlterPitr) GetStatementType ¶
type AlterPublication ¶ added in v0.8.0
type AlterPublication struct {
IfExists bool
Name Identifier
AccountsSet *AccountsSetOption
DbName string
Table TableNames
Comment string
// contains filtered or unexported fields
}
func NewAlterPublication ¶ added in v1.2.0
func NewAlterPublication(exist bool, name Identifier, accountsSet *AccountsSetOption, dbName string, table TableNames, 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 AlterRole ¶
type AlterRole struct {
IfExists bool
OldName string
NewName string
// contains filtered or unexported fields
}
func (*AlterRole) GetQueryType ¶
func (*AlterRole) GetStatementType ¶
type AlterRoleAddRule ¶
type AlterRoleAddRule struct {
RoleName string
RuleName string // 规则名称,字符串字面量
RuleSQL string // 改写 SQL,字符串字面量
DbName string // 目标数据库名
TblName string // 目标表名
// contains filtered or unexported fields
}
AlterRoleAddRule represents ALTER ROLE <role> ADD RULE <rule_sql> ON TABLE <db>.<tbl>
func NewAlterRoleAddRule ¶
func NewAlterRoleAddRule(roleName, ruleName, ruleSQL, dbName, tblName string) *AlterRoleAddRule
func (*AlterRoleAddRule) Format ¶
func (node *AlterRoleAddRule) Format(ctx *FmtCtx)
func (*AlterRoleAddRule) Free ¶
func (node *AlterRoleAddRule) Free()
func (*AlterRoleAddRule) GetQueryType ¶
func (node *AlterRoleAddRule) GetQueryType() string
func (*AlterRoleAddRule) GetStatementType ¶
func (node *AlterRoleAddRule) GetStatementType() string
func (*AlterRoleAddRule) StmtKind ¶
func (node *AlterRoleAddRule) StmtKind() StmtKind
func (AlterRoleAddRule) TypeName ¶
func (node AlterRoleAddRule) TypeName() string
type AlterRoleDropRule ¶
type AlterRoleDropRule struct {
RoleName string
DbName string
TblName string
// contains filtered or unexported fields
}
AlterRoleDropRule represents ALTER ROLE <role> DROP RULE ON TABLE <db>.<tbl>
func NewAlterRoleDropRule ¶
func NewAlterRoleDropRule(roleName, dbName, tblName string) *AlterRoleDropRule
func (*AlterRoleDropRule) Format ¶
func (node *AlterRoleDropRule) Format(ctx *FmtCtx)
func (*AlterRoleDropRule) Free ¶
func (node *AlterRoleDropRule) Free()
func (*AlterRoleDropRule) GetQueryType ¶
func (node *AlterRoleDropRule) GetQueryType() string
func (*AlterRoleDropRule) GetStatementType ¶
func (node *AlterRoleDropRule) GetStatementType() string
func (*AlterRoleDropRule) StmtKind ¶
func (node *AlterRoleDropRule) StmtKind() StmtKind
func (AlterRoleDropRule) TypeName ¶
func (node AlterRoleDropRule) TypeName() string
type AlterSQLTask ¶
type AlterSQLTask struct {
Name Identifier
Action AlterTaskAction
CronExpr string
Timezone string
GateCondition string
RetryLimit int64
Timeout string
// contains filtered or unexported fields
}
func (*AlterSQLTask) Format ¶
func (node *AlterSQLTask) Format(ctx *FmtCtx)
func (*AlterSQLTask) GetQueryType ¶
func (node *AlterSQLTask) GetQueryType() string
func (*AlterSQLTask) GetStatementType ¶
func (node *AlterSQLTask) GetStatementType() string
func (*AlterSQLTask) StmtKind ¶
func (node *AlterSQLTask) StmtKind() StmtKind
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
DefaultExpr *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 AlterTaskAction ¶
type AlterTaskAction int
const ( AlterTaskSuspend AlterTaskAction = iota AlterTaskResume AlterTaskSetSchedule AlterTaskSetWhen AlterTaskSetRetry AlterTaskSetTimeout )
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) GetQueryType ¶ added in v0.7.0
func (*AlterUser) GetStatementType ¶ added in v0.7.0
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) GetQueryType ¶ added in v0.7.0
func (*AlterView) GetStatementType ¶ added in v0.7.0
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 ¶
type ApplyCond ¶
type ApplyCond interface {
NodeFormatter
}
type ApplyTableExpr ¶
func (*ApplyTableExpr) Format ¶
func (node *ApplyTableExpr) Format(ctx *FmtCtx)
type Assignment ¶
type Assignment struct {
Column Identifier
Expr Expr
}
type AtTimeStamp ¶ added in v1.2.0
type AtTimeStamp struct {
Type ATTimeStampType
SnapshotName string
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 NewAttributeReference ¶
func NewAttributeReference(t *TableName, kps []*KeyPart, m MatchType, od ReferenceOptionType, ou ReferenceOptionType, ) *AttributeReference
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 AttributeSRID ¶
type AttributeSRID struct {
Value uint32
// contains filtered or unexported fields
}
func NewAttributeSRID ¶
func NewAttributeSRID(v uint32) *AttributeSRID
func (*AttributeSRID) Format ¶
func (node *AttributeSRID) Format(ctx *FmtCtx)
func (*AttributeSRID) Free ¶
func (node *AttributeSRID) Free()
func (AttributeSRID) TypeName ¶
func (node AttributeSRID) 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 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 (*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) 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) 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)
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)
type CTE ¶
type CTE struct {
Name *AliasClause
Stmt Statement
}
type CallStmt ¶ added in v0.8.0
type CallStmt struct {
Name *ProcedureName
Args Exprs
// contains filtered or unexported fields
}
func (*CallStmt) GetQueryType ¶ added in v0.8.0
func (*CallStmt) GetStatementType ¶ added in v0.8.0
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) 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.
type CaseStmt ¶ added in v0.8.0
type CaseStmt struct {
Expr Expr
Whens []*WhenStmt
Else []Statement
// contains filtered or unexported fields
}
func (*CaseStmt) GetQueryType ¶ added in v0.8.0
func (*CaseStmt) GetStatementType ¶ added in v0.8.0
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
type CheckIndex ¶
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 CheckSnapshotFlushed ¶
type CheckSnapshotFlushed struct {
Name Identifier // snapshot name
AccountName Identifier // account name for authorization
PublicationName Identifier // publication name
// contains filtered or unexported fields
}
func (*CheckSnapshotFlushed) Format ¶
func (node *CheckSnapshotFlushed) Format(ctx *FmtCtx)
func (*CheckSnapshotFlushed) GetQueryType ¶
func (node *CheckSnapshotFlushed) GetQueryType() string
func (*CheckSnapshotFlushed) GetStatementType ¶
func (node *CheckSnapshotFlushed) GetStatementType() string
func (*CheckSnapshotFlushed) StmtKind ¶
func (node *CheckSnapshotFlushed) StmtKind() StmtKind
type CloneDatabase ¶
type CloneDatabase struct {
SrcDatabase Identifier
DstDatabase Identifier
AtTsExpr *AtTimeStamp
ToAccountOpt *ToAccountOpt
// contains filtered or unexported fields
}
func NewCloneDatabase ¶
func NewCloneDatabase() *CloneDatabase
func (*CloneDatabase) Format ¶
func (node *CloneDatabase) Format(ctx *FmtCtx)
func (*CloneDatabase) Free ¶
func (node *CloneDatabase) Free()
func (*CloneDatabase) GetQueryType ¶
func (node *CloneDatabase) GetQueryType() string
func (*CloneDatabase) GetStatementType ¶
func (node *CloneDatabase) GetStatementType() string
func (*CloneDatabase) StmtKind ¶
func (node *CloneDatabase) StmtKind() StmtKind
func (*CloneDatabase) TypeName ¶
func (node *CloneDatabase) TypeName() string
type CloneLevelCtxKey ¶
type CloneLevelCtxKey struct{}
type CloneLevelType ¶
type CloneLevelType uint64
const ( NormalCloneLevelTable CloneLevelType = 1 << iota NormalCloneLevelDatabase NormalCloneLevelAccount NormalCloneLevelCluster RestoreCloneLevelTable RestoreCloneLevelDatabase RestoreCloneLevelAccount RestoreCloneLevelCluster )
type CloneStmtType ¶
type CloneStmtType int
const ( NoClone CloneStmtType = iota CloneCluster CloneAccount WithinAccCloneDB BetweenAccCloneDB WithinDBCloneTable WithinAccBetweenDBCloneTable BetweenAccCloneTable )
func DecideCloneStmtType ¶
func DecideCloneStmtType( ctx context.Context, stmt *CloneTable, srcDbName string, dstDbName string, toAccount uint32, srcAccount uint32, subMeta *plan2.SubscriptionMeta, ) (cloneType CloneStmtType)
type CloneTable ¶
type CloneTable struct {
SrcTable TableName
CreateTable CreateTable
IsRestore bool
IsRestoreByTS bool
FromAccount uint32
ToAccountOpt *ToAccountOpt
ToAccountId uint32
Sql string
StmtType CloneStmtType
// contains filtered or unexported fields
}
func NewCloneTable ¶
func NewCloneTable() *CloneTable
func (*CloneTable) FlipStmtKind ¶
func (node *CloneTable) FlipStmtKind()
func (*CloneTable) Format ¶
func (node *CloneTable) Format(ctx *FmtCtx)
func (*CloneTable) Free ¶
func (node *CloneTable) Free()
func (*CloneTable) GetQueryType ¶
func (node *CloneTable) GetQueryType() string
func (*CloneTable) GetStatementType ¶
func (node *CloneTable) GetStatementType() string
func (*CloneTable) StmtKind ¶
func (node *CloneTable) StmtKind() StmtKind
func (*CloneTable) TypeName ¶
func (node *CloneTable) 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 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 NewColumnTableDef ¶
func NewColumnTableDef(n *UnresolvedName, t ResolvableTypeReference, a []ColumnAttribute) *ColumnTableDef
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) 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)
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) 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 ConflictOpt ¶
type ConflictOpt struct {
Opt int
}
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 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 CreateCDC ¶
type CreateCDC struct {
Internal bool
IfNotExists bool
TaskName Identifier
SourceUri string
SinkType string
SinkUri string
Tables string
Option []string
// contains filtered or unexported fields
}
func (*CreateCDC) GetQueryType ¶
func (*CreateCDC) GetStatementType ¶
type CreateCDCOption ¶
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 CreatePitr ¶
type CreatePitr struct {
Internal bool
IfNotExists bool
Name Identifier // pitr name
Level PitrLevel // pitr level
AccountName Identifier // account name
DatabaseName Identifier // database name
TableName Identifier // table name
PitrValue int64
PitrUnit string
// contains filtered or unexported fields
}
func (*CreatePitr) Format ¶
func (node *CreatePitr) Format(ctx *FmtCtx)
func (*CreatePitr) GetQueryType ¶
func (node *CreatePitr) GetQueryType() string
func (*CreatePitr) GetStatementType ¶
func (node *CreatePitr) GetStatementType() string
func (*CreatePitr) StmtKind ¶
func (node *CreatePitr) StmtKind() StmtKind
type CreateProcedure ¶ added in v0.8.0
type CreateProcedure struct {
Replace bool
Name *ProcedureName
Args ProcedureArgs
Lang string
Body string
// contains filtered or unexported fields
}
func NewCreateProcedure ¶ added in v1.2.0
func NewCreateProcedure(replace bool, n *ProcedureName, a ProcedureArgs, lang string, 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 TableNames
AccountsSet *AccountsSetOption
Comment string
// contains filtered or unexported fields
}
func NewCreatePublication ¶ added in v1.2.0
func NewCreatePublication(ife bool, n Identifier, db Identifier, tables TableNames, 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 ¶
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 CreateSQLTask ¶
type CreateSQLTask struct {
IfNotExists bool
Name Identifier
CronExpr string
Timezone string
GateCondition string
RetryLimit int64
Timeout string
SQLBody string
// contains filtered or unexported fields
}
func (*CreateSQLTask) Format ¶
func (node *CreateSQLTask) Format(ctx *FmtCtx)
func (*CreateSQLTask) GetQueryType ¶
func (node *CreateSQLTask) GetQueryType() string
func (*CreateSQLTask) GetStatementType ¶
func (node *CreateSQLTask) GetStatementType() string
func (*CreateSQLTask) StmtKind ¶
func (node *CreateSQLTask) StmtKind() StmtKind
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) 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 CreateSubscription ¶
type CreateSubscription struct {
IsDatabase bool
DbName Identifier
TableName string
AccountName string // For account-level subscription
IfNotExists bool // For account-level subscription
FromUri string
SubscriptionAccountName string // The account name for the subscription
PubName Identifier
SyncInterval int64
// contains filtered or unexported fields
}
func NewCreateSubscription ¶
func NewCreateSubscription(isDb bool, dbName Identifier, tableName string, fromUri string, subscriptionAccountName string, pubName Identifier, syncInterval int64) *CreateSubscription
func (*CreateSubscription) Format ¶
func (node *CreateSubscription) Format(ctx *FmtCtx)
func (*CreateSubscription) Free ¶
func (node *CreateSubscription) Free()
func (*CreateSubscription) GetQueryType ¶
func (node *CreateSubscription) GetQueryType() string
func (*CreateSubscription) GetStatementType ¶
func (node *CreateSubscription) GetStatementType() string
func (*CreateSubscription) SetAccountName ¶
func (node *CreateSubscription) SetAccountName(name string)
func (*CreateSubscription) SetIfNotExists ¶
func (node *CreateSubscription) SetIfNotExists(ifNotExists bool)
func (*CreateSubscription) StmtKind ¶
func (node *CreateSubscription) StmtKind() StmtKind
func (CreateSubscription) TypeName ¶
func (node CreateSubscription) 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 DataBranchCreateDatabase ¶
type DataBranchCreateDatabase struct {
CloneDatabase
}
func NewDataBranchCreateDatabase ¶
func NewDataBranchCreateDatabase() *DataBranchCreateDatabase
func (*DataBranchCreateDatabase) DataBranchType ¶
func (d *DataBranchCreateDatabase) DataBranchType() DataBranchType
func (*DataBranchCreateDatabase) Format ¶
func (d *DataBranchCreateDatabase) Format(ctx *FmtCtx)
func (*DataBranchCreateDatabase) Free ¶
func (d *DataBranchCreateDatabase) Free()
func (*DataBranchCreateDatabase) GetQueryType ¶
func (d *DataBranchCreateDatabase) GetQueryType() string
func (*DataBranchCreateDatabase) GetStatementType ¶
func (d *DataBranchCreateDatabase) GetStatementType() string
func (*DataBranchCreateDatabase) StmtKind ¶
func (d *DataBranchCreateDatabase) StmtKind() StmtKind
func (*DataBranchCreateDatabase) String ¶
func (d *DataBranchCreateDatabase) String() string
func (*DataBranchCreateDatabase) TypeName ¶
func (d *DataBranchCreateDatabase) TypeName() string
type DataBranchCreateTable ¶
type DataBranchCreateTable struct {
ToAccountOpt *ToAccountOpt
SrcTable TableName
CreateTable CreateTable
// contains filtered or unexported fields
}
func NewDataBranchCreateTable ¶
func NewDataBranchCreateTable() *DataBranchCreateTable
func (*DataBranchCreateTable) DataBranchType ¶
func (d *DataBranchCreateTable) DataBranchType() DataBranchType
func (*DataBranchCreateTable) Format ¶
func (d *DataBranchCreateTable) Format(ctx *FmtCtx)
func (*DataBranchCreateTable) Free ¶
func (d *DataBranchCreateTable) Free()
func (*DataBranchCreateTable) GetQueryType ¶
func (d *DataBranchCreateTable) GetQueryType() string
func (*DataBranchCreateTable) GetStatementType ¶
func (d *DataBranchCreateTable) GetStatementType() string
func (*DataBranchCreateTable) StmtKind ¶
func (d *DataBranchCreateTable) StmtKind() StmtKind
func (*DataBranchCreateTable) String ¶
func (d *DataBranchCreateTable) String() string
func (*DataBranchCreateTable) TypeName ¶
func (d *DataBranchCreateTable) TypeName() string
type DataBranchDeleteDatabase ¶
type DataBranchDeleteDatabase struct {
DatabaseName Identifier
// contains filtered or unexported fields
}
func NewDataBranchDeleteDatabase ¶
func NewDataBranchDeleteDatabase() *DataBranchDeleteDatabase
func (*DataBranchDeleteDatabase) DataBranchType ¶
func (d *DataBranchDeleteDatabase) DataBranchType() DataBranchType
func (*DataBranchDeleteDatabase) Format ¶
func (d *DataBranchDeleteDatabase) Format(ctx *FmtCtx)
func (*DataBranchDeleteDatabase) Free ¶
func (d *DataBranchDeleteDatabase) Free()
func (*DataBranchDeleteDatabase) GetQueryType ¶
func (d *DataBranchDeleteDatabase) GetQueryType() string
func (*DataBranchDeleteDatabase) GetStatementType ¶
func (d *DataBranchDeleteDatabase) GetStatementType() string
func (*DataBranchDeleteDatabase) StmtKind ¶
func (d *DataBranchDeleteDatabase) StmtKind() StmtKind
func (*DataBranchDeleteDatabase) String ¶
func (d *DataBranchDeleteDatabase) String() string
func (*DataBranchDeleteDatabase) TypeName ¶
func (d *DataBranchDeleteDatabase) TypeName() string
type DataBranchDeleteTable ¶
type DataBranchDeleteTable struct {
TableName TableName
// contains filtered or unexported fields
}
func NewDataBranchDeleteTable ¶
func NewDataBranchDeleteTable() *DataBranchDeleteTable
func (*DataBranchDeleteTable) DataBranchType ¶
func (d *DataBranchDeleteTable) DataBranchType() DataBranchType
func (*DataBranchDeleteTable) Format ¶
func (d *DataBranchDeleteTable) Format(ctx *FmtCtx)
func (*DataBranchDeleteTable) Free ¶
func (d *DataBranchDeleteTable) Free()
func (*DataBranchDeleteTable) GetQueryType ¶
func (d *DataBranchDeleteTable) GetQueryType() string
func (*DataBranchDeleteTable) GetStatementType ¶
func (d *DataBranchDeleteTable) GetStatementType() string
func (*DataBranchDeleteTable) StmtKind ¶
func (d *DataBranchDeleteTable) StmtKind() StmtKind
func (*DataBranchDeleteTable) String ¶
func (d *DataBranchDeleteTable) String() string
func (*DataBranchDeleteTable) TypeName ¶
func (d *DataBranchDeleteTable) TypeName() string
type DataBranchDiff ¶
type DataBranchDiff struct {
TargetTable TableName
BaseTable TableName
Columns IdentifierList // optional column projection; nil means all columns
OutputOpt *DiffOutputOpt
// contains filtered or unexported fields
}
func NewDataBranchDiff ¶
func NewDataBranchDiff() *DataBranchDiff
func (*DataBranchDiff) Format ¶
func (s *DataBranchDiff) Format(ctx *FmtCtx)
func (*DataBranchDiff) Free ¶
func (s *DataBranchDiff) Free()
func (*DataBranchDiff) GetQueryType ¶
func (s *DataBranchDiff) GetQueryType() string
func (*DataBranchDiff) GetStatementType ¶
func (s *DataBranchDiff) GetStatementType() string
func (*DataBranchDiff) StmtKind ¶
func (s *DataBranchDiff) StmtKind() StmtKind
func (*DataBranchDiff) String ¶
func (s *DataBranchDiff) String() string
func (*DataBranchDiff) TypeName ¶
func (s *DataBranchDiff) TypeName() string
type DataBranchMerge ¶
type DataBranchMerge struct {
SrcTable TableName
DstTable TableName
ConflictOpt *ConflictOpt
// contains filtered or unexported fields
}
func NewDataBranchMerge ¶
func NewDataBranchMerge() *DataBranchMerge
func (*DataBranchMerge) Format ¶
func (s *DataBranchMerge) Format(ctx *FmtCtx)
func (*DataBranchMerge) Free ¶
func (s *DataBranchMerge) Free()
func (*DataBranchMerge) GetQueryType ¶
func (s *DataBranchMerge) GetQueryType() string
func (*DataBranchMerge) GetStatementType ¶
func (s *DataBranchMerge) GetStatementType() string
func (*DataBranchMerge) StmtKind ¶
func (s *DataBranchMerge) StmtKind() StmtKind
func (*DataBranchMerge) String ¶
func (s *DataBranchMerge) String() string
func (*DataBranchMerge) TypeName ¶
func (s *DataBranchMerge) TypeName() string
type DataBranchPick ¶
type DataBranchPick struct {
SrcTable TableName
DstTable TableName
Keys *PickKeys
BetweenFrom string // snapshot name for BETWEEN SNAPSHOT sp1 AND sp2
BetweenTo string // snapshot name for BETWEEN SNAPSHOT sp1 AND sp2
ConflictOpt *ConflictOpt
// contains filtered or unexported fields
}
DataBranchPick represents:
DATA BRANCH PICK <src_table> INTO <dst_table> [ KEYS ( <value_list> | <subquery> ) ] [ BETWEEN SNAPSHOT sp1 AND sp2 ] [WHEN CONFLICT FAIL|SKIP|ACCEPT]
func NewDataBranchPick ¶
func NewDataBranchPick() *DataBranchPick
func (*DataBranchPick) Format ¶
func (s *DataBranchPick) Format(ctx *FmtCtx)
func (*DataBranchPick) Free ¶
func (s *DataBranchPick) Free()
func (*DataBranchPick) GetQueryType ¶
func (s *DataBranchPick) GetQueryType() string
func (*DataBranchPick) GetStatementType ¶
func (s *DataBranchPick) GetStatementType() string
func (*DataBranchPick) StmtKind ¶
func (s *DataBranchPick) StmtKind() StmtKind
func (*DataBranchPick) String ¶
func (s *DataBranchPick) String() string
func (*DataBranchPick) TypeName ¶
func (s *DataBranchPick) TypeName() string
type DataBranchType ¶
type DataBranchType int
const ( DataBranch_CreateTable DataBranchType = iota DataBranch_CreateDatabase DataBranch_DeleteTable DataBranch_DeleteDatabase )
type DatabaseConfig ¶
type DatabaseConfig int
const ( MYSQL_COMPATIBILITY_MODE DatabaseConfig = iota UNIQUE_CHECK_ON_AUTOINCR )
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) GetQueryType ¶ added in v0.7.0
func (*Declare) GetStatementType ¶ added in v0.7.0
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)
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 (*Delete) GetQueryType ¶ added in v0.7.0
func (*Delete) GetStatementType ¶ added in v0.7.0
type DiffOutputOpt ¶
type Do ¶ added in v0.6.0
type Do struct {
Exprs []Expr
// contains filtered or unexported fields
}
Do statement
func (*Do) GetQueryType ¶ added in v0.7.0
func (*Do) GetStatementType ¶ added in v0.7.0
type DropAccount ¶ added in v0.6.0
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 DropCDC ¶
type DropCDC struct {
Internal bool
IfExists bool
Option *AllOrNotCDC
// contains filtered or unexported fields
}
func NewDropCDC ¶
func NewDropCDC(option *AllOrNotCDC, ifExists bool, internal bool) *DropCDC
func (*DropCDC) GetQueryType ¶
func (*DropCDC) GetStatementType ¶
type DropCcprSubscription ¶
type DropCcprSubscription struct {
TaskID string
IfExists bool
// contains filtered or unexported fields
}
func NewDropCcprSubscription ¶
func NewDropCcprSubscription(ife bool, taskID string) *DropCcprSubscription
func (*DropCcprSubscription) Format ¶
func (node *DropCcprSubscription) Format(ctx *FmtCtx)
func (*DropCcprSubscription) Free ¶
func (node *DropCcprSubscription) Free()
func (*DropCcprSubscription) GetQueryType ¶
func (node *DropCcprSubscription) GetQueryType() string
func (*DropCcprSubscription) GetStatementType ¶
func (node *DropCcprSubscription) GetStatementType() string
func (*DropCcprSubscription) StmtKind ¶
func (node *DropCcprSubscription) StmtKind() StmtKind
func (DropCcprSubscription) TypeName ¶
func (node DropCcprSubscription) 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) GetQueryType ¶ added in v0.7.0
func (*DropIndex) GetStatementType ¶ added in v0.7.0
type DropPitr ¶
type DropPitr struct {
Internal bool
IfExists bool
Name Identifier // pitr name
// contains filtered or unexported fields
}
func NewDropPitr ¶
func NewDropPitr(ifExists bool, Name Identifier) *DropPitr
func (*DropPitr) GetQueryType ¶
func (*DropPitr) GetStatementType ¶
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 ¶
func NewDropRole ¶
func (*DropRole) GetQueryType ¶ added in v0.7.0
func (*DropRole) GetStatementType ¶ added in v0.7.0
type DropSQLTask ¶
type DropSQLTask struct {
IfExists bool
Name Identifier
// contains filtered or unexported fields
}
func (*DropSQLTask) Format ¶
func (node *DropSQLTask) Format(ctx *FmtCtx)
func (*DropSQLTask) GetQueryType ¶
func (node *DropSQLTask) GetQueryType() string
func (*DropSQLTask) GetStatementType ¶
func (node *DropSQLTask) GetStatementType() string
func (*DropSQLTask) StmtKind ¶
func (node *DropSQLTask) StmtKind() StmtKind
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
AccountName Identifier // account name for publication-based drop
PubName Identifier // publication name for publication-based drop
// contains filtered or unexported fields
}
func NewDropSnapShot ¶ added in v1.2.0
func NewDropSnapShot(ifExists bool, Name Identifier, accountName Identifier, pubName 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) GetQueryType ¶ added in v1.0.0
func (*DropStage) GetStatementType ¶ added in v1.0.0
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) GetQueryType ¶ added in v0.7.0
func (*DropTable) GetStatementType ¶ added in v0.7.0
type DropUser ¶
func NewDropUser ¶
func (*DropUser) GetQueryType ¶ added in v0.7.0
func (*DropUser) GetStatementType ¶ added in v0.7.0
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) GetQueryType ¶ added in v0.7.0
func (*DropView) GetStatementType ¶ added in v0.7.0
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
func (*ElseIfStmt) Format ¶ added in v0.8.0
func (node *ElseIfStmt) Format(ctx *FmtCtx)
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) GetQueryType ¶ added in v1.0.0
func (EmptyStmt) GetStatementType ¶ added in v1.0.0
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) 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 ExParam ¶ added in v0.7.0
type ExParam struct {
ExternType int32
JsonData string
FileService fileservice.FileService
NullMap map[string]([]string)
S3Param *S3Parameter
Ctx context.Context
Local bool
Parallel bool
ParallelLoadRequested bool
Strict bool
}
type ExParamConst ¶ added in v0.7.0
type ExParamConst struct {
ScanType int
FileSize int64
FileStartOff int64
Filepath string
CompressType string
Format string
Option []string
Data string
Tail *TailParameter
StageName Identifier
HivePartitioning bool
HivePartitionCols []string
HivePartitionColTypes []HivePartColType
}
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) GetQueryType ¶ added in v0.7.0
func (*Execute) GetStatementType ¶ added in v0.7.0
type ExecuteSQLTask ¶
type ExecuteSQLTask struct {
Name Identifier
// contains filtered or unexported fields
}
func (*ExecuteSQLTask) Format ¶
func (node *ExecuteSQLTask) Format(ctx *FmtCtx)
func (*ExecuteSQLTask) GetQueryType ¶
func (node *ExecuteSQLTask) GetQueryType() string
func (*ExecuteSQLTask) GetStatementType ¶
func (node *ExecuteSQLTask) GetStatementType() string
func (*ExecuteSQLTask) StmtKind ¶
func (node *ExecuteSQLTask) StmtKind() StmtKind
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 ExplainPhyPlan ¶
type ExplainPhyPlan struct {
// contains filtered or unexported fields
}
-------------------------------------------------------------------------------------- EXPLAIN PhyPlan statement
func NewExplainPhyPlan ¶
func NewExplainPhyPlan(stmt Statement, f string) *ExplainPhyPlan
func (*ExplainPhyPlan) Format ¶
func (node *ExplainPhyPlan) Format(ctx *FmtCtx)
func (*ExplainPhyPlan) Free ¶
func (node *ExplainPhyPlan) Free()
func (*ExplainPhyPlan) GetQueryType ¶
func (node *ExplainPhyPlan) GetQueryType() string
func (*ExplainPhyPlan) GetStatementType ¶
func (node *ExplainPhyPlan) GetStatementType() string
func (*ExplainPhyPlan) StmtKind ¶
func (node *ExplainPhyPlan) StmtKind() StmtKind
func (ExplainPhyPlan) TypeName ¶
func (node ExplainPhyPlan) 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
// ExportFormat: "csv", "jsonline", "parquet", default is ""(csv)
ExportFormat string
// SplitSize: split file size in bytes, 0 means no split
SplitSize uint64
}
func (*ExportParam) Format ¶
func (ep *ExportParam) Format(ctx *FmtCtx)
func (*ExportParam) String ¶
func (ep *ExportParam) String() string
type ExprList ¶
type ExprList struct {
Exprs Exprs
// contains filtered or unexported fields
}
ast fir the list of expression
type ExternParam ¶ added in v0.6.0
type ExternParam struct {
// params which come from parser
ExParamConst
// params which come from internal construct
ExParam
}
type Fields ¶
type Fields struct {
Terminated *Terminated
Optionally bool
EnclosedBy *EnclosedBy
EscapedBy *EscapedBy
}
type FmtCtx ¶
FmtCtx contains formatted text of the node.
func NewFmtCtx ¶
func NewFmtCtx(dialectType dialect.DialectType, opts ...FmtCtxOption) *FmtCtx
func (*FmtCtx) WriteIdentifier ¶
func (ctx *FmtCtx) WriteIdentifier(identifier Identifier)
func (*FmtCtx) WriteStringQuote ¶ added in v0.7.0
type FmtCtxOption ¶ added in v0.6.0
type FmtCtxOption func(*FmtCtx)
func WithQuoteIdentifier ¶
func WithQuoteIdentifier() FmtCtxOption
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
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 From ¶
type From struct {
Tables TableExprs
}
the FROM clause.
func NewFrom ¶
func NewFrom(t TableExprs) *From
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 FullTextMatchExpr ¶
type FullTextMatchExpr struct {
// columns.
KeyParts []*KeyPart
// pattern
Pattern string
Mode FullTextSearchType
// contains filtered or unexported fields
}
func NewFullTextMatchFuncExpression ¶
func NewFullTextMatchFuncExpression(columns []*KeyPart, pattern string, mode FullTextSearchType) (*FullTextMatchExpr, error)
func (*FullTextMatchExpr) Accept ¶
func (node *FullTextMatchExpr) Accept(v Visitor) (Expr, bool)
Accept implements NodeChecker Accept interface.
func (*FullTextMatchExpr) Format ¶
func (node *FullTextMatchExpr) Format(ctx *FmtCtx)
func (*FullTextMatchExpr) Valid ¶
func (node *FullTextMatchExpr) Valid() error
type FullTextSearchType ¶
type FullTextSearchType int
const ( FULLTEXT_DEFAULT FullTextSearchType = iota FULLTEXT_NL FULLTEXT_NL_QUERY_EXPANSION FULLTEXT_BOOLEAN FULLTEXT_QUERY_EXPANSION )
func (*FullTextSearchType) ToString ¶
func (node *FullTextSearchType) ToString() 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
type FunctionArg ¶ added in v0.7.0
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 {
SRID uint32
SRIDDefined bool
// Subtype is the base geometry subtype name (POINT, LINESTRING, ...,
// GEOMETRY for the generic/unconstrained form), normalized from the DDL
// type keyword (e.g. POINT32 -> POINT, GEOGRAPHY -> GEOMETRY).
Subtype string
// Float32 is true for the GEOMETRY32 family of types (float32-coordinate
// WKB); false for the float64 GEOMETRY family.
Float32 bool
}
type GetDdl ¶
type GetDdl struct {
Database *Identifier // optional database name
Table *Identifier // optional table name
Snapshot *Identifier // optional snapshot name
SubscriptionAccountName string // optional subscription account name for FROM clause
PubName *Identifier // optional publication name for FROM clause
// contains filtered or unexported fields
}
func (*GetDdl) GetQueryType ¶
func (*GetDdl) GetStatementType ¶
type GetObject ¶
type GetObject struct {
ObjectName Identifier // object name
ChunkIndex int64 // -1 means only get metadata, >=0 means request which chunk
SubscriptionAccountName string // optional subscription account name for FROM clause
PubName Identifier // optional publication name for FROM clause
// contains filtered or unexported fields
}
func NewGetObject ¶
func NewGetObject() *GetObject
func (*GetObject) GetQueryType ¶
func (*GetObject) GetStatementType ¶
type Grant ¶
type Grant struct {
Typ GrantType
GrantPrivilege GrantPrivilege
GrantRole GrantRole
GrantProxy GrantProxy
// contains filtered or unexported fields
}
func (*Grant) GetQueryType ¶ added in v0.7.0
func (*Grant) GetStatementType ¶ added in v0.7.0
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) 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) 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) GetQueryType ¶ added in v0.7.0
func (*GrantRole) GetStatementType ¶ added in v0.7.0
type GroupByClause ¶
type GroupByClause struct {
GroupByExprsList []Exprs
GroupingSet Exprs
Apart bool
Cube bool
Rollup bool
}
a GROUP BY clause.
func (*GroupByClause) Format ¶
func (node *GroupByClause) Format(ctx *FmtCtx)
type HashType ¶
func NewHashType ¶
type HivePartColType ¶
HivePartColType is a compact snapshot of a partition column's type info. Defined in tree package to avoid importing pkg/pb/plan.
type Identifier ¶
type Identifier string
sql indentifier
func (*Identifier) Format ¶
func (node *Identifier) Format(ctx *FmtCtx)
func (*Identifier) String ¶
func (node *Identifier) String() string
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) GetQueryType ¶ added in v0.8.0
func (*IfStmt) GetStatementType ¶ added in v0.8.0
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
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
}
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
}
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
AlgoParamM int64
HnswEfConstruction int64
HnswEfSearch int64
BitsPerCode int64
Async bool
ForceSync bool
AutoUpdate bool
Day int64
Hour int64
IntermediateGraphDegree int64
GraphDegree int64
Quantization string
DistributionMode string
ITopkSize int64
KmeansTrainPercent int64
KmeansMaxIteration int64
MaxIndexCapacity int64
IncludeColumns []*UnresolvedName
}
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 Insert ¶
type Insert struct {
Table TableExpr
Accounts IdentifierList
PartitionNames IdentifierList
Columns IdentifierList
Rows *Select
OnDuplicateUpdate UpdateExprs
IsRestore bool
IsRestoreByTs bool
FromDataTenantID uint32
With *With
// contains filtered or unexported fields
}
the INSERT statement.
func NewInsert ¶
func NewInsert(t TableExpr, c IdentifierList, r *Select, p IdentifierList) *Insert
func (*Insert) GetQueryType ¶ added in v0.7.0
func (*Insert) GetStatementType ¶ added in v0.7.0
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
}
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)
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)
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)
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)
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)
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)
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)
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)
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)
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) 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 JoinTableExpr ¶
type JoinTableExpr struct {
TableExpr
JoinType string
Left TableExpr
Right TableExpr
Cond JoinCond
Option string
}
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
type KeyType ¶
type KeyType struct {
Linear bool
ColumnList []*UnresolvedName
Algorithm int64
// contains filtered or unexported fields
}
func NewKeyType ¶
func NewKeyType() *KeyType
type Kill ¶ added in v0.7.0
type Kill struct {
Option KillOption
ConnectionId uint64
StmtOption StatementOption
// contains filtered or unexported fields
}
func (*Kill) GetQueryType ¶ added in v0.7.0
func (*Kill) GetStatementType ¶ added in v0.7.0
type KillOption ¶ added in v0.7.0
func (KillOption) Format ¶ added in v0.7.0
func (ko KillOption) Format(ctx *FmtCtx)
type LeaveStmt ¶ added in v0.8.0
type LeaveStmt struct {
Name Identifier
// contains filtered or unexported fields
}
func (*LeaveStmt) GetQueryType ¶ added in v0.8.0
func (*LeaveStmt) GetStatementType ¶ added in v0.8.0
type LengthScaleOpt ¶
type Lines ¶
type Lines struct {
StartingBy string
TerminatedBy *Terminated
}
type ListType ¶
type ListType struct {
Expr Expr
ColumnList []*UnresolvedName
// contains filtered or unexported fields
}
func NewListType ¶
func NewListType() *ListType
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) GetQueryType ¶ added in v0.7.0
func (*Load) GetStatementType ¶ added in v0.7.0
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 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) 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) GetQueryType ¶ added in v0.8.0
func (*LoopStmt) GetStatementType ¶ added in v0.8.0
type MaxValue ¶
type MaxValue struct {
// contains filtered or unexported fields
}
func NewMaxValue ¶
func NewMaxValue() *MaxValue
type MaxValueOption ¶ added in v0.8.0
func (*MaxValueOption) Format ¶ added in v0.8.0
func (node *MaxValueOption) Format(ctx *FmtCtx)
type MinValueOption ¶ added in v0.8.0
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) GetQueryType ¶ added in v0.7.0
func (*MoDump) GetStatementType ¶ added in v0.7.0
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 ¶
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 {
ValType P_TYPE
// contains filtered or unexported fields
}
the AST for the constant numeric value.
func (*NumVal) Float64 ¶
follow package constant Float64Val Float64Val returns the nearest Go float64 value of x and whether the result is exact; x must be numeric or an Unknown, but not [Complex]. For values too small (too close to 0) to represent as float64, [Float64Val] silently underflows to 0. The result sign always matches the sign of x, even for 0. If x is Unknown, the result is (0, false).
type ObjectInfo ¶ added in v1.2.0
type ObjectInfo struct {
SLevel SnapshotLevelType // snapshot level
ObjName Identifier // object name
AccountName Identifier // account name for publication-based snapshots
PubName Identifier // publication name for publication-based snapshots
}
func (*ObjectInfo) Format ¶ added in v1.2.0
func (node *ObjectInfo) Format(ctx *FmtCtx)
type ObjectList ¶
type ObjectList struct {
Database Identifier // optional database name
Table Identifier // optional table name
Snapshot Identifier // snapshot name
AgainstSnapshot *Identifier // optional against snapshot name
SubscriptionAccountName string // optional subscription account name for FROM clause
PubName Identifier // optional publication name for FROM clause
// contains filtered or unexported fields
}
func NewObjectList ¶
func NewObjectList() *ObjectList
func (*ObjectList) Format ¶
func (s *ObjectList) Format(ctx *FmtCtx)
func (*ObjectList) Free ¶
func (s *ObjectList) Free()
func (*ObjectList) GetQueryType ¶
func (s *ObjectList) GetQueryType() string
func (*ObjectList) GetStatementType ¶
func (s *ObjectList) GetStatementType() string
func (*ObjectList) StmtKind ¶
func (s *ObjectList) StmtKind() StmtKind
func (*ObjectList) String ¶
func (s *ObjectList) String() string
func (*ObjectList) TypeName ¶
func (s *ObjectList) TypeName() string
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 ¶
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
func MakeOptionElem ¶ added in v0.5.0
func MakeOptionElem(name string, value string) OptionElem
type OrExpr ¶
type OrExpr struct {
Left, Right Expr
// contains filtered or unexported fields
}
or expression
type Order ¶
type Order struct {
Expr Expr
Direction Direction
NullsPosition NullsPosition
//without order
NullOrder bool
}
the ordering expression.
type OutputType ¶ added in v1.2.0
type OutputType int
type P_TYPE ¶ added in v0.5.0
type P_TYPE uint8
the AST for literals like string,numeric,bool and etc.
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
type ParenExpr ¶
type ParenExpr struct {
Expr Expr
// contains filtered or unexported fields
}
the parenthesized expression.
func NewParentExpr ¶ added in v1.1.2
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 ¶
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
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 PauseCDC ¶
type PauseCDC struct {
Option *AllOrNotCDC
// contains filtered or unexported fields
}
func (*PauseCDC) GetQueryType ¶
func (*PauseCDC) GetStatementType ¶
type PauseCcprSubscription ¶
type PauseCcprSubscription struct {
TaskID string
// contains filtered or unexported fields
}
func NewPauseCcprSubscription ¶
func NewPauseCcprSubscription(taskID string) *PauseCcprSubscription
func (*PauseCcprSubscription) Format ¶
func (node *PauseCcprSubscription) Format(ctx *FmtCtx)
func (*PauseCcprSubscription) Free ¶
func (node *PauseCcprSubscription) Free()
func (*PauseCcprSubscription) GetQueryType ¶
func (node *PauseCcprSubscription) GetQueryType() string
func (*PauseCcprSubscription) GetStatementType ¶
func (node *PauseCcprSubscription) GetStatementType() string
func (*PauseCcprSubscription) StmtKind ¶
func (node *PauseCcprSubscription) StmtKind() StmtKind
func (PauseCcprSubscription) TypeName ¶
func (node PauseCcprSubscription) TypeName() string
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) 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 PickKeys ¶
type PickKeys struct {
Type PickKeysType
KeyExprs []Expr // for PickKeysValues: literal expressions
Select *Select // for PickKeysSubquery
}
PickKeys represents the KEYS clause of a PICK statement.
type PickKeysType ¶
type PickKeysType int
PickKeysType distinguishes how the user specified the key set.
const ( PickKeysValues PickKeysType = iota // KEYS (1, 2, 3) or KEYS ((1,'a'), (2,'b')) PickKeysSubquery // KEYS (SELECT pk FROM ...) )
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 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 PrepareVar ¶
type PrepareVar struct {
Name Identifier
Var string
// contains filtered or unexported fields
}
func NewPrepareVar ¶
func NewPrepareVar(name Identifier, v *VarExpr) *PrepareVar
func (*PrepareVar) Format ¶
func (node *PrepareVar) Format(ctx *FmtCtx)
func (*PrepareVar) Free ¶
func (node *PrepareVar) Free()
func (*PrepareVar) GetQueryType ¶
func (node *PrepareVar) GetQueryType() string
func (*PrepareVar) GetStatementType ¶
func (node *PrepareVar) GetStatementType() string
func (PrepareVar) TypeName ¶
func (node PrepareVar) 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
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. )
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 NewProcedureArgDecl(f InOutArgType, n *UnresolvedName, t ResolvableTypeReference) *ProcedureArgDecl
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 {
ArgName string
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 ¶
func NewProperty ¶ added in v1.2.0
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 ¶
type RangeType ¶
type RangeType struct {
Expr Expr
ColumnList []*UnresolvedName
// contains filtered or unexported fields
}
func NewRangeType ¶
func NewRangeType() *RangeType
type RankOption ¶
func (*RankOption) Format ¶
func (node *RankOption) Format(ctx *FmtCtx)
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 RecoveryWindowLevel ¶
type RecoveryWindowLevel int
const ( RECOVERYWINDOWLEVELCLUSTER RecoveryWindowLevel = iota RECOVERYWINDOWLEVELACCOUNT RECOVERYWINDOWLEVELDATABASE RECOVERYWINDOWLEVELTABLE )
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 ReleaseSavePoint ¶
type ReleaseSavePoint struct {
Name Identifier
// contains filtered or unexported fields
}
func (*ReleaseSavePoint) Format ¶
func (node *ReleaseSavePoint) Format(ctx *FmtCtx)
func (*ReleaseSavePoint) GetQueryType ¶
func (node *ReleaseSavePoint) GetQueryType() string
func (*ReleaseSavePoint) GetStatementType ¶
func (node *ReleaseSavePoint) GetStatementType() string
func (*ReleaseSavePoint) StmtKind ¶
func (node *ReleaseSavePoint) StmtKind() StmtKind
type RemoveStageFiles ¶
type RemoveStageFiles struct {
IfExists bool
Path string
// contains filtered or unexported fields
}
func NewRemoveStageFiles ¶
func NewRemoveStageFiles(ifExists bool, path string) *RemoveStageFiles
func (*RemoveStageFiles) Format ¶
func (node *RemoveStageFiles) Format(ctx *FmtCtx)
func (*RemoveStageFiles) Free ¶
func (node *RemoveStageFiles) Free()
func (*RemoveStageFiles) GetQueryType ¶
func (node *RemoveStageFiles) GetQueryType() string
func (*RemoveStageFiles) GetStatementType ¶
func (node *RemoveStageFiles) GetStatementType() string
func (*RemoveStageFiles) StmtKind ¶
func (node *RemoveStageFiles) StmtKind() StmtKind
func (RemoveStageFiles) TypeName ¶
func (node RemoveStageFiles) TypeName() string
type RenameTable ¶
type RenameTable struct {
AlterTables []*AlterTable
// contains filtered or unexported fields
}
func NewRenameTable ¶
func NewRenameTable(alters []*AlterTable) *RenameTable
func (*RenameTable) Format ¶
func (node *RenameTable) Format(ctx *FmtCtx)
func (*RenameTable) Free ¶
func (node *RenameTable) Free()
func (*RenameTable) GetQueryType ¶
func (node *RenameTable) GetQueryType() string
func (*RenameTable) GetStatementType ¶
func (node *RenameTable) GetStatementType() string
func (*RenameTable) StmtKind ¶
func (node *RenameTable) StmtKind() StmtKind
func (RenameTable) TypeName ¶
func (node RenameTable) TypeName() 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) 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) GetQueryType ¶ added in v0.7.0
func (*Replace) GetStatementType ¶ added in v0.7.0
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) GetQueryType ¶ added in v0.7.0
func (*Reset) GetStatementType ¶ added in v0.7.0
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 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 (node *ResourceOptionMaxConnectionPerHour) Free()
func (ResourceOptionMaxConnectionPerHour) TypeName ¶ added in v1.2.0
func (node ResourceOptionMaxConnectionPerHour) TypeName() string
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 RestartCDC ¶
type RestartCDC struct {
TaskName Identifier
// contains filtered or unexported fields
}
func (*RestartCDC) Format ¶
func (node *RestartCDC) Format(ctx *FmtCtx)
func (*RestartCDC) GetQueryType ¶
func (node *RestartCDC) GetQueryType() string
func (*RestartCDC) GetStatementType ¶
func (node *RestartCDC) GetStatementType() string
func (*RestartCDC) StmtKind ¶
func (node *RestartCDC) StmtKind() StmtKind
func (*RestartCDC) TypeName ¶
func (node *RestartCDC) TypeName() string
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 RestorePitr ¶
type RestorePitr struct {
Level RestoreLevel // restore level
Name Identifier // pitr name
AccountName Identifier // account name
DatabaseName Identifier // database name
TableName Identifier // table name
SrcAccountName Identifier // source account name
TimeStamp string
// contains filtered or unexported fields
}
func (*RestorePitr) Format ¶
func (node *RestorePitr) Format(ctx *FmtCtx)
func (*RestorePitr) GetQueryType ¶
func (node *RestorePitr) GetQueryType() string
func (*RestorePitr) GetStatementType ¶
func (node *RestorePitr) GetStatementType() string
func (*RestorePitr) StmtKind ¶
func (node *RestorePitr) StmtKind() StmtKind
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) 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 ResumeCDC ¶
type ResumeCDC struct {
TaskName Identifier
// contains filtered or unexported fields
}
func (*ResumeCDC) GetQueryType ¶
func (*ResumeCDC) GetStatementType ¶
type ResumeCcprSubscription ¶
type ResumeCcprSubscription struct {
TaskID string
// contains filtered or unexported fields
}
func NewResumeCcprSubscription ¶
func NewResumeCcprSubscription(taskID string) *ResumeCcprSubscription
func (*ResumeCcprSubscription) Format ¶
func (node *ResumeCcprSubscription) Format(ctx *FmtCtx)
func (*ResumeCcprSubscription) Free ¶
func (node *ResumeCcprSubscription) Free()
func (*ResumeCcprSubscription) GetQueryType ¶
func (node *ResumeCcprSubscription) GetQueryType() string
func (*ResumeCcprSubscription) GetStatementType ¶
func (node *ResumeCcprSubscription) GetStatementType() string
func (*ResumeCcprSubscription) StmtKind ¶
func (node *ResumeCcprSubscription) StmtKind() StmtKind
func (ResumeCcprSubscription) TypeName ¶
func (node ResumeCcprSubscription) TypeName() string
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) 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 (*Revoke) GetQueryType ¶ added in v0.7.0
func (*Revoke) GetStatementType ¶ added in v0.7.0
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) 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) 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 RewriteOption ¶
type Role ¶
type Role struct {
NodeFormatter
UserName string
}
type RollbackToSavePoint ¶
type RollbackToSavePoint struct {
Name Identifier
// contains filtered or unexported fields
}
func (*RollbackToSavePoint) Format ¶
func (node *RollbackToSavePoint) Format(ctx *FmtCtx)
func (*RollbackToSavePoint) GetQueryType ¶
func (node *RollbackToSavePoint) GetQueryType() string
func (*RollbackToSavePoint) GetStatementType ¶
func (node *RollbackToSavePoint) GetStatementType() string
func (*RollbackToSavePoint) StmtKind ¶
func (node *RollbackToSavePoint) StmtKind() StmtKind
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) 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 SQLTaskSchedule ¶
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 (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 SavePoint ¶
type SavePoint struct {
Name Identifier
// contains filtered or unexported fields
}
func (*SavePoint) GetQueryType ¶
func (*SavePoint) GetStatementType ¶
type SecondaryRoleType ¶ added in v0.6.0
type SecondaryRoleType int
const ( SecondaryRoleTypeAll SecondaryRoleType = iota SecondaryRoleTypeNone )
type Select ¶
type Select struct {
Select SelectStatement
RewriteOption *RewriteOption
TimeWindow *TimeWindow
OrderBy OrderBy
Limit *Limit
RankOption *RankOption
With *With
Ep *ExportParam
SelectLockInfo *SelectLockInfo
// contains filtered or unexported fields
}
Select represents a SelectStatement with an ORDER and/or LIMIT.
func (*Select) GetQueryType ¶ added in v0.7.0
func (*Select) GetStatementType ¶ added in v0.7.0
type SelectClause ¶
type SelectClause struct {
SelectStatement
Distinct bool
Exprs SelectExprs
From *From
Where *Where
GroupBy *GroupByClause
Having *Where
Option uint64
}
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 ¶
a SELECT expression.
func (*SelectExpr) Format ¶
func (node *SelectExpr) Format(ctx *FmtCtx)
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 SelectLockForUpdateNoWait SelectLockForUpdateWaitN SelectLockForUpdateSkipLocked )
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)
type SetConnectionID ¶
type SetConnectionID struct {
ConnectionID uint32
// contains filtered or unexported fields
}
func (*SetConnectionID) Format ¶
func (node *SetConnectionID) Format(ctx *FmtCtx)
func (*SetConnectionID) GetQueryType ¶
func (node *SetConnectionID) GetQueryType() string
func (*SetConnectionID) GetStatementType ¶
func (node *SetConnectionID) GetStatementType() string
func (*SetConnectionID) StmtKind ¶
func (node *SetConnectionID) StmtKind() StmtKind
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) 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 SetLogserviceSettings ¶
type SetLogserviceSettings struct {
Name string
Value Expr
// contains filtered or unexported fields
}
func (*SetLogserviceSettings) Format ¶
func (node *SetLogserviceSettings) Format(ctx *FmtCtx)
func (*SetLogserviceSettings) GetQueryType ¶
func (node *SetLogserviceSettings) GetQueryType() string
func (*SetLogserviceSettings) GetStatementType ¶
func (node *SetLogserviceSettings) GetStatementType() string
func (*SetLogserviceSettings) StmtKind ¶
func (node *SetLogserviceSettings) StmtKind() StmtKind
type SetPassword ¶
func NewSetPassword ¶
func NewSetPassword(u *User, p string) *SetPassword
func (*SetPassword) Format ¶
func (node *SetPassword) Format(ctx *FmtCtx)
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) GetQueryType ¶ added in v0.7.0
func (*SetRole) GetStatementType ¶ added in v0.7.0
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) 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) GetQueryType ¶ added in v0.7.0
func (*SetVar) GetStatementType ¶ added in v0.7.0
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) GetQueryType ¶ added in v1.2.0
func (node *ShowAccountUpgrade) GetQueryType() string
func (*ShowAccountUpgrade) GetStatementType ¶ added in v1.2.0
func (node *ShowAccountUpgrade) GetStatementType() string
func (*ShowAccountUpgrade) StmtKind ¶ added in v1.2.1
func (node *ShowAccountUpgrade) StmtKind() StmtKind
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) 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) 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 ShowCDC ¶
type ShowCDC struct {
Option *AllOrNotCDC
// contains filtered or unexported fields
}
func (*ShowCDC) GetQueryType ¶
func (*ShowCDC) GetStatementType ¶
type ShowCcprSubscriptions ¶
type ShowCcprSubscriptions struct {
TaskId string
// contains filtered or unexported fields
}
func (*ShowCcprSubscriptions) Format ¶
func (node *ShowCcprSubscriptions) Format(ctx *FmtCtx)
func (*ShowCcprSubscriptions) GetQueryType ¶
func (node *ShowCcprSubscriptions) GetQueryType() string
func (*ShowCcprSubscriptions) GetStatementType ¶
func (node *ShowCcprSubscriptions) GetStatementType() string
func (*ShowCcprSubscriptions) StmtKind ¶
func (node *ShowCcprSubscriptions) 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) 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) 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) 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) 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
AtTsExpr *AtTimeStamp
// 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) 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) 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
AtTsExpr *AtTimeStamp
// 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) 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
AtTsExpr *AtTimeStamp
// 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) 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
AtTsExpr *AtTimeStamp
// 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) 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) 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) 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) GetQueryType ¶ added in v0.7.0
func (*ShowIndex) GetStatementType ¶ added in v0.7.0
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) GetQueryType ¶ added in v0.7.0
func (*ShowLocks) GetStatementType ¶ added in v0.7.0
type ShowLogserviceReplicas ¶
type ShowLogserviceReplicas struct {
// contains filtered or unexported fields
}
func (*ShowLogserviceReplicas) Format ¶
func (node *ShowLogserviceReplicas) Format(ctx *FmtCtx)
func (*ShowLogserviceReplicas) GetQueryType ¶
func (node *ShowLogserviceReplicas) GetQueryType() string
func (*ShowLogserviceReplicas) GetStatementType ¶
func (node *ShowLogserviceReplicas) GetStatementType() string
func (*ShowLogserviceReplicas) StmtKind ¶
func (node *ShowLogserviceReplicas) StmtKind() StmtKind
type ShowLogserviceSettings ¶
type ShowLogserviceSettings struct {
// contains filtered or unexported fields
}
func (*ShowLogserviceSettings) Format ¶
func (node *ShowLogserviceSettings) Format(ctx *FmtCtx)
func (*ShowLogserviceSettings) GetQueryType ¶
func (node *ShowLogserviceSettings) GetQueryType() string
func (*ShowLogserviceSettings) GetStatementType ¶
func (node *ShowLogserviceSettings) GetStatementType() string
func (*ShowLogserviceSettings) StmtKind ¶
func (node *ShowLogserviceSettings) StmtKind() StmtKind
type ShowLogserviceStores ¶
type ShowLogserviceStores struct {
// contains filtered or unexported fields
}
func (*ShowLogserviceStores) Format ¶
func (node *ShowLogserviceStores) Format(ctx *FmtCtx)
func (*ShowLogserviceStores) GetQueryType ¶
func (node *ShowLogserviceStores) GetQueryType() string
func (*ShowLogserviceStores) GetStatementType ¶
func (node *ShowLogserviceStores) GetStatementType() string
func (*ShowLogserviceStores) StmtKind ¶
func (node *ShowLogserviceStores) 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) 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 ShowPitr ¶
type ShowPitr struct {
Where *Where
// contains filtered or unexported fields
}
func (*ShowPitr) GetQueryType ¶
func (*ShowPitr) GetStatementType ¶
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) 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 ShowPublicationCoverage ¶
type ShowPublicationCoverage struct {
Name string
// contains filtered or unexported fields
}
func (*ShowPublicationCoverage) Format ¶
func (node *ShowPublicationCoverage) Format(ctx *FmtCtx)
func (*ShowPublicationCoverage) GetQueryType ¶
func (node *ShowPublicationCoverage) GetQueryType() string
func (*ShowPublicationCoverage) GetStatementType ¶
func (node *ShowPublicationCoverage) GetStatementType() string
func (*ShowPublicationCoverage) StmtKind ¶
func (node *ShowPublicationCoverage) 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) 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 ShowRecoveryWindow ¶
type ShowRecoveryWindow struct {
Level RecoveryWindowLevel // recovery window level
AccountName Identifier
DatabaseName Identifier
TableName Identifier
// contains filtered or unexported fields
}
func (*ShowRecoveryWindow) Format ¶
func (node *ShowRecoveryWindow) Format(ctx *FmtCtx)
func (*ShowRecoveryWindow) GetQueryType ¶
func (node *ShowRecoveryWindow) GetQueryType() string
func (*ShowRecoveryWindow) GetStatementType ¶
func (node *ShowRecoveryWindow) GetStatementType() string
func (*ShowRecoveryWindow) StmtKind ¶
func (node *ShowRecoveryWindow) 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) 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 ShowRules ¶
type ShowRules struct {
RoleName string
// contains filtered or unexported fields
}
ShowRules represents SHOW RULES ON ROLE <role_name>
func (*ShowRules) GetQueryType ¶
func (*ShowRules) GetStatementType ¶
type ShowSQLTaskRuns ¶
type ShowSQLTaskRuns struct {
TaskName Identifier
HasTask bool
Limit int64
HasLimit bool
// contains filtered or unexported fields
}
func (*ShowSQLTaskRuns) Format ¶
func (node *ShowSQLTaskRuns) Format(ctx *FmtCtx)
func (*ShowSQLTaskRuns) GetQueryType ¶
func (node *ShowSQLTaskRuns) GetQueryType() string
func (*ShowSQLTaskRuns) GetStatementType ¶
func (node *ShowSQLTaskRuns) GetStatementType() string
func (*ShowSQLTaskRuns) StmtKind ¶
func (node *ShowSQLTaskRuns) StmtKind() StmtKind
type ShowSQLTasks ¶
type ShowSQLTasks struct {
// contains filtered or unexported fields
}
func (*ShowSQLTasks) Format ¶
func (node *ShowSQLTasks) Format(ctx *FmtCtx)
func (*ShowSQLTasks) GetQueryType ¶
func (node *ShowSQLTasks) GetQueryType() string
func (*ShowSQLTasks) GetStatementType ¶
func (node *ShowSQLTasks) GetStatementType() string
func (*ShowSQLTasks) StmtKind ¶
func (node *ShowSQLTasks) StmtKind() StmtKind
type ShowSequences ¶ added in v0.8.0
SHOW SEQUENCES statement.
func (*ShowSequences) Format ¶ added in v0.8.0
func (node *ShowSequences) Format(ctx *FmtCtx)
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) 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) 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) 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) 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) 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) 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) 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) 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
AtTsExpr *AtTimeStamp
// 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) 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) 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 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) 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) 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 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
func (*StageComment) Format ¶ added in v1.0.0
func (node *StageComment) Format(ctx *FmtCtx)
type StageCredentials ¶ added in v1.0.0
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 StartWithOption ¶ added in v0.8.0
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()
}
func MakeExplainStmt ¶
func MakeExplainStmt(stmt Statement, options []OptionElem) Statement
type StatementOption ¶ added in v0.7.0
func (StatementOption) Format ¶ added in v0.7.0
func (so StatementOption) Format(ctx *FmtCtx)
type StatementSource ¶
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 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
type StrVal ¶
type StrVal struct {
// contains filtered or unexported fields
}
StrVal represents a constant string value.
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
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
func NewSpatialType ¶
NewSpatialType builds a geometry column type from a DDL spatial type keyword, resolving the aliased forms:
- a trailing "32" (e.g. POINT32, GEOMETRY32) selects the float32 family;
- GEOGRAPHY[32] is the generic geometry with a default SRID of 4326.
The base subtype is recorded in both FamilyString and GeoMetadata.Subtype.
type TableDef ¶
type TableDef interface {
NodeFormatter
}
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) 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) 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",
type Terminated ¶ added in v1.2.0
type Terminated struct {
Value string
}
type TimeUnitExpr ¶
type TimeUnitExpr struct {
Unit string
// contains filtered or unexported fields
}
TimeUnitExpr preserves SQL time-unit keywords such as HOUR and MINUTE without routing them through string-literal formatting.
func NewTimeUnitExpr ¶
func NewTimeUnitExpr(unit string) *TimeUnitExpr
func (*TimeUnitExpr) Format ¶
func (node *TimeUnitExpr) Format(ctx *FmtCtx)
type TimeWindow ¶ added in v1.1.0
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 ToAccountOpt ¶
type ToAccountOpt struct {
AccountName Identifier
}
func (*ToAccountOpt) Format ¶
func (node *ToAccountOpt) Format(ctx *FmtCtx)
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 ¶
the parenthesized list of expressions.
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) 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 ¶
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 UnionTypeRecord ¶
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
// CStrParts are the name components (at most 4: column, table, db/schema, catalog.), in reverse order.
CStrParts CStrParts
// contains filtered or unexported fields
}
the unresolved qualified name like column name.
func NewUnresolvedColName ¶ added in v1.2.1
func NewUnresolvedColName(colName string) *UnresolvedName
func NewUnresolvedName ¶
func NewUnresolvedName(parts ...*CStr) *UnresolvedName
func NewUnresolvedNameWithStar ¶
func NewUnresolvedNameWithStar(parts ...*CStr) *UnresolvedName
func (*UnresolvedName) Accept ¶ added in v0.8.0
func (node *UnresolvedName) Accept(v Visitor) (Expr, bool)
Accept implements NodeChecker Accept interface.
func (*UnresolvedName) ColName ¶ added in v1.2.1
func (node *UnresolvedName) ColName() string
func (*UnresolvedName) ColNameOrigin ¶ added in v1.2.1
func (node *UnresolvedName) ColNameOrigin() string
func (*UnresolvedName) DbName ¶ added in v1.2.1
func (node *UnresolvedName) DbName() string
func (*UnresolvedName) DbNameOrigin ¶ added in v1.2.1
func (node *UnresolvedName) DbNameOrigin() string
func (*UnresolvedName) Format ¶
func (node *UnresolvedName) Format(ctx *FmtCtx)
func (*UnresolvedName) TblName ¶ added in v1.2.1
func (node *UnresolvedName) TblName() string
func (*UnresolvedName) TblNameOrigin ¶ added in v1.2.1
func (node *UnresolvedName) TblNameOrigin() 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(parts ...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
// From is the optional PostgreSQL-style FROM clause that introduces
// additional read-only join sources. It is nil for the classic
// single-table and multi-table (comma) UPDATE syntaxes.
From *From
Where *Where
OrderBy OrderBy
Limit *Limit
With *With
// contains filtered or unexported fields
}
update statement
func (*Update) GetQueryType ¶ added in v0.7.0
func (*Update) GetStatementType ¶ added in v0.7.0
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
}
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) 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) GetQueryType ¶ added in v0.7.0
func (*Use) GetStatementType ¶ added in v0.7.0
type User ¶
type User struct {
NodeFormatter
Username string
Hostname string
AuthOption *AccountIdentified
}
func NewUser ¶
func NewUser(u, h string, a *AccountIdentified) *User
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 (node *UserMiscOptionPasswordExpireDefault) Free()
func (UserMiscOptionPasswordExpireDefault) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordExpireDefault) TypeName() string
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 (node *UserMiscOptionPasswordExpireInterval) Free()
func (UserMiscOptionPasswordExpireInterval) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordExpireInterval) TypeName() string
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 (node *UserMiscOptionPasswordHistoryCount) Free()
func (UserMiscOptionPasswordHistoryCount) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordHistoryCount) TypeName() string
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 (node *UserMiscOptionPasswordHistoryDefault) Free()
func (UserMiscOptionPasswordHistoryDefault) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordHistoryDefault) TypeName() string
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 (node *UserMiscOptionPasswordLockTimeCount) Free()
func (UserMiscOptionPasswordLockTimeCount) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordLockTimeCount) TypeName() string
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 (node *UserMiscOptionPasswordLockTimeUnbounded) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordLockTimeUnbounded) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordLockTimeUnbounded) Free()
func (UserMiscOptionPasswordLockTimeUnbounded) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordLockTimeUnbounded) TypeName() string
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 (node *UserMiscOptionPasswordRequireCurrentDefault) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordRequireCurrentDefault) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordRequireCurrentDefault) Free()
func (UserMiscOptionPasswordRequireCurrentDefault) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordRequireCurrentDefault) TypeName() string
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 (node *UserMiscOptionPasswordRequireCurrentNone) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordRequireCurrentNone) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordRequireCurrentNone) Free()
func (UserMiscOptionPasswordRequireCurrentNone) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordRequireCurrentNone) TypeName() string
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 (node *UserMiscOptionPasswordRequireCurrentOptional) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordRequireCurrentOptional) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordRequireCurrentOptional) Free()
func (UserMiscOptionPasswordRequireCurrentOptional) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordRequireCurrentOptional) TypeName() string
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 (node *UserMiscOptionPasswordReuseIntervalCount) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordReuseIntervalCount) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordReuseIntervalCount) Free()
func (UserMiscOptionPasswordReuseIntervalCount) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordReuseIntervalCount) TypeName() string
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 (node *UserMiscOptionPasswordReuseIntervalDefault) Format(ctx *FmtCtx)
func (*UserMiscOptionPasswordReuseIntervalDefault) Free ¶ added in v1.2.0
func (node *UserMiscOptionPasswordReuseIntervalDefault) Free()
func (UserMiscOptionPasswordReuseIntervalDefault) TypeName ¶ added in v1.2.0
func (node UserMiscOptionPasswordReuseIntervalDefault) TypeName() string
type UsernameRecord ¶
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 ¶
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) 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 (*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
}
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 WhenStmt ¶ added in v0.8.0
func (*WhenStmt) GetQueryType ¶ added in v0.8.0
func (*WhenStmt) GetStatementType ¶ added in v0.8.0
type WhileStmt ¶ added in v0.8.0
type WhileStmt struct {
Name Identifier
Cond Expr
Body []Statement
// contains filtered or unexported fields
}
func (*WhileStmt) GetQueryType ¶ added in v0.8.0
func (*WhileStmt) GetStatementType ¶ added in v0.8.0
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 ¶
func (*With) GetQueryType ¶ added in v0.7.0
func (*With) GetStatementType ¶ added in v0.7.0
type XorExpr ¶
type XorExpr struct {
Left, Right Expr
// contains filtered or unexported fields
}
xor expression
func NewXorExpr ¶
Source Files
¶
- accept.go
- alter.go
- analyze.go
- backup.go
- branch.go
- cdc.go
- clone.go
- compound.go
- connector.go
- constant.go
- create.go
- cstr.go
- data_branch.go
- datum.go
- deallocate.go
- declare.go
- delete.go
- do.go
- drop.go
- execute.go
- explain.go
- expr.go
- extension.go
- format.go
- function.go
- grant.go
- identifier.go
- insert.go
- iteration.go
- kill.go
- lock.go
- mo_dump.go
- object_name.go
- pitr.go
- precedence.go
- prepare.go
- procedure.go
- replace.go
- reset.go
- revoke.go
- select.go
- select_lock.go
- sequence.go
- set.go
- show.go
- snapshot.go
- source.go
- sql_task.go
- stages.go
- stmt.go
- table_function.go
- table_name.go
- task.go
- truncate.go
- txn.go
- types.go
- union.go
- update.go
- upgrade.go
- use.go
- values.go
- view.go
- with.go