Documentation ¶
Index ¶
- Constants
- Variables
- func GetStringArray(array *C.array) []string
- type BoolExpression
- type Expression
- type From
- type FromClause
- type FromClauseType
- type GroupByClause
- type Operation
- type Query
- func (self *Query) GetColumnNames() []*Value
- func (self *Query) GetEndTime() time.Time
- func (self *Query) GetFromClause() *FromClause
- func (self *Query) GetGroupByClause() GroupByClause
- func (self *Query) GetQueryString() string
- func (self *Query) GetReferencedColumns() map[*Value][]string
- func (self *Query) GetStartTime() time.Time
- func (self *Query) GetTableAliases(name string) []string
- func (self *Query) GetWhereCondition() *WhereCondition
- func (self *Query) WillReturnSingleSeries() bool
- type TableName
- type Value
- type ValueType
- type WhereCondition
Constants ¶
View Source
const (
DEFAULT_LIMIT = 10000
)
Variables ¶
View Source
var (
ZERO_TIME = time.Unix(0, 0)
)
Functions ¶
func GetStringArray ¶
Types ¶
type BoolExpression ¶
type BoolExpression struct { Left *Expression Operation string Right *Expression }
func GetBoolExpression ¶
func GetBoolExpression(expr *C.bool_expression) (*BoolExpression, error)
type Expression ¶
type Expression struct { Left interface{} Operation byte Right *Expression }
func GetExpression ¶
func GetExpression(expr *C.expression) (*Expression, error)
func (*Expression) GetLeftExpression ¶
func (self *Expression) GetLeftExpression() (*Expression, bool)
func (*Expression) GetLeftValue ¶
func (self *Expression) GetLeftValue() (*Value, bool)
type FromClause ¶ added in v0.0.5
type FromClause struct { Type FromClauseType Names []*TableName }
func GetFromClause ¶ added in v0.0.5
func GetFromClause(fromClause *C.from_clause) (*FromClause, error)
type FromClauseType ¶ added in v0.0.5
type FromClauseType int
const ( FromClauseArray FromClauseType = C.FROM_ARRAY FromClauseMerge FromClauseType = C.FROM_MERGE FromClauseInnerJoin FromClauseType = C.FROM_INNER_JOIN )
type GroupByClause ¶
type GroupByClause []*Value
func (GroupByClause) GetGroupByTime ¶
func (self GroupByClause) GetGroupByTime() (*time.Duration, error)
type Query ¶
type Query struct { ColumnNames []*Value FromClause *FromClause Condition *WhereCondition Limit int Ascending bool // contains filtered or unexported fields }
func ParseQuery ¶
func (*Query) GetColumnNames ¶
func (*Query) GetEndTime ¶
Returns the start time of the query. Queries can only have one condition of the form time > start_time
func (*Query) GetFromClause ¶
func (self *Query) GetFromClause() *FromClause
func (*Query) GetGroupByClause ¶
func (self *Query) GetGroupByClause() GroupByClause
func (*Query) GetQueryString ¶ added in v0.0.9
func (*Query) GetReferencedColumns ¶
Returns a mapping from the time series names (or regex) to the column names that are references
func (*Query) GetStartTime ¶
Returns the start time of the query. Queries can only have one condition of the form time > start_time
func (*Query) GetTableAliases ¶ added in v0.3.0
func (*Query) GetWhereCondition ¶
func (self *Query) GetWhereCondition() *WhereCondition
func (*Query) WillReturnSingleSeries ¶ added in v0.3.0
type TableName ¶ added in v0.3.0
func GetTableName ¶ added in v0.3.0
func GetTableName(name *C.table_name) (*TableName, error)
func GetTableNameArray ¶ added in v0.3.0
func GetTableNameArray(array *C.table_name_array) ([]*TableName, error)
type Value ¶
type Value struct { Name string Type ValueType IsCaseInsensitive bool Elems []*Value // contains filtered or unexported fields }
func GetValueArray ¶
func GetValueArray(array *C.value_array) ([]*Value, error)
func (*Value) IsFunctionCall ¶
type ValueType ¶
type ValueType int
const ( ValueRegex ValueType = C.VALUE_REGEX ValueInt ValueType = C.VALUE_INT ValueFloat ValueType = C.VALUE_FLOAT ValueString ValueType = C.VALUE_STRING ValueTableName ValueType = C.VALUE_TABLE_NAME ValueSimpleName ValueType = C.VALUE_SIMPLE_NAME ValueDuration ValueType = C.VALUE_DURATION ValueWildcard ValueType = C.VALUE_WILDCARD ValueFunctionCall ValueType = C.VALUE_FUNCTION_CALL )
type WhereCondition ¶
type WhereCondition struct { Left interface{} Operation string Right *WhereCondition // contains filtered or unexported fields }
func GetWhereCondition ¶
func GetWhereCondition(condition *C.condition) (*WhereCondition, error)
func (*WhereCondition) GetBoolExpression ¶
func (self *WhereCondition) GetBoolExpression() (*BoolExpression, bool)
func (*WhereCondition) GetLeftWhereCondition ¶
func (self *WhereCondition) GetLeftWhereCondition() (*WhereCondition, bool)
Click to show internal directories.
Click to hide internal directories.