inputs

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const FromGeneratorKind = "fromGenerator"
View Source
const FromSQLKind = "fromSQL"

Variables

This section is empty.

Functions

func CreateSourceFromDecoder

func CreateSourceFromDecoder(decoder SourceDecoder, dsid execute.DatasetID, a execute.Administration) (execute.Source, error)

CreateSourceFromDecoder takes an implementation of a SourceDecoder, as well as a dataset ID and Administration type and creates an execute.Source.

Types

type FromGeneratorOpSpec

type FromGeneratorOpSpec struct {
	Start time.Time                    `json:"start"`
	Stop  time.Time                    `json:"stop"`
	Count int64                        `json:"count"`
	Fn    *semantic.FunctionExpression `json:"fn"`
}

func (*FromGeneratorOpSpec) Kind

type FromGeneratorProcedureSpec

type FromGeneratorProcedureSpec struct {
	plan.DefaultCost
	Start time.Time
	Stop  time.Time
	Count int64
	Fn    compiler.Func
}

func (*FromGeneratorProcedureSpec) Copy

func (*FromGeneratorProcedureSpec) Kind

type FromSQLOpSpec

type FromSQLOpSpec struct {
	DriverName     string `json:"driverName,omitempty"`
	DataSourceName string `json:"dataSourceName,omitempty"`
	Query          string `json:"query,omitempty"`
}

func (*FromSQLOpSpec) Kind

func (s *FromSQLOpSpec) Kind() flux.OperationKind

type FromSQLProcedureSpec

type FromSQLProcedureSpec struct {
	plan.DefaultCost
	DriverName     string
	DataSourceName string
	Query          string
}

func (*FromSQLProcedureSpec) Copy

func (*FromSQLProcedureSpec) Kind

type GeneratorSource

type GeneratorSource struct {
	Start time.Time
	Stop  time.Time
	Count int64

	Fn compiler.Func
	// contains filtered or unexported fields
}

func NewGeneratorSource

func NewGeneratorSource(a *memory.Allocator) *GeneratorSource

func (*GeneratorSource) Connect

func (s *GeneratorSource) Connect() error

func (*GeneratorSource) Decode

func (s *GeneratorSource) Decode() (flux.Table, error)

func (*GeneratorSource) Fetch

func (s *GeneratorSource) Fetch() (bool, error)

type SQLIterator

type SQLIterator struct {
	// contains filtered or unexported fields
}

func (*SQLIterator) Connect

func (c *SQLIterator) Connect() error

func (*SQLIterator) Decode

func (c *SQLIterator) Decode() (flux.Table, error)

func (*SQLIterator) Fetch

func (c *SQLIterator) Fetch() (bool, error)

type SourceDecoder

type SourceDecoder interface {
	Connect() error
	Fetch() (bool, error)
	Decode() (flux.Table, error)
}

Source Decoder is an interface that generalizes the process of retrieving data from an unspecified data source.

Connect implements the logic needed to connect directly to the data source.

Fetch implements a single fetch of data from the source (may be called multiple times). Should return false when there is no more data to retrieve.

Decode implements the process of marshaling the data returned by the source into a flux.Table type.

In executing the retrieval process, Connect is called once at the onset, and subsequent calls of Fetch() and Decode() are called iteratively until the data source is fully consumed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL