redis

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultKeys resultType = iota
	True
	False
)

Variables

View Source
var ErrNotFound = errors.New("redis key not found")

Functions

func GetNewRecord

func GetNewRecord(client *redis.Client, keyName, key, alias string) (*execution.Record, error)

func NewDataSourceBuilderFactory

func NewDataSourceBuilderFactory(dbKey string) physical.DataSourceBuilderFactory

NewDataSourceBuilderFactory creates a new datasource builder factory for a redis database. dbKey is the name for hard-coded key alias used in future formulas for redis queries

func NewDataSourceBuilderFactoryFromConfig

func NewDataSourceBuilderFactoryFromConfig(dbConfig map[string]interface{}) (physical.DataSourceBuilderFactory, error)

NewDataSourceBuilderFactoryFromConfig creates a data source builder factory using the configuration.

Types

type And

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

Just like logical operator, the form is like: (formula1 AND formula2) getAllKeys returns intersection of 2 key sets

func NewAnd

func NewAnd(left, right KeyFormula) *And

type Constant

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

Just as with logical constant getAllKeys returns empty map for 'false' (so that AND have empty intersection and doesn't have any impact on OR's union) for 'true' it also returns empty map (no effect on OR), but we need a type condition in AND struct

func NewConstant

func NewConstant(value bool) *Constant

type DataSource

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

func (*DataSource) Get

func (ds *DataSource) Get(variables octosql.Variables) (execution.RecordStream, error)

type EntireDatabaseStream

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

func (*EntireDatabaseStream) Close

func (rs *EntireDatabaseStream) Close() error

func (*EntireDatabaseStream) Next

func (rs *EntireDatabaseStream) Next() (*execution.Record, error)

type Equal

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

The equivalent form is: ("key" = child), where "key" is alias for extracted key from redis database getAllKeys returns expression value of 'child' (only if it's of string type - the only acceptable in redis)

func NewEqual

func NewEqual(child execution.Expression) *Equal

type In

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

func NewIn

func NewIn(child execution.Expression) *In

type KeyFormula

type KeyFormula interface {
	// contains filtered or unexported methods
}

Formula build from physical.Formula, so that it accepts formulas for redis database Also, getAllKeys returns all keys, that will be subject of HGetAll

func NewKeyFormula

func NewKeyFormula(formula physical.Formula, key, alias string, matCtx *physical.MaterializationContext) (KeyFormula, error)

type KeySpecificStream

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

func (*KeySpecificStream) Close

func (rs *KeySpecificStream) Close() error

func (*KeySpecificStream) Next

func (rs *KeySpecificStream) Next() (*execution.Record, error)

type Or

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

Just like logical operator, the form is like: (formula1 OR formula2) getAllKeys returns union of 2 key sets

func NewOr

func NewOr(left, right KeyFormula) *Or

Jump to

Keyboard shortcuts

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