Documentation ¶
Overview ¶
go-rdb
go-rdb
go-rdb
go-rdb
go-rdb Operator
go-rdb
go-rdb
go-rdb
go-rdb Tuple
go-rdb
go-rdb Value
Index ¶
- Constants
- Variables
- func CheckType(s Value) reflect.Kind
- func Compare(a Value, b Value, ...) bool
- func Equal(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func GreaterThan(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func LessThan(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func NotEqual(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func NotGreaterThan(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func NotLessThan(akind reflect.Kind, a Value, bkind reflect.Kind, b Value) (bool, error)
- func SearchGreaterThan(r *Relation, attr string, key Value, kind reflect.Kind) []int
- func SearchLessThan(r *Relation, attr string, key Value, kind reflect.Kind) []int
- func SearchMulti(r *Relation, attr string, key Value, kind reflect.Kind) []int
- func SearchNotGreaterThan(r *Relation, attr string, key Value, kind reflect.Kind) []int
- func SearchNotLessThan(r *Relation, attr string, key Value, kind reflect.Kind) []int
- type Attr
- type CrossJoinStream
- type FullPath
- type IndexedOperator
- type IndexedSelectionStream
- type JoinStream
- type Node
- type Nodes
- type Operator
- type PhpOptions
- type PhpRelation
- type PhpSchema
- type PhpTuple
- type ProjectionStream
- type Relation
- type Relations
- type RenameStream
- type Schema
- type SelectionStream
- type Stream
- type Tuple
- type UnionStream
- type Value
Constants ¶
View Source
const RowCapacity = 5000
View Source
const TupleCapacity = 100
Variables ¶
View Source
var ErrDifferentType = errors.New("Different type.")
View Source
var ErrUnexpectedAttrNumber = errors.New("Unexpected attribute number.")
View Source
var ErrUnexpectedInputNumber = errors.New("Unexpected input number.")
View Source
var ErrUnkownStreamType = errors.New("unkown stream type")
View Source
var ErrUnkownType = errors.New("Unkown type.")
Functions ¶
func GreaterThan ¶
func NotGreaterThan ¶
func NotLessThan ¶
func SearchGreaterThan ¶
func SearchLessThan ¶
func SearchNotGreaterThan ¶
Types ¶
type Attr ¶
func (Attr) MarshalJSON ¶
type CrossJoinStream ¶
type CrossJoinStream struct { Inputs []Stream `json:"inputs"` // contains filtered or unexported fields }
CrossJoin
func (*CrossJoinStream) Close ¶
func (s *CrossJoinStream) Close()
func (*CrossJoinStream) HasNext ¶
func (s *CrossJoinStream) HasNext() bool
func (*CrossJoinStream) Init ¶
func (s *CrossJoinStream) Init(n *Node) error
func (*CrossJoinStream) Next ¶
func (s *CrossJoinStream) Next() (*Tuple, error)
type IndexedOperator ¶
">": GreaterThan, ">=": NotLessThan, "<": LessThan, "<=": NotGreaterThan, "==": Equal, "!=": NotEqual,
func (*IndexedOperator) UnmarshalJSON ¶
func (ss *IndexedOperator) UnmarshalJSON(data []byte) error
type IndexedSelectionStream ¶
type IndexedSelectionStream struct { Input *Relation `json:"input"` Attr string `json:"attr"` Selector IndexedOperator `json:"selector"` Arg Value `json:"arg"` // contains filtered or unexported fields }
Selection
func (*IndexedSelectionStream) Close ¶
func (s *IndexedSelectionStream) Close()
func (*IndexedSelectionStream) HasNext ¶
func (s *IndexedSelectionStream) HasNext() bool
func (*IndexedSelectionStream) Init ¶
func (s *IndexedSelectionStream) Init(n *Node) error
func (*IndexedSelectionStream) Next ¶
func (s *IndexedSelectionStream) Next() (*Tuple, error)
type JoinStream ¶
type JoinStream struct { Inputs []Stream `json:"inputs"` Attrs []string `json:"attrs"` Selector Operator `json:"selector"` // contains filtered or unexported fields }
Join
func (*JoinStream) Close ¶
func (s *JoinStream) Close()
func (*JoinStream) HasNext ¶
func (s *JoinStream) HasNext() bool
func (*JoinStream) Init ¶
func (s *JoinStream) Init(n *Node) error
func (*JoinStream) Next ¶
func (s *JoinStream) Next() (result *Tuple, err error)
type Operator ¶
func (*Operator) UnmarshalJSON ¶
type PhpOptions ¶
type PhpOptions struct { KvFmt bool `json:"kv,omitempty"` MapKey string `json:"map_key,omitempty"` }
type PhpRelation struct { Name string Attrs map[int]string Data map[int]PhpTuple }
type PhpRelation ¶
type PhpRelation map[interface{}]interface{}
type ProjectionStream ¶
Projection
func (*ProjectionStream) Close ¶
func (s *ProjectionStream) Close()
func (*ProjectionStream) HasNext ¶
func (s *ProjectionStream) HasNext() bool
func (*ProjectionStream) Init ¶
func (s *ProjectionStream) Init(n *Node) error
func (*ProjectionStream) Next ¶
func (s *ProjectionStream) Next() (result *Tuple, err error)
type Relation ¶
type Relation struct { Name string `json:"name,omitempty" ` Attrs *Schema `json:"attrs"` Data [][]Value `json:"data"` // contains filtered or unexported fields }
func (*Relation) CreateIndex ¶
func (r *Relation) CreateIndex()
func (*Relation) MarshalPHP ¶
func (r *Relation) MarshalPHP(o PhpOptions) map[interface{}]interface{}
type RenameStream ¶
type RenameStream struct { Input Stream `json:"input"` Attr string `json:"from"` Name string `json:"to"` }
Rename
func (*RenameStream) Close ¶
func (s *RenameStream) Close()
func (*RenameStream) HasNext ¶
func (s *RenameStream) HasNext() bool
func (*RenameStream) Init ¶
func (s *RenameStream) Init(n *Node) error
func (*RenameStream) Next ¶
func (s *RenameStream) Next() (*Tuple, error)
type Schema ¶
func (Schema) MarshalJSON ¶
func (Schema) MarshalPHP ¶
func (a Schema) MarshalPHP(o PhpOptions) map[interface{}]interface{}
type SelectionStream ¶
type SelectionStream struct { Input Stream `json:"input"` Attr string `json:"attr"` Selector Operator `json:"selector"` Arg Value `json:"arg"` // contains filtered or unexported fields }
Selection
func (*SelectionStream) Close ¶
func (s *SelectionStream) Close()
func (*SelectionStream) HasNext ¶
func (s *SelectionStream) HasNext() bool
func (*SelectionStream) Init ¶
func (s *SelectionStream) Init(n *Node) error
func (*SelectionStream) Next ¶
func (s *SelectionStream) Next() (*Tuple, error)
type Stream ¶
type Stream struct { Relation *Relation `json:"relation"` IndexedSelection *IndexedSelectionStream `json:"iselection"` Selection *SelectionStream `json:"selection"` Projection *ProjectionStream `json:"projection"` Rename *RenameStream `json:"rename"` Union *UnionStream `json:"union"` Join *JoinStream `json:"join"` CrossJoin *CrossJoinStream `json:"crossjoin"` // contains filtered or unexported fields }
type Tuple ¶
func (*Tuple) MarshalJSON ¶
func (*Tuple) MarshalPHP ¶
func (t *Tuple) MarshalPHP(o PhpOptions) map[interface{}]interface{}
type UnionStream ¶
type UnionStream struct {
Inputs []Stream `json:"inputs"`
}
Union
func (*UnionStream) Close ¶
func (s *UnionStream) Close()
func (*UnionStream) HasNext ¶
func (s *UnionStream) HasNext() bool
func (*UnionStream) Init ¶
func (s *UnionStream) Init(n *Node) error
func (*UnionStream) Next ¶
func (s *UnionStream) Next() (*Tuple, error)
Click to show internal directories.
Click to hide internal directories.