Versions in this module Expand all Collapse all v1 v1.3.0-alpha.3 Apr 26, 2016 v1.2.3 Apr 22, 2016 Changes in this version + const Boolean + const DateFormat + const DateTimeFormat + const Duration + const Float + const Integer + const String + const Time + const Unknown + var ErrInvalidDuration = errors.New("invalid duration") + func Eval(expr Expr, m map[string]interface{}) interface + func FormatDuration(d time.Duration) string + func IdentNeedsQuotes(ident string) bool + func IsNumeric(c *Call) bool + func IsRegexOp(t Token) bool + func MapCount(itr Iterator) interface + func MapCountDistinct(itr Iterator) interface + func MapDistinct(itr Iterator) interface + func MapEcho(itr Iterator) interface + func MapFirst(itr Iterator) interface + func MapLast(itr Iterator) interface + func MapMax(itr Iterator) interface + func MapMean(itr Iterator) interface + func MapMin(itr Iterator) interface + func MapRawQuery(itr Iterator) interface + func MapSpread(itr Iterator) interface + func MapStddev(itr Iterator) interface + func MapSum(itr Iterator) interface + func MatchSource(sources Sources, name string) string + func ParseDuration(s string) (time.Duration, error) + func QuoteIdent(segments ...string) string + func QuoteString(s string) string + func ReduceCountDistinct(values []interface{}) interface + func ReduceDistinct(values []interface{}) interface + func ReduceFirst(values []interface{}) interface + func ReduceLast(values []interface{}) interface + func ReduceMax(values []interface{}) interface + func ReduceMean(values []interface{}) interface + func ReduceMedian(values []interface{}) interface + func ReduceMin(values []interface{}) interface + func ReduceSpread(values []interface{}) interface + func ReduceStddev(values []interface{}) interface + func ReduceSum(values []interface{}) interface + func ScanBareIdent(r io.RuneScanner) string + func ScanDelimited(r io.RuneScanner, start, end rune, escapes map[rune]rune, escapesPassThru bool) ([]byte, error) + func ScanString(r io.RuneScanner) (string, error) + func TimeRange(expr Expr) (min, max time.Time) + func TimeRangeAsEpochNano(expr Expr) (min, max int64) + func Walk(v Visitor, node Node) + func WalkFunc(node Node, fn func(Node)) + type AlterRetentionPolicyStatement struct + Database string + Default bool + Duration *time.Duration + Name string + Replication *int + func (s *AlterRetentionPolicyStatement) RequiredPrivileges() ExecutionPrivileges + func (s *AlterRetentionPolicyStatement) String() string + type BinaryExpr struct + LHS Expr + Op Token + RHS Expr + func (e *BinaryExpr) String() string + type BooleanLiteral struct + Val bool + func (l *BooleanLiteral) String() string + type Call struct + Args []Expr + Name string + func (c *Call) String() string + type CreateContinuousQueryStatement struct + Database string + Name string + Source *SelectStatement + func (s *CreateContinuousQueryStatement) DefaultDatabase() string + func (s *CreateContinuousQueryStatement) RequiredPrivileges() ExecutionPrivileges + func (s *CreateContinuousQueryStatement) String() string + type CreateDatabaseStatement struct + Name string + func (s *CreateDatabaseStatement) RequiredPrivileges() ExecutionPrivileges + func (s *CreateDatabaseStatement) String() string + type CreateRetentionPolicyStatement struct + Database string + Default bool + Duration time.Duration + Name string + Replication int + func (s *CreateRetentionPolicyStatement) RequiredPrivileges() ExecutionPrivileges + func (s *CreateRetentionPolicyStatement) String() string + type CreateUserStatement struct + Admin bool + Name string + Password string + func (s *CreateUserStatement) RequiredPrivileges() ExecutionPrivileges + func (s *CreateUserStatement) String() string + type DataType int + func InspectDataType(v interface{}) DataType + func (d DataType) String() string + type DeleteStatement struct + Condition Expr + Source Source + func (s *DeleteStatement) RequiredPrivileges() ExecutionPrivileges + 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, error) + func (a Dimensions) String() string + type Distinct struct + Val string + func (d *Distinct) NewCall() *Call + func (d *Distinct) String() string + type DropContinuousQueryStatement struct + Database string + Name string + func (s *DropContinuousQueryStatement) RequiredPrivileges() ExecutionPrivileges + func (s *DropContinuousQueryStatement) String() string + type DropDatabaseStatement struct + Name string + func (s *DropDatabaseStatement) RequiredPrivileges() ExecutionPrivileges + func (s *DropDatabaseStatement) String() string + type DropMeasurementStatement struct + Name string + func (s *DropMeasurementStatement) RequiredPrivileges() ExecutionPrivileges + func (s *DropMeasurementStatement) String() string + type DropRetentionPolicyStatement struct + Database string + Name string + func (s *DropRetentionPolicyStatement) RequiredPrivileges() ExecutionPrivileges + func (s *DropRetentionPolicyStatement) String() string + type DropSeriesStatement struct + Condition Expr + Sources Sources + func (s *DropSeriesStatement) String() string + func (s DropSeriesStatement) RequiredPrivileges() ExecutionPrivileges + type DropUserStatement struct + Name string + func (s *DropUserStatement) RequiredPrivileges() ExecutionPrivileges + func (s *DropUserStatement) String() string + type DurationLiteral struct + Val time.Duration + func (l *DurationLiteral) String() string + type ExecutionPrivilege struct + Admin bool + Name string + Privilege Privilege + type ExecutionPrivileges []ExecutionPrivilege + type Expr interface + func CloneExpr(expr Expr) Expr + func ParseExpr(s string) (Expr, error) + func Reduce(expr Expr, valuer Valuer) Expr + type Field struct + Alias string + Expr Expr + func (f *Field) Name() string + func (f *Field) String() string + type Fields []*Field + func (a Fields) String() string + func (f Fields) Len() int + func (f Fields) Less(i, j int) bool + func (f Fields) Swap(i, j int) + type FillOption int + const NoFill + const NullFill + const NumberFill + const PreviousFill + type GrantAdminStatement struct + User string + func (s *GrantAdminStatement) RequiredPrivileges() ExecutionPrivileges + func (s *GrantAdminStatement) String() string + type GrantStatement struct + On string + Privilege Privilege + User string + func (s *GrantStatement) RequiredPrivileges() ExecutionPrivileges + func (s *GrantStatement) String() string + type HasDefaultDatabase interface + DefaultDatabase func() string + type Iterator interface + Next func() (time int64, value interface{}) + type MapFunc func(Iterator) interface + func InitializeMapFunc(c *Call) (MapFunc, error) + type Measurement struct + Database string + Name string + Regex *RegexLiteral + RetentionPolicy string + func (m *Measurement) String() string + type Measurements []*Measurement + func (a Measurements) String() string + type Node interface + String func() string + func Rewrite(r Rewriter, node Node) Node + func RewriteFunc(node Node, fn func(Node) Node) Node + type NowValuer struct + Now time.Time + func (v *NowValuer) Value(key string) (interface{}, bool) + type NumberLiteral struct + Val float64 + func (l *NumberLiteral) String() string + type NumberType int8 + const Float64Type + const Int64Type + type ParenExpr struct + Expr Expr + func (e *ParenExpr) String() string + type ParseError struct + Expected []string + Found string + Message string + Pos Pos + func (e *ParseError) Error() string + type Parser struct + func NewParser(r io.Reader) *Parser + func (p *Parser) ParseExpr() (Expr, error) + func (p *Parser) ParseQuery() (*Query, error) + func (p *Parser) ParseStatement() (Statement, error) + type Pos struct + Char int + Line int + type Privilege int + const AllPrivileges + const NoPrivileges + const ReadPrivilege + const WritePrivilege + func NewPrivilege(p Privilege) *Privilege + func (p Privilege) String() string + type Processor func(values []interface{}) interface + func GetProcessor(expr Expr, startIndex int) (Processor, int) + type Query struct + Statements Statements + func ParseQuery(s string) (*Query, error) + func (q *Query) String() string + type ReduceFunc func([]interface{}) interface + func InitializeReduceFunc(c *Call) (ReduceFunc, error) + func ReducePercentile(percentile float64) ReduceFunc + type RegexLiteral struct + Val *regexp.Regexp + func CloneRegexLiteral(r *RegexLiteral) *RegexLiteral + func (r *RegexLiteral) String() string + type Result struct + Err error + Series Rows + StatementID int + func (r *Result) MarshalJSON() ([]byte, error) + func (r *Result) UnmarshalJSON(b []byte) error + type RevokeAdminStatement struct + User string + func (s *RevokeAdminStatement) RequiredPrivileges() ExecutionPrivileges + func (s *RevokeAdminStatement) String() string + type RevokeStatement struct + On string + Privilege Privilege + User string + func (s *RevokeStatement) RequiredPrivileges() ExecutionPrivileges + func (s *RevokeStatement) String() string + type Rewriter interface + Rewrite func(Node) Node + type Row struct + Columns []string + Err error + Name string + Tags map[string]string + Values [][]interface{} + type Rows []*Row + func (p Rows) Len() int + func (p Rows) Less(i, j int) bool + func (p Rows) Swap(i, j int) + type Scanner struct + func NewScanner(r io.Reader) *Scanner + func (s *Scanner) Scan() (tok Token, pos Pos, lit string) + func (s *Scanner) ScanRegex() (tok Token, pos Pos, lit string) + type SelectStatement struct + Condition Expr + Dimensions Dimensions + Fields Fields + Fill FillOption + FillValue interface{} + IsRawQuery bool + Limit int + Offset int + SLimit int + SOffset int + SortFields SortFields + Sources Sources + Target *Target + func (s *SelectStatement) Clone() *SelectStatement + func (s *SelectStatement) FunctionCalls() []*Call + func (s *SelectStatement) GroupByInterval() (time.Duration, error) + func (s *SelectStatement) HasCountDistinct() bool + func (s *SelectStatement) HasDerivative() bool + func (s *SelectStatement) HasDistinct() bool + func (s *SelectStatement) HasWildcard() bool + func (s *SelectStatement) IsSimpleDerivative() bool + func (s *SelectStatement) NamesInSelect() []string + func (s *SelectStatement) NamesInWhere() []string + func (s *SelectStatement) OnlyTimeDimensions() bool + func (s *SelectStatement) RequiredPrivileges() ExecutionPrivileges + func (s *SelectStatement) RewriteDistinct() + func (s *SelectStatement) RewriteWildcards(fields Fields, dimensions Dimensions) *SelectStatement + func (s *SelectStatement) SetTimeRange(start, end time.Time) error + func (s *SelectStatement) String() string + func (s *SelectStatement) Substatement(ref *VarRef) (*SelectStatement, error) + type SetPasswordUserStatement struct + Name string + Password string + func (s *SetPasswordUserStatement) RequiredPrivileges() ExecutionPrivileges + func (s *SetPasswordUserStatement) String() string + type ShowContinuousQueriesStatement struct + func (s *ShowContinuousQueriesStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowContinuousQueriesStatement) String() string + type ShowDatabasesStatement struct + func (s *ShowDatabasesStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowDatabasesStatement) String() string + type ShowDiagnosticsStatement struct + func (s *ShowDiagnosticsStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowDiagnosticsStatement) String() string + type ShowFieldKeysStatement struct + Limit int + Offset int + SortFields SortFields + Sources Sources + func (s *ShowFieldKeysStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowFieldKeysStatement) String() string + type ShowGrantsForUserStatement struct + Name string + func (s *ShowGrantsForUserStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowGrantsForUserStatement) String() string + type ShowMeasurementsStatement struct + Condition Expr + Limit int + Offset int + SortFields SortFields + func (s *ShowMeasurementsStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowMeasurementsStatement) String() string + type ShowRetentionPoliciesStatement struct + Database string + func (s *ShowRetentionPoliciesStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowRetentionPoliciesStatement) String() string + type ShowSeriesStatement struct + Condition Expr + Limit int + Offset int + SortFields SortFields + Sources Sources + func (s *ShowSeriesStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowSeriesStatement) String() string + type ShowServersStatement struct + func (s *ShowServersStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowServersStatement) String() string + type ShowStatsStatement struct + Host string + func (s *ShowStatsStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowStatsStatement) String() string + type ShowTagKeysStatement struct + Condition Expr + Limit int + Offset int + SortFields SortFields + Sources Sources + func (s *ShowTagKeysStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowTagKeysStatement) String() string + type ShowTagValuesStatement struct + Condition Expr + Limit int + Offset int + SortFields SortFields + Sources Sources + TagKeys []string + func (s *ShowTagValuesStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowTagValuesStatement) String() string + type ShowUsersStatement struct + func (s *ShowUsersStatement) RequiredPrivileges() ExecutionPrivileges + func (s *ShowUsersStatement) String() string + type SortField struct + Ascending bool + Name string + func (field *SortField) String() string + type SortFields []*SortField + func (a SortFields) String() string + type Source interface + type Sources []Source + func (a Sources) String() string + type Statement interface + RequiredPrivileges func() ExecutionPrivileges + func MustParseStatement(s string) Statement + func ParseStatement(s string) (Statement, error) + type Statements []Statement + func (a Statements) String() string + type StringLiteral struct + Val string + func (l *StringLiteral) String() string + type TagSet struct + Filters []Expr + Key []byte + SeriesKeys []string + Tags map[string]string + func (t *TagSet) AddFilter(key string, filter Expr) + type Target struct + Measurement *Measurement + func (t *Target) String() string + type TimeLiteral struct + Val time.Time + func (l *TimeLiteral) String() string + type Token int + const ADD + const ALL + const ALTER + const AND + const AS + const ASC + const BADESCAPE + const BADREGEX + const BADSTRING + const BEGIN + const BY + const COMMA + const CONTINUOUS + const CREATE + const DATABASE + const DATABASES + const DEFAULT + const DELETE + const DESC + const DIAGNOSTICS + const DISTINCT + const DIV + const DOT + const DROP + const DURATION + const DURATION_VAL + const END + const EOF + const EQ + const EQREGEX + const EXISTS + const EXPLAIN + const FALSE + const FIELD + const FOR + const FROM + const GRANT + const GRANTS + const GROUP + const GT + const GTE + const IDENT + const IF + const ILLEGAL + const IN + const INF + const INNER + const INSERT + const INTO + const KEY + const KEYS + const LIMIT + const LPAREN + const LT + const LTE + const MEASUREMENT + const MEASUREMENTS + const MUL + const NEQ + const NEQREGEX + const NUMBER + const OFFSET + const ON + const OR + const ORDER + const PASSWORD + const POLICIES + const POLICY + const PRIVILEGES + const QUERIES + const QUERY + const READ + const REGEX + const REPLICATION + const RETENTION + const REVOKE + const RPAREN + const SELECT + const SEMICOLON + const SERIES + const SERVERS + const SET + const SHOW + const SLIMIT + const SOFFSET + const STATS + const STRING + const SUB + const TAG + const TO + const TRUE + const USER + const USERS + const VALUES + const WHERE + const WITH + const WRITE + const WS + func Lookup(ident string) Token + func (tok Token) Precedence() int + func (tok Token) String() string + type UnmarshalFunc func([]byte) (interface{}, error) + func InitializeUnmarshaller(c *Call) (UnmarshalFunc, error) + type Valuer interface + Value func(key string) (interface{}, bool) + type VarRef struct + Val string + func (r *VarRef) String() string + type Visitor interface + Visit func(Node) Visitor + type Wildcard struct + func (e *Wildcard) String() string v1.2.0-beta.0 Mar 4, 2016