package storage
import "github.com/influxdata/influxdb/services/storage"
Index ¶
- Variables
- func HasFieldKeyOrValue(expr influxql.Expr) (bool, bool)
- func HasSingleMeasurementNoOR(expr influxql.Expr) (string, bool)
- func NewContextWithReadOptions(ctx context.Context, opts *ReadOptions) context.Context
- func RewriteExprRemoveFieldKeyAndValue(expr influxql.Expr) influxql.Expr
- type MeasurementNamesRequest
- type MetaClient
- type ReadOptions
- type ReadSource
- func GetReadSource(any *anypb.Any) (*ReadSource, error)
- func (*ReadSource) Descriptor() ([]byte, []int)
- func (x *ReadSource) GetDatabase() string
- func (x *ReadSource) GetRetentionPolicy() string
- func (*ReadSource) ProtoMessage()
- func (x *ReadSource) ProtoReflect() protoreflect.Message
- func (x *ReadSource) Reset()
- func (x *ReadSource) String() string
- type Store
- func NewStore(store *tsdb.Store, metaClient MetaClient) *Store
- func (s *Store) Delete(database string, sources []influxql.Source, condition influxql.Expr) error
- func (s *Store) DeleteRetentionPolicy(database, name string) error
- func (s *Store) GetSource(db, rp string) proto.Message
- func (s *Store) MeasurementNames(ctx context.Context, req *MeasurementNamesRequest) (cursors.StringIterator, error)
- func (s *Store) ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error)
- func (s *Store) ReadFilterLimit(ctx context.Context, req *datatypes.ReadFilterRequest, limitShardIDs []uint64) (reads.ResultSet, error)
- func (s *Store) ReadGroup(ctx context.Context, req *datatypes.ReadGroupRequest) (reads.GroupResultSet, error)
- func (s *Store) ReadGroupLimit(ctx context.Context, req *datatypes.ReadGroupRequest, limitShardIDs []uint64) (reads.GroupResultSet, error)
- func (s *Store) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error)
- func (s *Store) TagValues(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error)
- func (s *Store) WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error)
- func (s *Store) WindowAggregateLimit(ctx context.Context, req *datatypes.ReadWindowAggregateRequest, limitShardIDs []uint64) (reads.ResultSet, error)
- func (s *Store) WithLogger(log *zap.Logger)
Variables ¶
var File_source_proto protoreflect.FileDescriptor
Functions ¶
func HasFieldKeyOrValue ¶
func HasSingleMeasurementNoOR ¶
HasSingleMeasurementNoOR determines if an index optimisation is available.
Typically the read service will use the query engine to retrieve all field keys for all measurements that match the expression, which can be very inefficient if it can be proved that only one measurement matches the expression.
This condition is determined when the following is true:
- there is only one occurrence of the tag key `_measurement`.
- there are no OR operators in the expression tree.
- the operator for the `_measurement` binary expression is ==.
func NewContextWithReadOptions ¶
func NewContextWithReadOptions(ctx context.Context, opts *ReadOptions) context.Context
NewContextWithRequestOptions returns a new Context with nodeID added.
func RewriteExprRemoveFieldKeyAndValue ¶
Types ¶
type MeasurementNamesRequest ¶
type MeasurementNamesRequest struct { MeasurementsSource *anypb.Any Predicate *datatypes.Predicate }
type MetaClient ¶
type MetaClient interface { Database(name string) *meta.DatabaseInfo ShardGroupsByTimeRange(database, policy string, min, max time.Time) (a []meta.ShardGroupInfo, err error) }
type ReadOptions ¶
type ReadOptions struct { NodeID uint64 }
ReadOptions are additional options that may be passed with context.Context to configure the behavior of a storage read request.
func ReadOptionsFromContext ¶
func ReadOptionsFromContext(ctx context.Context) *ReadOptions
ReadOptionsFromContext returns the ReadOptions associated with the context or nil if no additional options have been specified.
type ReadSource ¶
type ReadSource struct { // Database identifies which database to query. Database string `protobuf:"bytes,1,opt,name=database,proto3" json:"database,omitempty"` // RetentionPolicy identifies which retention policy to query. RetentionPolicy string `protobuf:"bytes,2,opt,name=RetentionPolicy,proto3" json:"RetentionPolicy,omitempty"` // contains filtered or unexported fields }
func GetReadSource ¶
func GetReadSource(any *anypb.Any) (*ReadSource, error)
GetReadSource will attempt to unmarshal a ReadSource from the ReadRequest or return an error if no valid resource is present.
func (*ReadSource) Descriptor ¶
func (*ReadSource) Descriptor() ([]byte, []int)
Deprecated: Use ReadSource.ProtoReflect.Descriptor instead.
func (*ReadSource) GetDatabase ¶
func (x *ReadSource) GetDatabase() string
func (*ReadSource) GetRetentionPolicy ¶
func (x *ReadSource) GetRetentionPolicy() string
func (*ReadSource) ProtoMessage ¶
func (*ReadSource) ProtoMessage()
func (*ReadSource) ProtoReflect ¶
func (x *ReadSource) ProtoReflect() protoreflect.Message
func (*ReadSource) Reset ¶
func (x *ReadSource) Reset()
func (*ReadSource) String ¶
func (x *ReadSource) String() string
type Store ¶
type Store struct { TSDBStore *tsdb.Store MetaClient MetaClient Logger *zap.Logger }
func NewStore ¶
func NewStore(store *tsdb.Store, metaClient MetaClient) *Store
func (*Store) Delete ¶
func (*Store) DeleteRetentionPolicy ¶
func (*Store) GetSource ¶
func (*Store) MeasurementNames ¶
func (s *Store) MeasurementNames(ctx context.Context, req *MeasurementNamesRequest) (cursors.StringIterator, error)
func (*Store) ReadFilter ¶
func (s *Store) ReadFilter(ctx context.Context, req *datatypes.ReadFilterRequest) (reads.ResultSet, error)
func (*Store) ReadFilterLimit ¶
func (s *Store) ReadFilterLimit(ctx context.Context, req *datatypes.ReadFilterRequest, limitShardIDs []uint64) (reads.ResultSet, error)
func (*Store) ReadGroup ¶
func (s *Store) ReadGroup(ctx context.Context, req *datatypes.ReadGroupRequest) (reads.GroupResultSet, error)
func (*Store) ReadGroupLimit ¶
func (s *Store) ReadGroupLimit(ctx context.Context, req *datatypes.ReadGroupRequest, limitShardIDs []uint64) (reads.GroupResultSet, error)
func (*Store) TagKeys ¶
func (s *Store) TagKeys(ctx context.Context, req *datatypes.TagKeysRequest) (cursors.StringIterator, error)
func (*Store) TagValues ¶
func (s *Store) TagValues(ctx context.Context, req *datatypes.TagValuesRequest) (cursors.StringIterator, error)
func (*Store) WindowAggregate ¶
func (s *Store) WindowAggregate(ctx context.Context, req *datatypes.ReadWindowAggregateRequest) (reads.ResultSet, error)
func (*Store) WindowAggregateLimit ¶
func (s *Store) WindowAggregateLimit(ctx context.Context, req *datatypes.ReadWindowAggregateRequest, limitShardIDs []uint64) (reads.ResultSet, error)
func (*Store) WithLogger ¶
WithLogger sets the logger for the service.
Source Files ¶
context.go gen.go predicate_influxql.go series_cursor.go source.pb.go store.go
- Version
- v1.12.0 (latest)
- Published
- Apr 8, 2025
- Platform
- linux/amd64
- Imports
- 20 packages
- Last checked
- 2 days ago –
Tools for package owners.