Documentation ¶
Index ¶
- Constants
- Variables
- func GetNewRecord(client *redis.Client, keyName, key, alias string) (*execution.Record, error)
- func NewDataSourceBuilderFactory(dbKey string) physical.DataSourceBuilderFactory
- func NewDataSourceBuilderFactoryFromConfig(dbConfig map[string]interface{}) (physical.DataSourceBuilderFactory, error)
- type And
- type Constant
- type DataSource
- type EntireDatabaseStream
- type Equal
- type In
- type KeyFormula
- type KeySpecificStream
- type Or
Constants ¶
const ( DefaultKeys resultType = iota True False )
Variables ¶
var ErrNotFound = errors.New("redis key not found")
Functions ¶
func GetNewRecord ¶
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 ¶
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
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