feat(storageflux): move flux components out to separate package
parent
49c1d85770
commit
a50e69451e
|
@ -42,7 +42,7 @@ import (
|
||||||
"github.com/influxdata/influxdb/snowflake"
|
"github.com/influxdata/influxdb/snowflake"
|
||||||
"github.com/influxdata/influxdb/source"
|
"github.com/influxdata/influxdb/source"
|
||||||
"github.com/influxdata/influxdb/storage"
|
"github.com/influxdata/influxdb/storage"
|
||||||
"github.com/influxdata/influxdb/storage/reads"
|
storageflux "github.com/influxdata/influxdb/storage/flux"
|
||||||
"github.com/influxdata/influxdb/storage/readservice"
|
"github.com/influxdata/influxdb/storage/readservice"
|
||||||
taskbackend "github.com/influxdata/influxdb/task/backend"
|
taskbackend "github.com/influxdata/influxdb/task/backend"
|
||||||
"github.com/influxdata/influxdb/task/backend/coordinator"
|
"github.com/influxdata/influxdb/task/backend/coordinator"
|
||||||
|
@ -594,7 +594,7 @@ func (m *Launcher) run(ctx context.Context) (err error) {
|
||||||
)
|
)
|
||||||
|
|
||||||
deps, err := influxdb.NewDependencies(
|
deps, err := influxdb.NewDependencies(
|
||||||
reads.NewReader(readservice.NewStore(m.engine)),
|
storageflux.NewReader(readservice.NewStore(m.engine)),
|
||||||
m.engine,
|
m.engine,
|
||||||
authorizer.NewBucketService(bucketSvc),
|
authorizer.NewBucketService(bucketSvc),
|
||||||
authorizer.NewOrgService(orgSvc),
|
authorizer.NewOrgService(orgSvc),
|
||||||
|
|
|
@ -3,7 +3,7 @@ TARGETS =
|
||||||
# List any source files used to generate the targets here
|
# List any source files used to generate the targets here
|
||||||
SOURCES =
|
SOURCES =
|
||||||
# List any directories that have their own Makefile here
|
# List any directories that have their own Makefile here
|
||||||
SUBDIRS = reads
|
SUBDIRS = reads flux
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
all: $(SUBDIRS) $(TARGETS)
|
all: $(SUBDIRS) $(TARGETS)
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
# List any generated files here
|
||||||
|
TARGETS = table.gen.go
|
||||||
|
|
||||||
|
# List any source files used to generate the targets here
|
||||||
|
SOURCES = table.gen.go.tmpl
|
||||||
|
|
||||||
|
# List any directories that have their own Makefile here
|
||||||
|
SUBDIRS =
|
||||||
|
|
||||||
|
# Default target
|
||||||
|
all: $(SUBDIRS) $(TARGETS)
|
||||||
|
|
||||||
|
# Recurse into subdirs for same make goal
|
||||||
|
$(SUBDIRS):
|
||||||
|
$(MAKE) -C $@ $(MAKECMDGOALS)
|
||||||
|
|
||||||
|
# Clean all targets recursively
|
||||||
|
clean: $(SUBDIRS)
|
||||||
|
rm -f $(TARGETS)
|
||||||
|
|
||||||
|
# Define go generate if not already defined
|
||||||
|
GO_GENERATE := go generate
|
||||||
|
|
||||||
|
# Run go generate for the targets
|
||||||
|
$(TARGETS): $(SOURCES)
|
||||||
|
$(GO_GENERATE) -x
|
||||||
|
|
||||||
|
.PHONY: all clean $(SUBDIRS)
|
|
@ -1,4 +1,4 @@
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -10,12 +10,6 @@ import (
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
fieldKey = "_field"
|
|
||||||
measurementKey = "_measurement"
|
|
||||||
valueKey = "_value"
|
|
||||||
)
|
|
||||||
|
|
||||||
func toStoragePredicate(f *semantic.FunctionExpression) (*datatypes.Predicate, error) {
|
func toStoragePredicate(f *semantic.FunctionExpression) (*datatypes.Predicate, error) {
|
||||||
if f.Block.Parameters == nil || len(f.Block.Parameters.List) != 1 {
|
if f.Block.Parameters == nil || len(f.Block.Parameters.List) != 1 {
|
||||||
return nil, errors.New("storage predicate functions must have exactly one parameter")
|
return nil, errors.New("storage predicate functions must have exactly one parameter")
|
||||||
|
@ -119,25 +113,25 @@ func toStoragePredicateHelper(n semantic.Expression, objectName string) (*dataty
|
||||||
return nil, fmt.Errorf("unknown object %q", n.Object)
|
return nil, fmt.Errorf("unknown object %q", n.Object)
|
||||||
}
|
}
|
||||||
switch n.Property {
|
switch n.Property {
|
||||||
case fieldKey:
|
case datatypes.FieldKey:
|
||||||
return &datatypes.Node{
|
return &datatypes.Node{
|
||||||
NodeType: datatypes.NodeTypeTagRef,
|
NodeType: datatypes.NodeTypeTagRef,
|
||||||
Value: &datatypes.Node_TagRefValue{
|
Value: &datatypes.Node_TagRefValue{
|
||||||
TagRefValue: models.FieldKeyTagKey,
|
TagRefValue: models.FieldKeyTagKey,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
case measurementKey:
|
case datatypes.MeasurementKey:
|
||||||
return &datatypes.Node{
|
return &datatypes.Node{
|
||||||
NodeType: datatypes.NodeTypeTagRef,
|
NodeType: datatypes.NodeTypeTagRef,
|
||||||
Value: &datatypes.Node_TagRefValue{
|
Value: &datatypes.Node_TagRefValue{
|
||||||
TagRefValue: models.MeasurementTagKey,
|
TagRefValue: models.MeasurementTagKey,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
case valueKey:
|
case datatypes.ValueKey:
|
||||||
return &datatypes.Node{
|
return &datatypes.Node{
|
||||||
NodeType: datatypes.NodeTypeFieldRef,
|
NodeType: datatypes.NodeTypeFieldRef,
|
||||||
Value: &datatypes.Node_FieldRefValue{
|
Value: &datatypes.Node_FieldRefValue{
|
||||||
FieldRefValue: valueKey,
|
FieldRefValue: datatypes.ValueKey,
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -12,6 +12,7 @@ import (
|
||||||
"github.com/influxdata/flux/values"
|
"github.com/influxdata/flux/values"
|
||||||
"github.com/influxdata/influxdb/models"
|
"github.com/influxdata/influxdb/models"
|
||||||
"github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb"
|
"github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb"
|
||||||
|
storage "github.com/influxdata/influxdb/storage/reads"
|
||||||
"github.com/influxdata/influxdb/storage/reads/datatypes"
|
"github.com/influxdata/influxdb/storage/reads/datatypes"
|
||||||
"github.com/influxdata/influxdb/tsdb/cursors"
|
"github.com/influxdata/influxdb/tsdb/cursors"
|
||||||
)
|
)
|
||||||
|
@ -24,10 +25,11 @@ type storageTable interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type storeReader struct {
|
type storeReader struct {
|
||||||
s Store
|
s storage.Store
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewReader(s Store) influxdb.Reader {
|
// NewReader returns a new storageflux reader
|
||||||
|
func NewReader(s storage.Store) influxdb.Reader {
|
||||||
return &storeReader{s: s}
|
return &storeReader{s: s}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,7 +97,7 @@ func (r *storeReader) Close() {}
|
||||||
|
|
||||||
type filterIterator struct {
|
type filterIterator struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
s Store
|
s storage.Store
|
||||||
spec influxdb.ReadFilterSpec
|
spec influxdb.ReadFilterSpec
|
||||||
stats cursors.CursorStats
|
stats cursors.CursorStats
|
||||||
cache *tagsCache
|
cache *tagsCache
|
||||||
|
@ -143,7 +145,7 @@ func (fi *filterIterator) Do(f func(flux.Table) error) error {
|
||||||
return fi.handleRead(f, rs)
|
return fi.handleRead(f, rs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fi *filterIterator) handleRead(f func(flux.Table) error, rs ResultSet) error {
|
func (fi *filterIterator) handleRead(f func(flux.Table) error, rs storage.ResultSet) error {
|
||||||
// these resources must be closed if not nil on return
|
// these resources must be closed if not nil on return
|
||||||
var (
|
var (
|
||||||
cur cursors.Cursor
|
cur cursors.Cursor
|
||||||
|
@ -219,7 +221,7 @@ READ:
|
||||||
|
|
||||||
type groupIterator struct {
|
type groupIterator struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
s Store
|
s storage.Store
|
||||||
spec influxdb.ReadGroupSpec
|
spec influxdb.ReadGroupSpec
|
||||||
stats cursors.CursorStats
|
stats cursors.CursorStats
|
||||||
cache *tagsCache
|
cache *tagsCache
|
||||||
|
@ -275,10 +277,10 @@ func (gi *groupIterator) Do(f func(flux.Table) error) error {
|
||||||
return gi.handleRead(f, rs)
|
return gi.handleRead(f, rs)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gi *groupIterator) handleRead(f func(flux.Table) error, rs GroupResultSet) error {
|
func (gi *groupIterator) handleRead(f func(flux.Table) error, rs storage.GroupResultSet) error {
|
||||||
// these resources must be closed if not nil on return
|
// these resources must be closed if not nil on return
|
||||||
var (
|
var (
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.Cursor
|
cur cursors.Cursor
|
||||||
table storageTable
|
table storageTable
|
||||||
)
|
)
|
||||||
|
@ -502,7 +504,7 @@ func groupKeyForGroup(kv [][]byte, spec *influxdb.ReadGroupSpec, bnds execute.Bo
|
||||||
type tagKeysIterator struct {
|
type tagKeysIterator struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
bounds execute.Bounds
|
bounds execute.Bounds
|
||||||
s Store
|
s storage.Store
|
||||||
readSpec influxdb.ReadTagKeysSpec
|
readSpec influxdb.ReadTagKeysSpec
|
||||||
predicate *datatypes.Predicate
|
predicate *datatypes.Predicate
|
||||||
alloc *memory.Allocator
|
alloc *memory.Allocator
|
||||||
|
@ -515,11 +517,12 @@ func (ti *tagKeysIterator) Do(f func(flux.Table) error) error {
|
||||||
)
|
)
|
||||||
|
|
||||||
var req datatypes.TagKeysRequest
|
var req datatypes.TagKeysRequest
|
||||||
if any, err := types.MarshalAny(src); err != nil {
|
any, err := types.MarshalAny(src)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
req.TagsSource = any
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
req.TagsSource = any
|
||||||
req.Predicate = ti.predicate
|
req.Predicate = ti.predicate
|
||||||
req.Range.Start = int64(ti.bounds.Start)
|
req.Range.Start = int64(ti.bounds.Start)
|
||||||
req.Range.End = int64(ti.bounds.Stop)
|
req.Range.End = int64(ti.bounds.Stop)
|
||||||
|
@ -584,7 +587,7 @@ func (ti *tagKeysIterator) Statistics() cursors.CursorStats {
|
||||||
type tagValuesIterator struct {
|
type tagValuesIterator struct {
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
bounds execute.Bounds
|
bounds execute.Bounds
|
||||||
s Store
|
s storage.Store
|
||||||
readSpec influxdb.ReadTagValuesSpec
|
readSpec influxdb.ReadTagValuesSpec
|
||||||
predicate *datatypes.Predicate
|
predicate *datatypes.Predicate
|
||||||
alloc *memory.Allocator
|
alloc *memory.Allocator
|
||||||
|
@ -597,11 +600,12 @@ func (ti *tagValuesIterator) Do(f func(flux.Table) error) error {
|
||||||
)
|
)
|
||||||
|
|
||||||
var req datatypes.TagValuesRequest
|
var req datatypes.TagValuesRequest
|
||||||
if any, err := types.MarshalAny(src); err != nil {
|
any, err := types.MarshalAny(src)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else {
|
|
||||||
req.TagsSource = any
|
|
||||||
}
|
}
|
||||||
|
req.TagsSource = any
|
||||||
|
|
||||||
switch ti.readSpec.TagKey {
|
switch ti.readSpec.TagKey {
|
||||||
case "_measurement":
|
case "_measurement":
|
||||||
req.TagKey = models.MeasurementTagKey
|
req.TagKey = models.MeasurementTagKey
|
|
@ -2,9 +2,9 @@
|
||||||
// https://github.com/benbjohnson/tmpl
|
// https://github.com/benbjohnson/tmpl
|
||||||
//
|
//
|
||||||
// DO NOT EDIT!
|
// DO NOT EDIT!
|
||||||
// Source: flux_table.gen.go.tmpl
|
// Source: table.gen.go.tmpl
|
||||||
|
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -14,6 +14,7 @@ import (
|
||||||
"github.com/influxdata/flux/execute"
|
"github.com/influxdata/flux/execute"
|
||||||
"github.com/influxdata/flux/memory"
|
"github.com/influxdata/flux/memory"
|
||||||
"github.com/influxdata/influxdb/models"
|
"github.com/influxdata/influxdb/models"
|
||||||
|
storage "github.com/influxdata/influxdb/storage/reads"
|
||||||
"github.com/influxdata/influxdb/tsdb/cursors"
|
"github.com/influxdata/influxdb/tsdb/cursors"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
@ -101,13 +102,13 @@ func (t *floatTable) advance() bool {
|
||||||
type floatGroupTable struct {
|
type floatGroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.FloatArrayCursor
|
cur cursors.FloatArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func newFloatGroupTable(
|
func newFloatGroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.FloatArrayCursor,
|
cur cursors.FloatArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
||||||
|
@ -286,13 +287,13 @@ func (t *integerTable) advance() bool {
|
||||||
type integerGroupTable struct {
|
type integerGroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.IntegerArrayCursor
|
cur cursors.IntegerArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func newIntegerGroupTable(
|
func newIntegerGroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.IntegerArrayCursor,
|
cur cursors.IntegerArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
||||||
|
@ -471,13 +472,13 @@ func (t *unsignedTable) advance() bool {
|
||||||
type unsignedGroupTable struct {
|
type unsignedGroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.UnsignedArrayCursor
|
cur cursors.UnsignedArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func newUnsignedGroupTable(
|
func newUnsignedGroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.UnsignedArrayCursor,
|
cur cursors.UnsignedArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
||||||
|
@ -656,13 +657,13 @@ func (t *stringTable) advance() bool {
|
||||||
type stringGroupTable struct {
|
type stringGroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.StringArrayCursor
|
cur cursors.StringArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func newStringGroupTable(
|
func newStringGroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.StringArrayCursor,
|
cur cursors.StringArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
||||||
|
@ -841,13 +842,13 @@ func (t *booleanTable) advance() bool {
|
||||||
type booleanGroupTable struct {
|
type booleanGroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.BooleanArrayCursor
|
cur cursors.BooleanArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func newBooleanGroupTable(
|
func newBooleanGroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.BooleanArrayCursor,
|
cur cursors.BooleanArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
|
@ -1,4 +1,4 @@
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -8,6 +8,7 @@ import (
|
||||||
"github.com/influxdata/flux/execute"
|
"github.com/influxdata/flux/execute"
|
||||||
"github.com/influxdata/flux/memory"
|
"github.com/influxdata/flux/memory"
|
||||||
"github.com/influxdata/influxdb/models"
|
"github.com/influxdata/influxdb/models"
|
||||||
|
storage "github.com/influxdata/influxdb/storage/reads"
|
||||||
"github.com/influxdata/influxdb/tsdb/cursors"
|
"github.com/influxdata/influxdb/tsdb/cursors"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
@ -95,13 +96,13 @@ func (t *{{.name}}Table) advance() bool {
|
||||||
type {{.name}}GroupTable struct {
|
type {{.name}}GroupTable struct {
|
||||||
table
|
table
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
gc GroupCursor
|
gc storage.GroupCursor
|
||||||
cur cursors.{{.Name}}ArrayCursor
|
cur cursors.{{.Name}}ArrayCursor
|
||||||
}
|
}
|
||||||
|
|
||||||
func new{{.Name}}GroupTable(
|
func new{{.Name}}GroupTable(
|
||||||
done chan struct{},
|
done chan struct{},
|
||||||
gc GroupCursor,
|
gc storage.GroupCursor,
|
||||||
cur cursors.{{.Name}}ArrayCursor,
|
cur cursors.{{.Name}}ArrayCursor,
|
||||||
bounds execute.Bounds,
|
bounds execute.Bounds,
|
||||||
key flux.GroupKey,
|
key flux.GroupKey,
|
|
@ -1,6 +1,6 @@
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl -data=@types.tmpldata flux_table.gen.go.tmpl
|
//go:generate env GO111MODULE=on go run github.com/benbjohnson/tmpl -data=@types.tmpldata table.gen.go.tmpl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
|
@ -1,4 +1,4 @@
|
||||||
package reads_test
|
package storageflux_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
@ -20,7 +20,6 @@ import (
|
||||||
"github.com/influxdata/influxdb/pkg/data/gen"
|
"github.com/influxdata/influxdb/pkg/data/gen"
|
||||||
"github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb"
|
"github.com/influxdata/influxdb/query/stdlib/influxdata/influxdb"
|
||||||
"github.com/influxdata/influxdb/storage"
|
"github.com/influxdata/influxdb/storage"
|
||||||
"github.com/influxdata/influxdb/storage/reads"
|
|
||||||
"github.com/influxdata/influxdb/storage/readservice"
|
"github.com/influxdata/influxdb/storage/readservice"
|
||||||
"go.uber.org/zap/zaptest"
|
"go.uber.org/zap/zaptest"
|
||||||
)
|
)
|
||||||
|
@ -154,7 +153,7 @@ func benchmarkRead(b *testing.B, sg gen.SeriesGenerator, f func(r influxdb.Reade
|
||||||
if err := engine.Open(context.Background()); err != nil {
|
if err := engine.Open(context.Background()); err != nil {
|
||||||
b.Fatal(err)
|
b.Fatal(err)
|
||||||
}
|
}
|
||||||
reader := reads.NewReader(readservice.NewStore(engine))
|
reader := NewReader(readservice.NewStore(engine))
|
||||||
|
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
b.ReportAllocs()
|
b.ReportAllocs()
|
|
@ -1,4 +1,4 @@
|
||||||
package reads
|
package storageflux
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"container/list"
|
"container/list"
|
|
@ -0,0 +1,27 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"Name":"Float",
|
||||||
|
"name":"float",
|
||||||
|
"Type":"float64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name":"Integer",
|
||||||
|
"name":"integer",
|
||||||
|
"Type":"int64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name":"Unsigned",
|
||||||
|
"name":"unsigned",
|
||||||
|
"Type":"uint64"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name":"String",
|
||||||
|
"name":"string",
|
||||||
|
"Type":"string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Name":"Boolean",
|
||||||
|
"name":"boolean",
|
||||||
|
"Type":"bool"
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,12 +1,10 @@
|
||||||
# List any generated files here
|
# List any generated files here
|
||||||
TARGETS = array_cursor.gen.go \
|
TARGETS = array_cursor.gen.go
|
||||||
flux_table.gen.go
|
|
||||||
|
|
||||||
# List any source files used to generate the targets here
|
# List any source files used to generate the targets here
|
||||||
SOURCES = gen.go \
|
SOURCES = gen.go \
|
||||||
array_cursor.gen.go.tmpl \
|
array_cursor.gen.go.tmpl \
|
||||||
array_cursor.gen.go.tmpldata \
|
array_cursor.gen.go.tmpldata \
|
||||||
flux_table.gen.go.tmpl \
|
|
||||||
types.tmpldata
|
types.tmpldata
|
||||||
|
|
||||||
# List any directories that have their own Makefile here
|
# List any directories that have their own Makefile here
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package datatypes
|
||||||
|
|
||||||
|
const (
|
||||||
|
FieldKey = "_field"
|
||||||
|
MeasurementKey = "_measurement"
|
||||||
|
ValueKey = "_value"
|
||||||
|
)
|
|
@ -31,8 +31,8 @@ type SeriesRow struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
fieldKeyBytes = []byte(fieldKey)
|
fieldKeyBytes = []byte(datatypes.FieldKey)
|
||||||
measurementKeyBytes = []byte(measurementKey)
|
measurementKeyBytes = []byte(datatypes.MeasurementKey)
|
||||||
)
|
)
|
||||||
|
|
||||||
type indexSeriesCursor struct {
|
type indexSeriesCursor struct {
|
||||||
|
|
Loading…
Reference in New Issue