Documentation ¶
Index ¶
- Constants
- func SerializeOps(ops *Operations) ([]byte, error)
- type AfterEntityCallback
- type AfterViewCallback
- type BeforeEntityCallback
- type BeforeViewCallback
- type ColumnDefinition
- type EAV
- func (eav *EAV) Apply(groupID ids.ID, applier uint8, ops *Operations) (*Operations, *Operations, error)
- func (eav *EAV) Backfill(groupID ids.ID, authorTag [7]byte, startFrom [16]byte, partial, fromSelf bool) ([]byte, [16]byte, bool, error)
- func (eav *EAV) CreateView(viewName string, schema *ViewDefinition) error
- func (eav *EAV) CreateViewWithCounts(viewName string, schema *ViewDefinition) (int, int, error)
- func (eav *EAV) Get(dest interface{}, statement string, args ...interface{}) error
- func (eav *EAV) IndexWhere(viewName, prefix string) (string, error)
- func (eav *EAV) ProcessBackfill(groupID ids.ID, applier uint8, body []byte) error
- func (eav *EAV) Query(statement string, args ...interface{}) (*Result, error)
- func (eav *EAV) Schema(viewName string) (*ViewDefinition, bool)
- func (eav *EAV) Select(dest interface{}, statement string, args ...interface{}) error
- func (eav *EAV) Selectors(viewName, prefix string, columnNames ...string) (string, error)
- func (eav *EAV) SubscribeAfterEntity(cb AfterEntityCallback, includeBackfill bool, views ...string) error
- func (eav *EAV) SubscribeAfterView(cb AfterViewCallback, includeBackfill bool, views ...string) error
- func (eav *EAV) SubscribeBeforeEntity(cb BeforeEntityCallback, includeBackfill bool, views ...string) error
- func (eav *EAV) SubscribeBeforeView(cb BeforeViewCallback, includeBackfill bool, views ...string) error
- type Operations
- func (o *Operations) Add(id ids.ID, ts uint64, name string, val Value) *Operations
- func (o *Operations) AddBytes(id ids.ID, ts uint64, name string, val []byte) *Operations
- func (o *Operations) AddFloat64(id ids.ID, ts uint64, name string, val float64) *Operations
- func (o *Operations) AddInt64(id ids.ID, ts uint64, name string, val int64) *Operations
- func (o *Operations) AddMap(ts uint64, ops map[ids.ID]map[string]Value) *Operations
- func (o *Operations) AddNil(id ids.ID, ts uint64, name string) *Operations
- func (o *Operations) AddString(id ids.ID, ts uint64, name string, val string) *Operations
- func (o *Operations) Empty() bool
- type Result
- type Value
- func NewBoolValue(v bool) *Value
- func NewBytesValue(v []byte) *Value
- func NewFloat64Value(v float64) *Value
- func NewInt64Value(v int64) *Value
- func NewIntValue(v int) *Value
- func NewStringValue(v string) *Value
- func NewUint64Value(v uint64) *Value
- func NewUintValue(v uint) *Value
- func NewValue(src interface{}) *Value
- func NewValueWithError(src interface{}) (*Value, error)
- type ViewDefinition
Constants ¶
View Source
const ( Blob uint8 = iota Text Int Real )
View Source
const ( Private uint8 = 0 Self uint8 = 1 Other uint8 = 2 )
Variables ¶
This section is empty.
Functions ¶
func SerializeOps ¶
func SerializeOps(ops *Operations) ([]byte, error)
Types ¶
type AfterEntityCallback ¶
type AfterViewCallback ¶
type AfterViewCallback func(viewName string)
type BeforeEntityCallback ¶
type BeforeViewCallback ¶
type ColumnDefinition ¶
type EAV ¶
type EAV struct {
// contains filtered or unexported fields
}
func (*EAV) Apply ¶
func (eav *EAV) Apply(groupID ids.ID, applier uint8, ops *Operations) (*Operations, *Operations, error)
func (*EAV) CreateView ¶
func (eav *EAV) CreateView(viewName string, schema *ViewDefinition) error
func (*EAV) CreateViewWithCounts ¶
func (*EAV) ProcessBackfill ¶
func (*EAV) SubscribeAfterEntity ¶
func (eav *EAV) SubscribeAfterEntity(cb AfterEntityCallback, includeBackfill bool, views ...string) error
func (*EAV) SubscribeAfterView ¶
func (eav *EAV) SubscribeAfterView(cb AfterViewCallback, includeBackfill bool, views ...string) error
func (*EAV) SubscribeBeforeEntity ¶
func (eav *EAV) SubscribeBeforeEntity(cb BeforeEntityCallback, includeBackfill bool, views ...string) error
func (*EAV) SubscribeBeforeView ¶
func (eav *EAV) SubscribeBeforeView(cb BeforeViewCallback, includeBackfill bool, views ...string) error
type Operations ¶
type Operations struct { Names []string `bencode:"n"` OperationMap map[uint64]map[ids.ID]map[uint32]Value `bencode:"m"` // contains filtered or unexported fields }
func DeserializeOps ¶
func DeserializeOps(b []byte) (*Operations, error)
func NewOperations ¶
func NewOperations() *Operations
func (*Operations) Add ¶
func (o *Operations) Add(id ids.ID, ts uint64, name string, val Value) *Operations
func (*Operations) AddBytes ¶
func (o *Operations) AddBytes(id ids.ID, ts uint64, name string, val []byte) *Operations
func (*Operations) AddFloat64 ¶
func (o *Operations) AddFloat64(id ids.ID, ts uint64, name string, val float64) *Operations
func (*Operations) AddInt64 ¶
func (o *Operations) AddInt64(id ids.ID, ts uint64, name string, val int64) *Operations
func (*Operations) AddMap ¶
func (o *Operations) AddMap(ts uint64, ops map[ids.ID]map[string]Value) *Operations
func (*Operations) AddNil ¶
func (o *Operations) AddNil(id ids.ID, ts uint64, name string) *Operations
func (*Operations) AddString ¶
func (o *Operations) AddString(id ids.ID, ts uint64, name string, val string) *Operations
func (*Operations) Empty ¶
func (o *Operations) Empty() bool
type Value ¶
func NewBoolValue ¶
func NewBytesValue ¶
func NewFloat64Value ¶
func NewInt64Value ¶
func NewIntValue ¶
func NewStringValue ¶
func NewUint64Value ¶
func NewUintValue ¶
func NewValueWithError ¶
type ViewDefinition ¶
type ViewDefinition struct { Columns map[string]*ColumnDefinition Indexes [][]string }
Click to show internal directories.
Click to hide internal directories.