Documentation ¶
Index ¶
- Constants
- func GetStringArray(array *C.array) []string
- type BasicQuery
- type DeleteQuery
- type DropQuery
- type DropSeriesQuery
- type From
- type FromClause
- type FromClauseType
- type GroupByClause
- type IntoClause
- type ListQuery
- type ListType
- type Operation
- type Query
- type QueryError
- type QuerySpec
- func (self *QuerySpec) Database() string
- func (self *QuerySpec) DeleteQuery() *DeleteQuery
- func (self *QuerySpec) GetEndTime() time.Time
- func (self *QuerySpec) GetGroupByColumnCount() int
- func (self *QuerySpec) GetGroupByInterval() *time.Duration
- func (self *QuerySpec) GetQueryString() string
- func (self *QuerySpec) GetQueryStringWithTimeCondition() string
- func (self *QuerySpec) GetStartTime() time.Time
- func (self *QuerySpec) HasAggregates() bool
- func (self *QuerySpec) HasReadAccess(name string) bool
- func (self *QuerySpec) IsAscending() bool
- func (self *QuerySpec) IsDeleteFromSeriesQuery() bool
- func (self *QuerySpec) IsDestructiveQuery() bool
- func (self *QuerySpec) IsDropSeriesQuery() bool
- func (self *QuerySpec) IsExplainQuery() bool
- func (self *QuerySpec) IsListSeriesQuery() bool
- func (self *QuerySpec) IsRegex() bool
- func (self *QuerySpec) IsSinglePointQuery() bool
- func (self *QuerySpec) Query() *Query
- func (self *QuerySpec) ReadsFromMultipleSeries() bool
- func (self *QuerySpec) SelectQuery() *SelectQuery
- func (self *QuerySpec) SeriesValuesAndColumns() map[*Value][]string
- func (self *QuerySpec) ShouldQueryShortTermAndLongTerm() (shouldQueryShortTerm bool, shouldQueryLongTerm bool)
- func (self *QuerySpec) TableNames() []string
- func (self *QuerySpec) User() common.User
- type SelectDeleteCommonQuery
- func (self *SelectDeleteCommonQuery) GetFromClause() *FromClause
- func (self *SelectDeleteCommonQuery) GetTableAliases(name string) []string
- func (self *SelectDeleteCommonQuery) GetWhereCondition() *WhereCondition
- func (self *SelectDeleteCommonQuery) GetWhereConditionWithTime(startTime, endTime time.Time) *WhereCondition
- func (self *SelectDeleteCommonQuery) WillReturnSingleSeries() bool
- type SelectQuery
- func (self *SelectQuery) GetColumnNames() []*Value
- func (self *SelectQuery) GetGroupByClause() *GroupByClause
- func (self *SelectQuery) GetIntoClause() *IntoClause
- func (self *SelectQuery) GetQueryString() string
- func (self *SelectQuery) GetQueryStringWithTimeCondition() string
- func (self *SelectQuery) GetQueryStringWithTimes(startTime, endTime time.Time) string
- func (self *SelectQuery) GetQueryStringWithTimesAndNoIntoClause(startTime, endTime time.Time) string
- func (self *SelectQuery) GetReferencedColumns() map[*Value][]string
- func (self *SelectQuery) GetSinglePointQuerySequenceNumber() (int64, error)
- func (self *SelectQuery) HasAggregates() bool
- func (self *SelectQuery) IsContinuousQuery() bool
- func (self *SelectQuery) IsExplainQuery() bool
- func (self *SelectQuery) IsNonRecursiveContinuousQuery() bool
- func (self *SelectQuery) IsSinglePointQuery() bool
- func (self *SelectQuery) IsValidContinuousQuery() bool
- type TableName
- type Value
- type ValueType
- type Values
- type WhereCondition
Constants ¶
View Source
const ( ValueRegex ValueType = C.VALUE_REGEX ValueInt = C.VALUE_INT ValueBool = C.VALUE_BOOLEAN ValueFloat = C.VALUE_FLOAT ValueString = C.VALUE_STRING ValueIntoName = C.VALUE_INTO_NAME ValueTableName = C.VALUE_TABLE_NAME ValueSimpleName = C.VALUE_SIMPLE_NAME ValueDuration = C.VALUE_DURATION ValueWildcard = C.VALUE_WILDCARD ValueFunctionCall = C.VALUE_FUNCTION_CALL ValueExpression = C.VALUE_EXPRESSION )
Variables ¶
This section is empty.
Functions ¶
func GetStringArray ¶
Types ¶
type BasicQuery ¶ added in v0.4.0
type BasicQuery struct {
// contains filtered or unexported fields
}
func (*BasicQuery) GetEndTime ¶ added in v0.4.0
func (self *BasicQuery) GetEndTime() time.Time
Returns the start time of the query. Queries can only have one condition of the form time > start_time
func (*BasicQuery) GetStartTime ¶ added in v0.4.0
func (self *BasicQuery) GetStartTime() time.Time
Returns the start time of the query. Queries can only have one condition of the form time > start_time
type DeleteQuery ¶ added in v0.4.0
type DeleteQuery struct {
SelectDeleteCommonQuery
}
func (*DeleteQuery) GetQueryString ¶ added in v0.5.8
func (self *DeleteQuery) GetQueryString(withTime bool) string
type DropSeriesQuery ¶ added in v0.4.0
type DropSeriesQuery struct {
// contains filtered or unexported fields
}
func (*DropSeriesQuery) GetTableName ¶ added in v0.4.0
func (self *DropSeriesQuery) GetTableName() string
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)
func (*FromClause) GetString ¶ added in v0.5.8
func (self *FromClause) GetString() string
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 ¶
func GetGroupByClause ¶ added in v0.4.0
func GetGroupByClause(groupByClause *C.groupby_clause) (*GroupByClause, error)
func (GroupByClause) GetGroupByTime ¶
func (self GroupByClause) GetGroupByTime() (*time.Duration, error)
func (*GroupByClause) GetString ¶ added in v0.5.8
func (self *GroupByClause) GetString() string
type IntoClause ¶ added in v0.4.0
type IntoClause struct {
Target *Value
}
func GetIntoClause ¶ added in v0.4.0
func GetIntoClause(intoClause *C.into_clause) (*IntoClause, error)
func (*IntoClause) GetString ¶ added in v0.5.8
func (self *IntoClause) GetString() string
type Query ¶
type Query struct { QueryString string SelectQuery *SelectQuery DeleteQuery *DeleteQuery ListQuery *ListQuery DropSeriesQuery *DropSeriesQuery DropQuery *DropQuery }
func ParseQuery ¶
func (*Query) GetQueryString ¶ added in v0.0.9
func (*Query) GetQueryStringWithTimeCondition ¶ added in v0.5.8
func (*Query) IsExplainQuery ¶ added in v0.5.0
func (*Query) IsListContinuousQueriesQuery ¶ added in v0.4.0
func (*Query) IsListQuery ¶ added in v0.4.0
func (*Query) IsListSeriesQuery ¶ added in v0.4.0
type QueryError ¶ added in v0.5.7
type QueryError struct {
// contains filtered or unexported fields
}
func (*QueryError) Error ¶ added in v0.5.7
func (self *QueryError) Error() string
func (*QueryError) PrettyPrint ¶ added in v0.5.7
func (self *QueryError) PrettyPrint() string
type QuerySpec ¶ added in v0.5.0
type QuerySpec struct { RunAgainstAllServersInShard bool // contains filtered or unexported fields }
func NewQuerySpec ¶ added in v0.5.0
func (*QuerySpec) DeleteQuery ¶ added in v0.5.0
func (self *QuerySpec) DeleteQuery() *DeleteQuery
func (*QuerySpec) GetEndTime ¶ added in v0.5.0
func (*QuerySpec) GetGroupByColumnCount ¶ added in v0.5.4
func (*QuerySpec) GetGroupByInterval ¶ added in v0.5.0
func (*QuerySpec) GetQueryString ¶ added in v0.5.0
func (*QuerySpec) GetQueryStringWithTimeCondition ¶ added in v0.5.0
func (*QuerySpec) GetStartTime ¶ added in v0.5.0
func (*QuerySpec) HasAggregates ¶ added in v0.5.0
func (*QuerySpec) HasReadAccess ¶ added in v0.5.0
func (*QuerySpec) IsAscending ¶ added in v0.5.0
func (*QuerySpec) IsDeleteFromSeriesQuery ¶ added in v0.5.0
func (*QuerySpec) IsDestructiveQuery ¶ added in v0.5.0
func (*QuerySpec) IsDropSeriesQuery ¶ added in v0.5.0
func (*QuerySpec) IsExplainQuery ¶ added in v0.5.0
func (*QuerySpec) IsListSeriesQuery ¶ added in v0.5.0
func (*QuerySpec) IsSinglePointQuery ¶ added in v0.5.0
func (*QuerySpec) ReadsFromMultipleSeries ¶ added in v0.5.0
func (*QuerySpec) SelectQuery ¶ added in v0.5.0
func (self *QuerySpec) SelectQuery() *SelectQuery
func (*QuerySpec) SeriesValuesAndColumns ¶ added in v0.5.0
func (*QuerySpec) ShouldQueryShortTermAndLongTerm ¶ added in v0.5.0
func (*QuerySpec) TableNames ¶ added in v0.5.0
type SelectDeleteCommonQuery ¶ added in v0.4.0
type SelectDeleteCommonQuery struct { BasicQuery FromClause *FromClause Condition *WhereCondition }
func (*SelectDeleteCommonQuery) GetFromClause ¶ added in v0.4.0
func (self *SelectDeleteCommonQuery) GetFromClause() *FromClause
func (*SelectDeleteCommonQuery) GetTableAliases ¶ added in v0.4.0
func (self *SelectDeleteCommonQuery) GetTableAliases(name string) []string
func (*SelectDeleteCommonQuery) GetWhereCondition ¶ added in v0.4.0
func (self *SelectDeleteCommonQuery) GetWhereCondition() *WhereCondition
func (*SelectDeleteCommonQuery) GetWhereConditionWithTime ¶ added in v0.5.8
func (self *SelectDeleteCommonQuery) GetWhereConditionWithTime(startTime, endTime time.Time) *WhereCondition
func (*SelectDeleteCommonQuery) WillReturnSingleSeries ¶ added in v0.4.0
func (self *SelectDeleteCommonQuery) WillReturnSingleSeries() bool
type SelectQuery ¶ added in v0.4.0
type SelectQuery struct { SelectDeleteCommonQuery ColumnNames []*Value IntoClause *IntoClause Limit int Ascending bool Explain bool // contains filtered or unexported fields }
func ParseSelectQuery ¶ added in v0.4.0
func ParseSelectQuery(query string) (*SelectQuery, error)
This is just for backward compatability so we don't have to change all the code.
func (*SelectQuery) GetColumnNames ¶ added in v0.4.0
func (self *SelectQuery) GetColumnNames() []*Value
func (*SelectQuery) GetGroupByClause ¶ added in v0.4.0
func (self *SelectQuery) GetGroupByClause() *GroupByClause
func (*SelectQuery) GetIntoClause ¶ added in v0.4.0
func (self *SelectQuery) GetIntoClause() *IntoClause
func (*SelectQuery) GetQueryString ¶ added in v0.5.8
func (self *SelectQuery) GetQueryString() string
func (*SelectQuery) GetQueryStringWithTimeCondition ¶ added in v0.5.8
func (self *SelectQuery) GetQueryStringWithTimeCondition() string
func (*SelectQuery) GetQueryStringWithTimes ¶ added in v0.5.8
func (self *SelectQuery) GetQueryStringWithTimes(startTime, endTime time.Time) string
func (*SelectQuery) GetQueryStringWithTimesAndNoIntoClause ¶ added in v0.5.8
func (self *SelectQuery) GetQueryStringWithTimesAndNoIntoClause(startTime, endTime time.Time) string
func (*SelectQuery) GetReferencedColumns ¶ added in v0.4.0
func (self *SelectQuery) GetReferencedColumns() map[*Value][]string
Returns a mapping from the time series names (or regex) to the column names that are references
func (*SelectQuery) GetSinglePointQuerySequenceNumber ¶ added in v0.4.0
func (self *SelectQuery) GetSinglePointQuerySequenceNumber() (int64, error)
func (*SelectQuery) HasAggregates ¶ added in v0.5.0
func (self *SelectQuery) HasAggregates() bool
Returns true if the query has aggregate functions applied to the columns
func (*SelectQuery) IsContinuousQuery ¶ added in v0.4.0
func (self *SelectQuery) IsContinuousQuery() bool
func (*SelectQuery) IsExplainQuery ¶ added in v0.5.0
func (self *SelectQuery) IsExplainQuery() bool
func (*SelectQuery) IsNonRecursiveContinuousQuery ¶ added in v0.5.11
func (self *SelectQuery) IsNonRecursiveContinuousQuery() bool
func (*SelectQuery) IsSinglePointQuery ¶ added in v0.4.0
func (self *SelectQuery) IsSinglePointQuery() bool
func (*SelectQuery) IsValidContinuousQuery ¶ added in v0.5.0
func (self *SelectQuery) IsValidContinuousQuery() bool
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)
func (*TableName) GetAliasString ¶ added in v0.5.8
type Value ¶
type Value struct { Name string Alias string Type ValueType Elems []*Value IsInsensitive bool // contains filtered or unexported fields }
func GetValueArray ¶
func GetValueArray(array *C.value_array) ([]*Value, error)
func (*Value) IsFunctionCall ¶
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() (*Value, bool)
func (*WhereCondition) GetLeftWhereCondition ¶
func (self *WhereCondition) GetLeftWhereCondition() (*WhereCondition, bool)
func (*WhereCondition) GetString ¶ added in v0.5.8
func (self *WhereCondition) GetString() string
Click to show internal directories.
Click to hide internal directories.