Documentation ¶
Index ¶
- Constants
- Variables
- func EvalExprBool(expr influxql.Expr, m Valuer) bool
- func HasFieldValueKey(expr influxql.Expr) bool
- func IsTrueBooleanLiteral(expr influxql.Expr) bool
- func NodeToExpr(node *datatypes.Node, remap map[string]string) (influxql.Expr, error)
- func PredicateToExprString(p *datatypes.Predicate) string
- func ResultSetToLineProtocol(wr io.Writer, rs ResultSet) (err error)
- func RewriteExprRemoveFieldValue(expr influxql.Expr) influxql.Expr
- func WalkChildren(v NodeVisitor, node *datatypes.Node)
- func WalkNode(v NodeVisitor, node *datatypes.Node)
- type GroupCapability
- type GroupCursor
- type GroupOption
- type GroupResultSet
- type GroupStore
- type KeyMerger
- type NodeVisitor
- type ResultSet
- type SeriesCursor
- type SeriesRow
- type Store
- type Valuer
- type Viewer
- type WindowAggregateCapability
- type WindowAggregateStore
Constants ¶
const ( // MaxPointsPerBlock is the maximum number of points in an encoded // block in a TSM file. It should match the value in the tsm1 // package, but we don't want to import it. MaxPointsPerBlock = 1000 )
Variables ¶
var ( // nil sorts lowest NilSortLo = []byte{0x00} // nil sorts highest NilSortHi = []byte{0xff} )
NilSort values determine the lexicographical order of nil values in the partition key
var BooleanEmptyArrayCursor cursors.BooleanArrayCursor = &booleanEmptyArrayCursor{}
var FloatEmptyArrayCursor cursors.FloatArrayCursor = &floatEmptyArrayCursor{}
var IntegerEmptyArrayCursor cursors.IntegerArrayCursor = &integerEmptyArrayCursor{}
var StringEmptyArrayCursor cursors.StringArrayCursor = &stringEmptyArrayCursor{}
var UnsignedEmptyArrayCursor cursors.UnsignedArrayCursor = &unsignedEmptyArrayCursor{}
Functions ¶
func HasFieldValueKey ¶
func IsTrueBooleanLiteral ¶
func NodeToExpr ¶
NodeToExpr transforms a predicate node to an influxql.Expr.
func PredicateToExprString ¶
func ResultSetToLineProtocol ¶
ResultSetToLineProtocol transforms rs to line protocol and writes the output to wr.
func WalkChildren ¶
func WalkChildren(v NodeVisitor, node *datatypes.Node)
func WalkNode ¶
func WalkNode(v NodeVisitor, node *datatypes.Node)
Types ¶
type GroupCapability ¶
type GroupCapability interface { query.GroupCapability }
type GroupCursor ¶
type GroupCursor interface { // Next advances to the next cursor. Next will return false when there are no // more cursors in the current group. Next() bool // Cursor returns the most recent cursor after a call to Next. Cursor() cursors.Cursor // Tags returns the tags for the most recent cursor after a call to Next. Tags() models.Tags // Keys returns the union of all tag key names for all series produced by // this GroupCursor. Keys() [][]byte // PartitionKeyVals returns the values of all tags identified by the // keys specified in ReadRequest#GroupKeys. The tag values values will // appear in the same order as the GroupKeys. // // When the datatypes.GroupNone strategy is specified, PartitionKeyVals will // be nil. PartitionKeyVals() [][]byte // Close releases any resources allocated by the GroupCursor. Close() // Err returns the first error encountered by the GroupCursor. Err() error Stats() cursors.CursorStats }
type GroupOption ¶
type GroupOption func(g *groupResultSet)
func GroupOptionNilSortLo ¶
func GroupOptionNilSortLo() GroupOption
GroupOptionNilSortLo configures nil values to be sorted lower than any other value
type GroupResultSet ¶
type GroupResultSet interface { // Next advances the GroupResultSet and returns the next GroupCursor. It // returns nil if there are no more groups. Next() GroupCursor // Close releases any resources allocated by the GroupResultSet. Close() // Err returns the first error encountered by the GroupResultSet. Err() error }
func NewGroupResultSet ¶
func NewGroupResultSet(ctx context.Context, req *datatypes.ReadGroupRequest, newSeriesCursorFn func() (SeriesCursor, error), opts ...GroupOption) GroupResultSet
type GroupStore ¶
type GroupStore interface {
GetGroupCapability(ctx context.Context) GroupCapability
}
type KeyMerger ¶
type KeyMerger struct {
// contains filtered or unexported fields
}
tagsKeyMerger is responsible for determining a merged set of tag keys
func (*KeyMerger) MergeTagKeys ¶
type NodeVisitor ¶
type NodeVisitor interface {
Visit(*datatypes.Node) NodeVisitor
}
NodeVisitor can be called by Walk to traverse the Node hierarchy. The Visit() function is called once per node.
type ResultSet ¶
type ResultSet interface { // Next advances the ResultSet to the next cursor. It returns false // when there are no more cursors. Next() bool // Cursor returns the most recent cursor after a call to Next. Cursor() cursors.Cursor // Tags returns the tags for the most recent cursor after a call to Next. Tags() models.Tags // Close releases any resources allocated by the ResultSet. Close() // Err returns the first error encountered by the ResultSet. Err() error Stats() cursors.CursorStats }
func NewFilteredResultSet ¶
func NewFilteredResultSet(ctx context.Context, req *datatypes.ReadFilterRequest, seriesCursor SeriesCursor) ResultSet
func NewWindowAggregateResultSet ¶
func NewWindowAggregateResultSet(ctx context.Context, req *datatypes.ReadWindowAggregateRequest, cursor SeriesCursor) (ResultSet, error)
type SeriesCursor ¶
func NewIndexSeriesCursor ¶
type SeriesRow ¶
type SeriesRow struct { SortKey []byte Name []byte // measurement name SeriesTags models.Tags // unmodified series tags Tags models.Tags // SeriesTags with field key renamed from \xff to _field and measurement key renamed from \x00 to _measurement Field string Query cursors.CursorIterator ValueCond influxql.Expr }
type Store ¶
type Store interface { ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (ResultSet, error) ReadGroup(ctx context.Context, req *datatypes.ReadGroupRequest) (GroupResultSet, error) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error) TagValues(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error) GetSource(orgID, bucketID uint64) proto.Message }
type Valuer ¶
type Valuer interface { // Value returns the value and existence flag for a given key. Value(key string) (interface{}, bool) }
Valuer is the interface that wraps the Value() method.
type Viewer ¶
type Viewer interface { CreateCursorIterator(ctx context.Context) (cursors.CursorIterator, error) CreateSeriesCursor(ctx context.Context, orgID, bucketID influxdb.ID, cond influxql.Expr) (storage.SeriesCursor, error) TagKeys(ctx context.Context, orgID, bucketID influxdb.ID, start, end int64, predicate influxql.Expr) (cursors.StringIterator, error) TagValues(ctx context.Context, orgID, bucketID influxdb.ID, tagKey string, start, end int64, predicate influxql.Expr) (cursors.StringIterator, error) }
Viewer is used by the store to query data from time-series files.
type WindowAggregateCapability ¶
type WindowAggregateCapability interface { query.WindowAggregateCapability }
WindowAggregateCapability describes what is supported by WindowAggregateStore.
type WindowAggregateStore ¶
type WindowAggregateStore interface { // GetWindowAggregateCapability will get a detailed list of what the RPC call supports // for window aggregate. GetWindowAggregateCapability(ctx context.Context) WindowAggregateCapability // WindowAggregate will invoke a ReadWindowAggregateRequest against the Store. WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (ResultSet, error) }
WindowAggregateStore implements the WindowAggregate capability.