Versions in this module Expand all Collapse all v1 v1.2.0 Feb 29, 2024 Changes in this version + const ADD + const ALL + const ALTER + const ANALYZE + const AND + const ANY + const AS + const ASC + const ATTRIBUTE + const BEGIN + const BITWISE_AND + const BITWISE_OR + const BITWISE_XOR + const BOUNDPARAM + const BY + const CARDINALITY + const CASE + const CLUSTER + const COLUMNSTORE + const COMMA + const COMPACT + const CONFIG + const CONFIGS + const CONTINUOUS + const CREATE + const DATABASE + const DATABASES + const DEFAULT + const DELAY + const DELETE + const DESC + const DESTINATIONS + const DETAIL + const DIAGNOSTICS + const DIV + const DOT + const DOUBLECOLON + const DOWNSAMPLE + const DOWNSAMPLES + const DROP + const DURATION + const DURATIONVAL + const DateFormat + const DateTimeFormat + const DefaultQueryTimeout + const ELSE + const END + const ENGINETYPE + const EQ + const EQREGEX + const EVERY + const EXACT + const EXISTS + const EXPLAIN + const ExactStatisticQuery + const FALSE + const FIELD + const FILL + const FOR + const FROM + const FULL + const FilterNullColumn + const FullSeriesQuery + const GRANT + const GRANTS + const GROUP + const GROUPS + const GT + const GTE + const HASH + const HINT + const HOT + const IDENT + const IN + const INDEX + const INDEXES + const INDEXLIST + const INDEXTYPE + const INTEGER + const INTO + const JOIN + const KEY + const KEYS + const KILL + const LIKE + const LIMIT + const LPAREN + const LT + const LTE + const MATCH + const MATCHPHRASE + const MEASUREMENT + const MEASUREMENTS + const MOD + const MUL + const MaxTime + const MinTime + const NAME + const NEQ + const NEQREGEX + const NOT + const NUMBER + const OFFSET + const ON + const OR + const ORDER + const OUTER + const PARTITION + const PASSWORD + const POLICIES + const POLICY + const PRIMARYKEY + const PRIVILEGES + const PROPERTY + const QUERIE + const QUERIES + const QUERY + const RANGE + const REGEX + const REPLICANUM + const REPLICAS + const REPLICATION + const RESAMPLE + const RETENTION + const REVOKE + const RPAREN + const SAMPLEINTERVAL + const SCHEMA + const SEGMENT + const SELECT + const SEMICOLON + const SERIES + const SET + const SHARD + const SHARDKEY + const SHARDS + const SHOW + const SLIMIT + const SOFFSET + const SORTKEY + const STATS + const STREAM + const STREAMS + const STRING + const SUB + const SUBSCRIPTION + const SUBSCRIPTIONS + const SpecificSeriesQuery + const TAG + const THEN + const TIMEINTERVAL + const TO + const TOKEN + const TOKENIZERS + const TRUE + const TSSTORE + const TYPE + const UMINUS + const USER + const USERS + const VALUES + const WARM + const WHEN + const WHERE + const WITH + var ErrDeclareEmptyCollection = errors.New("declare empty collection") + var ErrInvalidDuration = errors.New("invalid duration") + var ErrInvalidTime = errors.New("invalid timestamp string") + var ErrNeedBatchMap = errors.New("try batch map later") + var ErrUnsupportBatchMap = errors.New("remote node unsupport batch map type") + var Language = &ParseTree + var SupportHit = map[string]bool + func BinaryExprName(expr *BinaryExpr) string + func ConditionExpr(cond Expr, valuer Valuer) (Expr, TimeRange, error) + func ContainsVarRef(expr Expr) bool + func Eval(expr Expr, m map[string]interface{}) interface + func EvalBool(expr Expr, m map[string]interface{}) bool + func EvalTypeBatch(exprs map[string]Expr, sources Sources, typmap TypeMapper, schema *Schema, ...) error + func FieldDimensions(sources Sources, m FieldMapper, schema *Schema) (fields map[string]DataType, dimensions map[string]struct{}, err error) + func FormatDuration(d time.Duration) string + func HasTimeExpr(expr Expr) bool + func IdentNeedsQuotes(ident string) bool + func IsDOT(ch rune) bool + func IsRegexOp(t Token) bool + func IsSelector(expr Expr) bool + func IsSystemName(name string) bool + func ParseDuration(s string) (time.Duration, error) + func QuoteIdent(segments ...string) string + func QuoteString(s string) string + func RemoveExtraSpace(s string) string + func RewriteCondVarRef(condition Expr, allVarRef map[string]Expr) error + func RewriteMstNameSpace(fields Fields, source Source, hasJoin bool, alias string) error + func RewriteSubQueryNameSpace(source Source, hasJoin bool) error + func Sanitize(query string) string + func ScanDelimited(r io.RuneScanner, start, end rune, escapes map[rune]rune, escapesPassThru bool) ([]byte, error) + func Times2String(times []time.Duration) string + func Walk(v Visitor, node Node) + func WalkFunc(node Node, fn func(Node)) + type AlterRetentionPolicyStatement struct + Database string + Default bool + Duration *time.Duration + HotDuration *time.Duration + IndexGroupDuration *time.Duration + Name string + Replication *int + ShardGroupDuration *time.Duration + WarmDuration *time.Duration + func (s *AlterRetentionPolicyStatement) DefaultDatabase() string + func (s *AlterRetentionPolicyStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *AlterRetentionPolicyStatement) String() string + type AlterShardKeyStatement struct + Database string + Name string + RetentionPolicy string + ShardKey []string + Type string + func (s *AlterShardKeyStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *AlterShardKeyStatement) String() string + type BinaryExpr struct + LHS Expr + Op Token + RHS Expr + func (e *BinaryExpr) RewriteNameSpace(alias, mst string) + func (e *BinaryExpr) String() string + type BooleanLiteral struct + Val bool + func (l *BooleanLiteral) RewriteNameSpace(alias, mst string) + func (l *BooleanLiteral) String() string + type BoundParameter struct + Name string + func (bp *BoundParameter) RewriteNameSpace(alias, mst string) + func (bp *BoundParameter) String() string + type Call struct + Args []Expr + Name string + func (c *Call) RewriteNameSpace(alias, mst string) + func (c *Call) String() string + func (c *Call) WriteDigest(b *bytes.Buffer) + func (c *Call) WriteString(b *bytes.Buffer) + type CallTypeMapper interface + CallType func(name string, args []DataType) (DataType, error) + type CallValuer interface + Call func(name string, args []interface{}) (interface{}, bool) + type CaseWhenExpr struct + Args []Expr + Assigners []Expr + Conditions []Expr + func (p *CaseWhenExpr) RewriteNameSpace(alias, mst string) + func (p *CaseWhenExpr) String() string + type ConfigKey struct + Name string + Regex *RegexLiteral + func (ck *ConfigKey) String() string + type CreateContinuousQueryStatement struct + Database string + Name string + ResampleEvery time.Duration + ResampleFor time.Duration + Source *SelectStatement + func (s *CreateContinuousQueryStatement) DefaultDatabase() string + func (s *CreateContinuousQueryStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateContinuousQueryStatement) String() string + type CreateDatabaseStatement struct + DatabaseAttr DatabasePolicy + Name string + ReplicaNum uint32 + RetentionPolicyCreate bool + RetentionPolicyDuration *time.Duration + RetentionPolicyHotDuration time.Duration + RetentionPolicyIndexGroupDuration time.Duration + RetentionPolicyName string + RetentionPolicyReplication *int + RetentionPolicyShardGroupDuration time.Duration + RetentionPolicyWarmDuration time.Duration + ShardKey []string + func (s *CreateDatabaseStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateDatabaseStatement) String() string + type CreateDownSampleStatement struct + DbName string + Duration time.Duration + Ops Fields + RpName string + SampleInterval []time.Duration + TimeInterval []time.Duration + WaterMark []time.Duration + func (d *CreateDownSampleStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (d *CreateDownSampleStatement) String() string + type CreateMeasurementStatement struct + CompactType string + Database string + EngineType string + Fields map[string]int32 + IndexList [][]string + IndexOption []*IndexOption + IndexType []string + Name string + PrimaryKey []string + Property [][]string + RetentionPolicy string + ShardKey []string + SortKey []string + Tags map[string]int32 + TimeClusterDuration time.Duration + Type string + func (s *CreateMeasurementStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateMeasurementStatement) String() string + type CreateMeasurementStatementOption struct + CompactType string + EngineType string + IndexList [][]string + IndexType []string + PrimaryKey []string + Property [][]string + ShardKey []string + SortKey []string + TimeClusterDuration time.Duration + Type string + type CreateRetentionPolicyStatement struct + Database string + Default bool + Duration time.Duration + HotDuration time.Duration + IndexGroupDuration time.Duration + Name string + Replication int + ShardGroupDuration time.Duration + WarmDuration time.Duration + func (s *CreateRetentionPolicyStatement) DefaultDatabase() string + func (s *CreateRetentionPolicyStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateRetentionPolicyStatement) String() string + type CreateStreamStatement struct + Delay time.Duration + Name string + Query Statement + Target *Target + func (c *CreateStreamStatement) Check(stmt *SelectStatement, supportTable map[string]bool) error + func (c *CreateStreamStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (c *CreateStreamStatement) String() string + type CreateSubscriptionStatement struct + Database string + Destinations []string + Mode string + Name string + RetentionPolicy string + func (s *CreateSubscriptionStatement) DefaultDatabase() string + func (s *CreateSubscriptionStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateSubscriptionStatement) String() string + type CreateUserStatement struct + Admin bool + Name string + Password string + Rwuser bool + func (s *CreateUserStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *CreateUserStatement) String() string + type DataType int + const AnyField + const Boolean + const Duration + const Float + const FloatTuple + const Integer + const String + const Tag + const Time + const Unknown + const Unsigned + func DataTypeFromString(s string) DataType + func EvalType(expr Expr, sources Sources, typmap TypeMapper) DataType + func InspectDataType(v interface{}) DataType + func (d DataType) LessThan(other DataType) bool + func (d DataType) String() string + func (d DataType) Zero() interface{} + type DatabasePolicy struct + EnableTagArray bool + Replicas uint32 + type DeleteSeriesStatement struct + Condition Expr + Sources Sources + func (s *DeleteSeriesStatement) String() string + func (s DeleteSeriesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + type DeleteStatement struct + Condition Expr + Source Source + func (s *DeleteStatement) DefaultDatabase() string + func (s *DeleteStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DeleteStatement) String() string + type Dimension struct + Expr Expr + func (d *Dimension) String() string + type Dimensions []*Dimension + func (a Dimensions) Normalize() (time.Duration, []string) + func (a Dimensions) String() string + type Distinct struct + Val string + func (d *Distinct) NewCall() *Call + func (d *Distinct) RewriteNameSpace(alias, mst string) + func (d *Distinct) String() string + type DropContinuousQueryStatement struct + Database string + Name string + func (s *DropContinuousQueryStatement) DefaultDatabase() string + func (s *DropContinuousQueryStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropContinuousQueryStatement) String() string + type DropDatabaseStatement struct + Name string + func (s *DropDatabaseStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropDatabaseStatement) String() string + type DropDownSampleStatement struct + DbName string + DropAll bool + RpName string + func (d *DropDownSampleStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (d *DropDownSampleStatement) String() string + type DropMeasurementStatement struct + Name string + func (s *DropMeasurementStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropMeasurementStatement) String() string + type DropRetentionPolicyStatement struct + Database string + Name string + func (s *DropRetentionPolicyStatement) DefaultDatabase() string + func (s *DropRetentionPolicyStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropRetentionPolicyStatement) String() string + type DropSeriesStatement struct + Condition Expr + Sources Sources + func (s *DropSeriesStatement) String() string + func (s DropSeriesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + type DropShardStatement struct + ID uint64 + func (s *DropShardStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropShardStatement) String() string + type DropStreamsStatement struct + Name string + func (s *DropStreamsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropStreamsStatement) String() string + type DropSubscriptionStatement struct + Database string + Name string + RetentionPolicy string + func (s *DropSubscriptionStatement) DefaultDatabase() string + func (s *DropSubscriptionStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropSubscriptionStatement) String() string + type DropUserStatement struct + Name string + func (s *DropUserStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *DropUserStatement) String() string + type DurationLiteral struct + Val time.Duration + func (l *DurationLiteral) RewriteNameSpace(alias, mst string) + func (l *DurationLiteral) String() string + type Durations struct + HotDuration time.Duration + IndexGroupDuration time.Duration + PolicyDuration *time.Duration + PolicyName string + ReplicaNum uint32 + Replication *int + ShardGroupDuration time.Duration + ShardKey []string + WarmDuration time.Duration + type EndPrepareSnapshotStatement struct + func (s *EndPrepareSnapshotStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *EndPrepareSnapshotStatement) String() string + type ExecutionPrivilege struct + Admin bool + Name string + Privilege Privilege + Rwuser bool + type ExecutionPrivileges []ExecutionPrivilege + type ExplainStatement struct + Analyze bool + Statement *SelectStatement + func (e *ExplainStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (e *ExplainStatement) String() string + type Expr interface + RewriteNameSpace func(alias, mst string) + func CloneExpr(expr Expr) Expr + func MustParseExpr(s string) Expr + func ParseExpr(s string) (Expr, error) + func Reduce(expr Expr, valuer Valuer) Expr + func RewriteExpr(expr Expr, fn func(Expr) Expr) Expr + type Field struct + Alias string + Expr Expr + func (f *Field) Equal(other *Field) bool + func (f *Field) Name() string + func (f *Field) String() string + func (f *Field) WriteDigest(buf *bytes.Buffer) + type FieldMapper interface + FieldDimensions func(m *Measurement) (fields map[string]DataType, dimensions map[string]struct{}, schema *Schema, ...) + type FieldNameSpace struct + DataType DataType + RealName string + type Fields []*Field + func (a Fields) AliasNames() []string + func (a Fields) Len() int + func (a Fields) Less(i, j int) bool + func (a Fields) Names() []string + func (a Fields) String() string + func (a Fields) Swap(i, j int) + func (a Fields) WriteDigest(buf *bytes.Buffer) + type FillOption int + const LinearFill + const NoFill + const NullFill + const NumberFill + const PreviousFill + type FilterMapValue struct + BooleanValue bool + DataType int + FloatValue float64 + IntegerValue int64 + IsNil bool + StringValue string + type FilterMapValuer map[string]*FilterMapValue + func (m FilterMapValuer) EvalBoolNumeric(expr Expr) (bool, bool) + func (m FilterMapValuer) FilterMapEvalBool(valuer ValuerEval, expr Expr) bool + func (m FilterMapValuer) SetFilterMapValue(name string, value interface{}) + func (m FilterMapValuer) SetValuer(v Valuer, index int) + func (m FilterMapValuer) Value(key string) (interface{}, bool) + type GetRuntimeInfoStatement struct + func (s *GetRuntimeInfoStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *GetRuntimeInfoStatement) String() string + type GrantAdminStatement struct + User string + func (s *GrantAdminStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *GrantAdminStatement) String() string + type GrantStatement struct + On string + Privilege Privilege + User string + func (s *GrantStatement) DefaultDatabase() string + func (s *GrantStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *GrantStatement) String() string + type GroupByCondition struct + Dimensions Dimensions + TimeInterval *DurationLiteral + type HasDefaultDatabase interface + DefaultDatabase func() string + type Hint struct + Expr Expr + func (d *Hint) String() string + type Hints []*Hint + func (a Hints) String() string + type InCondition struct + Column Expr + Stmt *SelectStatement + func (j *InCondition) GetName() string + func (j *InCondition) RewriteNameSpace(alias, mst string) + func (j *InCondition) String() string + type IndexList struct + IList []string + func (il *IndexList) Clone() *IndexList + type IndexOption struct + TimeClusterDuration time.Duration + Tokenizers string + Tokens string + func (io *IndexOption) Clone() *IndexOption + type IndexOptions struct + Options []*IndexOption + func (ios *IndexOptions) Clone() *IndexOptions + type IndexRelation struct + IndexList []*IndexList + IndexNames []string + IndexOptions []*IndexOptions + Oids []uint32 + Rid uint32 + func NewIndexRelation() *IndexRelation + func (ir *IndexRelation) Clone() *IndexRelation + func (ir *IndexRelation) GetBloomFilterColumns() []string + func (ir *IndexRelation) GetFullTextColumns() []string + func (ir *IndexRelation) GetIndexOidByName(indexName string) (uint32, bool) + func (ir *IndexRelation) GetTimeClusterDuration() int64 + func (ir *IndexRelation) IsSkipIndex(idx int) bool + type IndexType struct + type IntegerLiteral struct + Val int64 + func (l *IntegerLiteral) RewriteNameSpace(alias, mst string) + func (l *IntegerLiteral) String() string + type Join struct + Condition Expr + LSrc Source + RSrc Source + func (j *Join) GetName() string + func (j *Join) String() string + type KillQueryStatement struct + Host string + QueryID uint64 + func (s *KillQueryStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *KillQueryStatement) String() string + type ListLiteral struct + Vals []string + func (s *ListLiteral) RewriteNameSpace(alias, mst string) + func (s *ListLiteral) String() string + type Literal interface + type LogPipeStatement struct + Cond Expr + Unnest *Unnest + func (s *LogPipeStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *LogPipeStatement) String() string + type MapValuer map[string]interface + func (m MapValuer) SetValuer(v Valuer, index int) + func (m MapValuer) Value(key string) (interface{}, bool) + type MatchExpr struct + Field Expr + Op int + Value Expr + func (m *MatchExpr) RewriteNameSpace(alias, mst string) + func (m *MatchExpr) String() string + type Measurement struct + Alias string + Database string + EngineType config.EngineType + IndexRelation *IndexRelation + IsSystemStatement bool + IsTarget bool + IsTimeSorted bool + Name string + ObsOptions *obs.ObsOptions + Regex *RegexLiteral + RetentionPolicy string + SystemIterator string + func (m *Measurement) Clone() *Measurement + func (m *Measurement) GetName() string + func (m *Measurement) IsCSStore() bool + func (m *Measurement) IsRWSplit() bool + func (m *Measurement) String() string + type Measurements []*Measurement + func (a Measurements) String() string + type NilLiteral struct + func (l *NilLiteral) RewriteNameSpace(alias, mst string) + func (l *NilLiteral) String() string + type Node interface + String func() string + func Rewrite(r Rewriter, node Node) Node + func RewriteFunc(node Node, fn func(Node) Node) Node + func RewriteOpsNest(r RewriterOpsNest, node Node) Node + func RewriteOpsNestFunc(node Node, fn func(Node) Node) Node + func RewritePercentileOGSketchStatement(node Node) Node + func RewriteTopBottomStatement(node Node) Node + type NowValuer struct + Location *time.Location + Now time.Time + func (v *NowValuer) Call(name string, args []interface{}) (interface{}, bool) + func (v *NowValuer) SetValuer(vv Valuer, index int) + func (v *NowValuer) Value(key string) (interface{}, bool) + func (v *NowValuer) Zone() *time.Location + type NumberLiteral struct + Val float64 + func (l *NumberLiteral) RewriteNameSpace(alias, mst string) + func (l *NumberLiteral) String() string + type ParenExpr struct + Expr Expr + func (e *ParenExpr) RewriteNameSpace(alias, mst string) + func (e *ParenExpr) String() string + type ParseError struct + Expected []string + Found string + Message string + Pos Pos + func (e *ParseError) Error() string + type ParseTree struct + Handlers map[Token]func(*Parser) (Statement, error) + Keys []string + Tokens map[Token]*ParseTree + func (t *ParseTree) Clone() *ParseTree + func (t *ParseTree) Group(tokens ...Token) *ParseTree + func (t *ParseTree) Handle(tok Token, fn func(*Parser) (Statement, error)) + func (t *ParseTree) Parse(p *Parser) (Statement, error) + func (t *ParseTree) With(fn func(*ParseTree)) + type Parser struct + func NewParser(r io.Reader) *Parser + func (p *Parser) GetPara() map[string]interface{} + func (p *Parser) GetScanner() *Scanner + func (p *Parser) ParseDuration() (time.Duration, error) + func (p *Parser) ParseExpr() (Expr, error) + func (p *Parser) ParseIdent() (string, error) + func (p *Parser) ParseIdentList() ([]string, error) + func (p *Parser) ParseInt(min, max int) (int, error) + func (p *Parser) ParseOptionalTokenAndInt(t Token) (int, error) + func (p *Parser) ParseQuery() (*Query, error) + func (p *Parser) ParseStatement() (Statement, error) + func (p *Parser) ParseUInt64() (uint64, error) + func (p *Parser) ParseVarRef() (*VarRef, error) + func (p *Parser) Release() + func (p *Parser) Scan() (tok Token, pos Pos, lit string) + func (p *Parser) ScanIgnoreWhitespace() (tok Token, pos Pos, lit string) + func (p *Parser) SetParams(params map[string]interface{}) + func (p *Parser) Unscan() + type Pos struct + Char int + Line int + type PrepareSnapshotStatement struct + func (s *PrepareSnapshotStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *PrepareSnapshotStatement) String() string + type Privilege int + const AllPrivileges + const NoPrivileges + const ReadPrivilege + const WritePrivilege + func NewPrivilege(p Privilege) *Privilege + func (p Privilege) String() string + type Query struct + Statements Statements + func ParseQuery(s string) (*Query, error) + func (q *Query) SetReturnErr(returnErr bool) + func (q *Query) String() string + func (q *Query) StringAndLocs() (string, [][2]int) + type RegexLiteral struct + Val *regexp.Regexp + func CloneRegexLiteral(r *RegexLiteral) *RegexLiteral + func (r *RegexLiteral) RewriteNameSpace(alias, mst string) + func (r *RegexLiteral) String() string + type RevokeAdminStatement struct + User string + func (s *RevokeAdminStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *RevokeAdminStatement) String() string + type RevokeStatement struct + On string + Privilege Privilege + User string + func (s *RevokeStatement) DefaultDatabase() string + func (s *RevokeStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *RevokeStatement) String() string + type Rewriter interface + Rewrite func(Node) Node + type RewriterOpsNest interface + RewriteOpsNest func(Node) Node + type Scanner struct + func NewScanner(r io.Reader) *Scanner + func (s *Scanner) Scan() (tok Token, pos Pos, lit string) + func (s *Scanner) ScanBareIdent(r io.RuneScanner, checkDOT bool) string + func (s *Scanner) ScanRegex() (tok Token, pos Pos, lit string) + func (s *Scanner) ScanString(r io.RuneScanner) (string, error) + type Schema struct + FileSize int64 + Files int64 + MaxTime int64 + MinTime int64 + TagKeys []string + func (s *Schema) AddMinMaxTime(minT, maxT int64) + type Scroll struct + Scroll string + Scroll_id string + Timeout int + type SelectStatement struct + Condition Expr + Dedupe bool + Dimensions Dimensions + EmitName string + Fields Fields + Fill FillOption + FillValue interface{} + GroupByAllDims bool + HasWildcardField bool + Hints Hints + IsRawQuery bool + JoinSource []*Join + Limit int + Location *time.Location + Offset int + OmitTime bool + ReturnErr bool + SLimit int + SOffset int + Schema Schema + Scroll Scroll + SortFields SortFields + Sources Sources + StmtId int + StripName bool + SubQueryHasDifferentAscending bool + Target *Target + TimeAlias string + UnnestSource []*Unnest + func (s *SelectStatement) Clone() *SelectStatement + func (s *SelectStatement) ColumnNames() []string + func (s *SelectStatement) FieldExprByName(name string) (int, Expr) + func (s *SelectStatement) GetUnnestSchema(fields map[string]DataType) + func (s *SelectStatement) GetUnnestVarRef(allVarRef map[string]Expr) + func (s *SelectStatement) GroupByInterval() (time.Duration, error) + func (s *SelectStatement) GroupByOffset() (time.Duration, error) + func (s *SelectStatement) HasDimensionWildcard() bool + func (s *SelectStatement) HasFieldWildcard() (hasWildcard bool) + func (s *SelectStatement) HasWildcard() bool + func (s *SelectStatement) Reduce(valuer Valuer) *SelectStatement + func (s *SelectStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *SelectStatement) RewriteDistinct() + func (s *SelectStatement) RewriteFields(m FieldMapper, batchEn bool, hasJoin bool) (*SelectStatement, error) + func (s *SelectStatement) RewriteJoinCase(src Source, m FieldMapper, batchEn bool, fields Fields) (Source, error) + func (s *SelectStatement) RewritePercentileOGSketch() + func (s *SelectStatement) RewriteRegexConditions() + func (s *SelectStatement) RewriteTimeFields() + func (s *SelectStatement) RewriteTopBottom() + func (s *SelectStatement) RewriteUnnestSource() + func (s *SelectStatement) RewriteUnnestSourceDFS(unnestSources *[]*Unnest, sources Sources) + func (s *SelectStatement) SetStmtId(id int) + func (s *SelectStatement) SetTimeInterval(t time.Duration) + func (s *SelectStatement) SetTimeRange(start, end time.Time) error + func (s *SelectStatement) String() string + func (s *SelectStatement) TimeAscending() bool + func (s *SelectStatement) TimeFieldName() string + type SetConfigStatement struct + Component string + Key string + Value interface{} + func (s *SetConfigStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *SetConfigStatement) String() string + type SetPasswordUserStatement struct + Name string + Password string + func (s *SetPasswordUserStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *SetPasswordUserStatement) String() string + type ShowClusterStatement struct + NodeID int64 + NodeType string + func (s *ShowClusterStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowClusterStatement) RewriteNameSpace(alias, mst string) + func (s *ShowClusterStatement) String() string + type ShowConfigsStatement struct + Key *ConfigKey + Scope string + func (s *ShowConfigsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowConfigsStatement) String() string + type ShowContinuousQueriesStatement struct + func (s *ShowContinuousQueriesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowContinuousQueriesStatement) String() string + type ShowDatabasesStatement struct + ShowDetail bool + func (s *ShowDatabasesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowDatabasesStatement) String() string + type ShowDiagnosticsStatement struct + Module string + func (s *ShowDiagnosticsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowDiagnosticsStatement) String() string + type ShowDownSampleStatement struct + DbName string + func (d *ShowDownSampleStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (d *ShowDownSampleStatement) String() string + type ShowFieldKeyCardinalityStatement struct + Condition Expr + Database string + Dimensions Dimensions + Exact bool + Limit int + Offset int + Sources Sources + func (s *ShowFieldKeyCardinalityStatement) DefaultDatabase() string + func (s *ShowFieldKeyCardinalityStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowFieldKeyCardinalityStatement) String() string + type ShowFieldKeysStatement struct + Database string + Limit int + Offset int + SortFields SortFields + Sources Sources + func (s *ShowFieldKeysStatement) DefaultDatabase() string + func (s *ShowFieldKeysStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowFieldKeysStatement) String() string + type ShowGrantsForUserStatement struct + Name string + func (s *ShowGrantsForUserStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowGrantsForUserStatement) String() string + type ShowMeasurementCardinalityStatement struct + Condition Expr + Database string + Dimensions Dimensions + Exact bool + Limit int + Offset int + Sources Sources + func (s *ShowMeasurementCardinalityStatement) DefaultDatabase() string + func (s *ShowMeasurementCardinalityStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowMeasurementCardinalityStatement) String() string + type ShowMeasurementKeysStatement struct + Database string + Measurement string + Name string + Rp string + func (s *ShowMeasurementKeysStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowMeasurementKeysStatement) String() string + type ShowMeasurementsStatement struct + Condition Expr + Database string + Limit int + Offset int + SortFields SortFields + Source Source + func (s *ShowMeasurementsStatement) DefaultDatabase() string + func (s *ShowMeasurementsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowMeasurementsStatement) String() string + type ShowQueriesStatement struct + func (s *ShowQueriesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowQueriesStatement) String() string + type ShowRetentionPoliciesStatement struct + Database string + func (s *ShowRetentionPoliciesStatement) DefaultDatabase() string + func (s *ShowRetentionPoliciesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowRetentionPoliciesStatement) String() string + type ShowSeriesCardinalityStatement struct + Condition Expr + Database string + Dimensions Dimensions + Exact bool + Limit int + Offset int + Sources Sources + func (s *ShowSeriesCardinalityStatement) DefaultDatabase() string + func (s *ShowSeriesCardinalityStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowSeriesCardinalityStatement) String() string + type ShowSeriesStatement struct + Condition Expr + Database string + Limit int + Offset int + SortFields SortFields + Sources Sources + func (s *ShowSeriesStatement) DefaultDatabase() string + func (s *ShowSeriesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowSeriesStatement) String() string + type ShowShardGroupsStatement struct + func (s *ShowShardGroupsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowShardGroupsStatement) String() string + type ShowShardsStatement struct + func (s *ShowShardsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowShardsStatement) String() string + type ShowStatsStatement struct + Module string + func (s *ShowStatsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowStatsStatement) String() string + type ShowStreamsStatement struct + Database string + func (s *ShowStreamsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowStreamsStatement) String() string + type ShowSubscriptionsStatement struct + func (s *ShowSubscriptionsStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowSubscriptionsStatement) String() string + type ShowTagKeyCardinalityStatement struct + Condition Expr + Database string + Dimensions Dimensions + Exact bool + Limit int + Offset int + Sources Sources + func (s *ShowTagKeyCardinalityStatement) DefaultDatabase() string + func (s *ShowTagKeyCardinalityStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowTagKeyCardinalityStatement) String() string + type ShowTagKeysStatement struct + Condition Expr + Database string + Limit int + Offset int + SLimit int + SOffset int + SortFields SortFields + Sources Sources + func (s *ShowTagKeysStatement) DefaultDatabase() string + func (s *ShowTagKeysStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowTagKeysStatement) String() string + type ShowTagValuesCardinalityStatement struct + Condition Expr + Database string + Dimensions Dimensions + Exact bool + Limit int + Offset int + Op Token + Sources Sources + TagKeyCondition Expr + TagKeyExpr Literal + func (s *ShowTagValuesCardinalityStatement) DefaultDatabase() string + func (s *ShowTagValuesCardinalityStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowTagValuesCardinalityStatement) String() string + type ShowTagValuesStatement struct + Condition Expr + Database string + Limit int + Offset int + Op Token + SortFields SortFields + Sources Sources + TagKeyCondition Expr + TagKeyExpr Literal + func (s *ShowTagValuesStatement) DefaultDatabase() string + func (s *ShowTagValuesStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowTagValuesStatement) String() string + type ShowUsersStatement struct + func (s *ShowUsersStatement) RequiredPrivileges() (ExecutionPrivileges, error) + func (s *ShowUsersStatement) String() string + type SortField struct + Ascending bool + Name string + func (field *SortField) String() string + type SortFields []*SortField + func ParseSortFields(s string) (SortFields, error) + func (a SortFields) String() string + type Source interface + GetName func() string + func CloneSource(source Source) Source + type Sources []Source + func (a *Sources) UnmarshalBinary(buf []byte) error + func (a Sources) HaveMultiStore() bool + func (a Sources) HaveOnlyCSStore() bool + func (a Sources) HaveOnlyTSStore() bool + func (a Sources) IsSubQuery() bool + func (a Sources) IsUnifyPlan() bool + func (a Sources) MarshalBinary() ([]byte, error) + func (a Sources) Measurements() []*Measurement + func (a Sources) RequiredPrivileges() (ExecutionPrivileges, error) + func (a Sources) String() string + type Statement interface + RequiredPrivileges func() (ExecutionPrivileges, error) + func MustParseStatement(s string) Statement + func ParseStatement(s string) (Statement, error) + type Statements []Statement + func (a Statements) String() string + func (a Statements) StringAndLocs() (string, [][2]int) + type StringLiteral struct + Val string + func (l *StringLiteral) IsTimeLiteral() bool + func (l *StringLiteral) RewriteNameSpace(alias, mst string) + func (l *StringLiteral) String() string + func (l *StringLiteral) ToTimeLiteral(loc *time.Location) (*TimeLiteral, error) + type SubQuery struct + Alias string + Statement *SelectStatement + func (s *SubQuery) GetName() string + func (s *SubQuery) String() string + type Target struct + Measurement *Measurement + func (t *Target) String() string + type TimeLiteral struct + Val time.Time + func (l *TimeLiteral) RewriteNameSpace(alias, mst string) + func (l *TimeLiteral) String() string + type TimeRange struct + Max time.Time + Min time.Time + func (t TimeRange) Intersect(other TimeRange) TimeRange + func (t TimeRange) IsZero() bool + func (t TimeRange) MaxTime() time.Time + func (t TimeRange) MaxTimeNano() int64 + func (t TimeRange) MinTime() time.Time + func (t TimeRange) MinTimeNano() int64 + type Token int + const BADESCAPE + const BADREGEX + const BADSTRING + const COLON + const COMMENT + const DISTINCT + const EOF + const GET + const ILLEGAL + const INF + const INSERT + const PREPARE + const READ + const RUNTIMEINFO + const SNAPSHOT + const WRITE + const WS + func Lookup(ident string) Token + func (tok Token) Precedence() int + func (tok Token) String() string + type TypeError struct + Expr Expr + Message string + func (e *TypeError) Error() string + type TypeMapper interface + MapType func(measurement *Measurement, field string) DataType + MapTypeBatch func(measurement *Measurement, field map[string]*FieldNameSpace, schema *Schema) error + func MultiTypeMapper(mappers ...TypeMapper) TypeMapper + type TypeValuerEval struct + Sources Sources + TypeMapper TypeMapper + func (v *TypeValuerEval) EvalType(expr Expr, batchEn bool) (DataType, error) + func (v *TypeValuerEval) EvalTypeBatch(exprs map[string]Expr, schema *Schema, batchEn bool) (err error) + type Unnest struct + Aliases []string + DstType []DataType + Expr Expr + func (u *Unnest) Clone() *Unnest + func (u *Unnest) GetName() string + func (u *Unnest) IsUnnestField(field string) bool + func (u *Unnest) String() string + type Unnests []*Unnest + func (us Unnests) String() string + type UnsignedLiteral struct + Val uint64 + func (l *UnsignedLiteral) RewriteNameSpace(alias, mst string) + func (l *UnsignedLiteral) String() string + type Valuer interface + SetValuer func(v Valuer, index int) + Value func(key string) (interface{}, bool) + func MultiValuer(valuers ...Valuer) Valuer + func SliceValuer(valuers []Valuer) Valuer + type ValuerEval struct + IntegerFloatDivision bool + Valuer Valuer + func (v *ValuerEval) Eval(expr Expr) interface{} + func (v *ValuerEval) EvalBool(expr Expr) bool + type VarRef struct + Alias string + Type DataType + Val string + func CloneVarRef(expr *VarRef) *VarRef + func ExprNames(expr Expr) []VarRef + func (r *VarRef) Equal(other *VarRef) bool + func (r *VarRef) RewriteNameSpace(alias, mst string) + func (r *VarRef) SetDataType(t DataType) + func (r *VarRef) SetVal(s string) + func (r *VarRef) String() string + func (r *VarRef) WriteDigest(buf *bytes.Buffer) + type VarRefPointers []*VarRef + func (a VarRefPointers) Len() int + func (a VarRefPointers) Less(i, j int) bool + func (a VarRefPointers) Strings() []string + func (a VarRefPointers) Swap(i, j int) + type VarRefs []VarRef + func (a VarRefs) Len() int + func (a VarRefs) Less(i, j int) bool + func (a VarRefs) Strings() []string + func (a VarRefs) Swap(i, j int) + type Visitor interface + Visit func(Node) Visitor + type Wildcard struct + Type Token + func (e *Wildcard) RewriteNameSpace(alias, mst string) + func (e *Wildcard) String() string + type YyParser struct + Params map[string]interface{} + Query Query + Scanner *Scanner + func NewYyParser(s *Scanner, para map[string]interface{}) YyParser + func (p *YyParser) Error(err string) + func (p *YyParser) GetQuery() (*Query, error) + func (p *YyParser) Lex(lval *yySymType) int + func (p *YyParser) ParseTokens() + func (p *YyParser) SetScanner(s *Scanner) + type YyParserError string + func (p YyParserError) Error() string + type ZoneValuer interface + Zone func() *time.Location