Documentation ¶
Index ¶
- Constants
- Variables
- func HasHolderBuilder(name string) bool
- func InitHolderDefaults()
- func LogDebug(format string, v ...interface{})
- func LogDebugIf(condition bool, format string, v ...interface{})
- func LogErr(format string, v ...interface{})
- func LogErrIf(condition bool, format string, v ...interface{})
- func LogIfErr(err error, format string, v ...interface{})
- func LogInfo(format string, v ...interface{})
- func LogInfoIf(condition bool, format string, v ...interface{})
- func PrintIndexEntries(index BEIndex)
- func PrintIndexInfo(index BEIndex)
- func PutCollector(c *DocIDCollector)
- func RegisterEntriesHolder(name string, builder HolderBuilder)
- func ValidDocID(id DocID) bool
- func ValidIdxOrSize(v int) bool
- type Assignments
- type BEField
- type BEIndex
- type BEIndexLogger
- type BadConjBehavior
- type BoolValues
- type BooleanExpr
- type BuilderOpt
- type BuilderOption
- type CacheProvider
- type CompactBEIndex
- func (bi *CompactBEIndex) DumpEntries(sb *strings.Builder)
- func (bi *CompactBEIndex) DumpIndexInfo(sb *strings.Builder)
- func (bi *CompactBEIndex) Retrieve(queries Assignments, opts ...IndexOpt) (result DocIDList, err error)
- func (bi *CompactBEIndex) RetrieveWithCollector(queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error)
- type ConjID
- type Conjunction
- func (conj *Conjunction) AddBoolExprs(exprs ...*BooleanExpr) *Conjunction
- func (conj *Conjunction) AddExpression3(field string, include bool, values Values) *Conjunction
- func (conj *Conjunction) Between(field BEField, l, h int64) *Conjunction
- func (conj *Conjunction) CalcConjSize() (size int)
- func (conj *Conjunction) Exclude(field BEField, values Values) *Conjunction
- func (conj *Conjunction) ExpressionCount() (size int)
- func (conj *Conjunction) GreatThan(field BEField, value int64) *Conjunction
- func (conj *Conjunction) In(field BEField, values Values) *Conjunction
- func (conj *Conjunction) Include(field BEField, values Values) *Conjunction
- func (conj *Conjunction) JSONString() string
- func (conj *Conjunction) LessThan(field BEField, value int64) *Conjunction
- func (conj *Conjunction) NotIn(field BEField, values Values) *Conjunction
- func (conj *Conjunction) String() string
- type DefaultEntriesHolder
- func (h *DefaultEntriesHolder) CommitIndexingBETx(tx IndexingBETx) error
- func (h *DefaultEntriesHolder) CompileEntries() error
- func (h *DefaultEntriesHolder) DecodeTxData(data []byte) (TxData, error)
- func (h *DefaultEntriesHolder) DumpEntries(buffer *strings.Builder)
- func (h *DefaultEntriesHolder) DumpInfo(buffer *strings.Builder)
- func (h *DefaultEntriesHolder) EnableDebug(debug bool)
- func (h *DefaultEntriesHolder) GetEntries(field *FieldDesc, assigns Values) (r EntriesCursors, e error)
- func (h *DefaultEntriesHolder) GetParser(field BEField) parser.FieldValueParser
- func (h *DefaultEntriesHolder) IndexingBETx(field *FieldDesc, bv *BoolValues) (TxData, error)
- type DefaultLogger
- type DocID
- type DocIDCollector
- type DocIDList
- type Document
- type Entries
- type EntriesContainer
- type EntriesCursor
- type EntriesCursors
- type EntriesHolder
- type EntryID
- type FieldCursor
- type FieldCursors
- type FieldDesc
- type FieldOption
- type HolderBuilder
- type IndexOpt
- type IndexerBuilder
- type IndexerSettings
- type IndexerType
- type IndexingBETx
- type KGroupsBEIndex
- func (bi *KGroupsBEIndex) DumpEntries(sb *strings.Builder)
- func (bi *KGroupsBEIndex) DumpIndexInfo(sb *strings.Builder)
- func (bi *KGroupsBEIndex) Retrieve(queries Assignments, opts ...IndexOpt) (result DocIDList, err error)
- func (bi *KGroupsBEIndex) RetrieveWithCollector(queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error)
- type QKey
- type ResultCollector
- type Term
- type TxData
- type Uint64TxData
- type ValueOpt
- type Values
Constants ¶
const ( HolderNameDefault = "default" HolderNameACMatcher = "ac_matcher" HolderNameExtendRange = "ext_range" )
const ( ErrorBadConj = 0 SkipBadConj = 1 PanicBadConj = 2 IndexerTypeDefault = IndexerType(0) IndexerTypeCompact = IndexerType(1) )
const ( DebugLevel = iota InfoLevel ErrorLevel )
const (
LinearSkipDistance = 8
)
const (
WildcardFieldName = BEField("_Z_")
)
Variables ¶
var ( LogLevel int = InfoLevel // control defaultLogger log level Logger BEIndexLogger = &DefaultLogger{} )
var (
BetterToCacheMaxItemsCount = 512
)
Functions ¶
func HasHolderBuilder ¶
func InitHolderDefaults ¶ added in v0.2.0
func InitHolderDefaults()
func LogDebugIf ¶
func PrintIndexEntries ¶ added in v0.2.0
func PrintIndexEntries(index BEIndex)
func PrintIndexInfo ¶ added in v0.2.0
func PrintIndexInfo(index BEIndex)
func PutCollector ¶
func PutCollector(c *DocIDCollector)
func RegisterEntriesHolder ¶
func RegisterEntriesHolder(name string, builder HolderBuilder)
func ValidDocID ¶ added in v0.2.0
func ValidIdxOrSize ¶ added in v0.2.0
Types ¶
type Assignments ¶
func (Assignments) Size ¶
func (ass Assignments) Size() (size int)
type BEIndex ¶
type BEIndex interface { // Retrieve scan index data and retrieve satisfied document Retrieve(queries Assignments, opt ...IndexOpt) (DocIDList, error) // RetrieveWithCollector scan index data and retrieve satisfied document RetrieveWithCollector(Assignments, ResultCollector, ...IndexOpt) error // DumpEntries debug api DumpEntries(sb *strings.Builder) DumpIndexInfo(sb *strings.Builder) // contains filtered or unexported methods }
func NewKGroupsBEIndex ¶ added in v0.2.0
func NewKGroupsBEIndex() BEIndex
type BEIndexLogger ¶
type BadConjBehavior ¶ added in v0.2.0
type BadConjBehavior int
type BoolValues ¶
type BoolValues struct { Incl bool `json:"inc"` // include: true exclude: false Value Values `json:"value"` // values can be parser parse to id Operator ValueOpt `json:"operator,omitempty"` // value对应数值空间的描述符, 默认: EQ }
BoolValues expression a bool logic like: (in) [15,16,17], (not in) [shanghai,yz] 默认opt: ValueOptEQ 包含: [5, *) 的布尔描述等同于 "排除: (-*, 5)"
func NewBoolValue ¶ added in v0.2.0
func NewBoolValue(op ValueOpt, value Values, incl bool) BoolValues
func NewGTBoolValue ¶ added in v0.2.0
func NewGTBoolValue(value int64) BoolValues
func NewLTBoolValue ¶ added in v0.2.0
func NewLTBoolValue(value int64) BoolValues
func (*BoolValues) JSONString ¶
func (v *BoolValues) JSONString() string
func (*BoolValues) String ¶
func (v *BoolValues) String() string
type BooleanExpr ¶
type BooleanExpr struct { BoolValues Field BEField `json:"field"` }
BooleanExpr expression a bool logic like: age (in) [15,16,17], city (not in) [shanghai,yz]
func NewBoolExpr ¶
func NewBoolExpr(field BEField, inc bool, v Values) *BooleanExpr
func NewBoolExpr2 ¶
func NewBoolExpr2(field BEField, expr BoolValues) *BooleanExpr
type BuilderOpt ¶ added in v0.2.0
type BuilderOpt func(builder *IndexerBuilder)
func WithBadConjBehavior ¶ added in v0.2.0
func WithBadConjBehavior(v BadConjBehavior) BuilderOpt
func WithCacheProvider ¶ added in v0.2.0
func WithCacheProvider(provider CacheProvider) BuilderOpt
func WithIndexerType ¶ added in v0.2.0
func WithIndexerType(t IndexerType) BuilderOpt
type BuilderOption ¶ added in v0.2.0
type BuilderOption struct {
// contains filtered or unexported fields
}
type CacheProvider ¶ added in v0.2.0
type CacheProvider interface { // Reset expire all existing cache data Reset() Get(conjID ConjID) ([]byte, bool) Set(conjID ConjID, data []byte) }
CacheProvider a interface
type CompactBEIndex ¶ added in v0.2.0
type CompactBEIndex struct {
// contains filtered or unexported fields
}
func NewCompactedBEIndex ¶
func NewCompactedBEIndex() *CompactBEIndex
func (*CompactBEIndex) DumpEntries ¶ added in v0.2.0
func (bi *CompactBEIndex) DumpEntries(sb *strings.Builder)
func (*CompactBEIndex) DumpIndexInfo ¶ added in v0.2.0
func (bi *CompactBEIndex) DumpIndexInfo(sb *strings.Builder)
DumpIndexInfo summary info about this indexer +++++++ compact boolean indexing info +++++++++++ wildcard info: count: N default holder: {name:%s value_count:%d, max_entries:%d avg_entries:%d} field holder:
>field:%s {name: %s, value_count:%d max_entries:%d avg_entries:%d} >field:%s {name: %s, value_count:%d max_entries:%d avg_entries:%d}
func (*CompactBEIndex) Retrieve ¶ added in v0.2.0
func (bi *CompactBEIndex) Retrieve( queries Assignments, opts ...IndexOpt) (result DocIDList, err error)
func (*CompactBEIndex) RetrieveWithCollector ¶ added in v0.2.0
func (bi *CompactBEIndex) RetrieveWithCollector( queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error)
type ConjID ¶
type ConjID uint64
ConjID max support 60bit len |--[ reserved(4bit) | size(8bit) | index(8bit) | negSign(1bit) | docID(43bit)]
type Conjunction ¶
type Conjunction struct {
Expressions map[BEField][]*BoolValues `json:"exprs"` // 同一个Conj内不允许重复的Field
}
func NewConjunction ¶
func NewConjunction() *Conjunction
func (*Conjunction) AddBoolExprs ¶
func (conj *Conjunction) AddBoolExprs(exprs ...*BooleanExpr) *Conjunction
AddBoolExprs append boolean expression, don't allow same field added twice in one conjunction
func (*Conjunction) AddExpression3 ¶
func (conj *Conjunction) AddExpression3(field string, include bool, values Values) *Conjunction
func (*Conjunction) Between ¶ added in v0.2.0
func (conj *Conjunction) Between(field BEField, l, h int64) *Conjunction
func (*Conjunction) CalcConjSize ¶
func (conj *Conjunction) CalcConjSize() (size int)
func (*Conjunction) Exclude ¶
func (conj *Conjunction) Exclude(field BEField, values Values) *Conjunction
func (*Conjunction) ExpressionCount ¶ added in v0.2.0
func (conj *Conjunction) ExpressionCount() (size int)
func (*Conjunction) GreatThan ¶ added in v0.2.0
func (conj *Conjunction) GreatThan(field BEField, value int64) *Conjunction
func (*Conjunction) In ¶
func (conj *Conjunction) In(field BEField, values Values) *Conjunction
In any value in values is a **true** expression
func (*Conjunction) Include ¶
func (conj *Conjunction) Include(field BEField, values Values) *Conjunction
func (*Conjunction) JSONString ¶
func (conj *Conjunction) JSONString() string
func (*Conjunction) LessThan ¶ added in v0.2.0
func (conj *Conjunction) LessThan(field BEField, value int64) *Conjunction
func (*Conjunction) NotIn ¶
func (conj *Conjunction) NotIn(field BEField, values Values) *Conjunction
NotIn any value in values is a **false** expression
func (*Conjunction) String ¶
func (conj *Conjunction) String() string
type DefaultEntriesHolder ¶
type DefaultEntriesHolder struct { Parser parser.FieldValueParser FieldParser map[BEField]parser.FieldValueParser // contains filtered or unexported fields }
DefaultEntriesHolder EntriesHolder implement base on hash map holder map<key, Entries> 默认容器,目前支持表达式最大256个field; 支持多个field复用默认容器; 见:Key编码逻辑 如果需要打破这个限制,可以自己实现容器.
func NewDefaultEntriesHolder ¶
func NewDefaultEntriesHolder() *DefaultEntriesHolder
func (*DefaultEntriesHolder) CommitIndexingBETx ¶ added in v0.2.0
func (h *DefaultEntriesHolder) CommitIndexingBETx(tx IndexingBETx) error
func (*DefaultEntriesHolder) CompileEntries ¶
func (h *DefaultEntriesHolder) CompileEntries() error
func (*DefaultEntriesHolder) DecodeTxData ¶ added in v0.2.0
func (h *DefaultEntriesHolder) DecodeTxData(data []byte) (TxData, error)
DecodeTxData decode data; used for building progress cache
func (*DefaultEntriesHolder) DumpEntries ¶
func (h *DefaultEntriesHolder) DumpEntries(buffer *strings.Builder)
func (*DefaultEntriesHolder) DumpInfo ¶ added in v0.2.0
func (h *DefaultEntriesHolder) DumpInfo(buffer *strings.Builder)
DumpInfo {name: %s, value_count:%d max_entries:%d avg_entries:%d}
func (*DefaultEntriesHolder) EnableDebug ¶
func (h *DefaultEntriesHolder) EnableDebug(debug bool)
func (*DefaultEntriesHolder) GetEntries ¶
func (h *DefaultEntriesHolder) GetEntries(field *FieldDesc, assigns Values) (r EntriesCursors, e error)
func (*DefaultEntriesHolder) GetParser ¶ added in v0.2.0
func (h *DefaultEntriesHolder) GetParser(field BEField) parser.FieldValueParser
func (*DefaultEntriesHolder) IndexingBETx ¶ added in v0.2.0
func (h *DefaultEntriesHolder) IndexingBETx(field *FieldDesc, bv *BoolValues) (TxData, error)
type DefaultLogger ¶
type DefaultLogger struct { }
DefaultLogger a console logger use fmt lib
func (*DefaultLogger) Debugf ¶
func (l *DefaultLogger) Debugf(format string, v ...interface{})
func (*DefaultLogger) Errorf ¶
func (l *DefaultLogger) Errorf(format string, v ...interface{})
func (*DefaultLogger) Infof ¶
func (l *DefaultLogger) Infof(format string, v ...interface{})
type DocIDCollector ¶
type DocIDCollector struct {
// contains filtered or unexported fields
}
DocIDCollector Default Collector with removing duplicated doc
func NewDocIDCollector ¶
func NewDocIDCollector() *DocIDCollector
func PickCollector ¶
func PickCollector() *DocIDCollector
func (*DocIDCollector) Add ¶
func (c *DocIDCollector) Add(docID DocID, _ ConjID)
func (*DocIDCollector) DocCount ¶
func (c *DocIDCollector) DocCount() int
func (*DocIDCollector) GetDocIDs ¶
func (c *DocIDCollector) GetDocIDs() (ids DocIDList)
func (*DocIDCollector) GetDocIDsInto ¶
func (c *DocIDCollector) GetDocIDsInto(ids *DocIDList)
func (*DocIDCollector) Reset ¶
func (c *DocIDCollector) Reset()
type Document ¶
type Document struct { ID DocID `json:"id"` // 只支持int32最大值个Doc Cons []*Conjunction `json:"cons"` // conjunction之间的关系是或,具体描述可以看论文的表述 }
func NewDocument ¶
func (*Document) AddConjunction ¶
func (doc *Document) AddConjunction(cons ...*Conjunction) *Document
AddConjunction 一组完整的expression, 必须是完整一个描述文档的DNF Bool表达的条件组合*/
func (*Document) AddConjunctions ¶
func (doc *Document) AddConjunctions(conj *Conjunction, others ...*Conjunction) *Document
func (*Document) JSONString ¶
type EntriesContainer ¶
type EntriesContainer struct {
// contains filtered or unexported fields
}
EntriesContainer for default Entries Holder, it can hold different field's entries, but for ACMatcher or other Holder, it may only hold entries for one field
func (*EntriesContainer) CreateHolder ¶ added in v0.2.0
func (c *EntriesContainer) CreateHolder(desc *FieldDesc) EntriesHolder
func (*EntriesContainer) DumpEntries ¶ added in v0.2.0
func (c *EntriesContainer) DumpEntries(buf *strings.Builder)
func (*EntriesContainer) DumpInfo ¶ added in v0.2.0
func (c *EntriesContainer) DumpInfo(buf *strings.Builder)
DumpInfo default holder: {name:%s value_count:%d, max_entries:%d avg_entries:%d} field holder:
>field:%s {name: %s, value_count:%d max_entries:%d avg_entries:%d} >field:%s {name: %s, value_count:%d max_entries:%d avg_entries:%d}
func (*EntriesContainer) GetHolder ¶ added in v0.2.0
func (c *EntriesContainer) GetHolder(desc *FieldDesc) EntriesHolder
type EntriesCursor ¶
type EntriesCursor struct {
// contains filtered or unexported fields
}
EntriesCursor represent a posting list for one Assign (age, 15): [1, 2, 5, 19, 22] cursor: ^
func NewEntriesCursor ¶
func NewEntriesCursor(key QKey, entries Entries) EntriesCursor
func (*EntriesCursor) DumpEntries ¶
func (ec *EntriesCursor) DumpEntries(sb *strings.Builder)
DumpEntries in normal cases, posting-list has thousands/million ids, so here only dump part of (nearby) ids about current cursor [age,12]^<2,false>:<1,true>,<2,false><nil,nil>
func (*EntriesCursor) GetCurEntryID ¶
func (ec *EntriesCursor) GetCurEntryID() EntryID
func (*EntriesCursor) SkipTo ¶
func (ec *EntriesCursor) SkipTo(id EntryID) EntryID
type EntriesCursors ¶ added in v0.2.0
type EntriesCursors []EntriesCursor
type EntriesHolder ¶
type EntriesHolder interface { EnableDebug(debug bool) DumpInfo(buffer *strings.Builder) DumpEntries(buffer *strings.Builder) // GetEntries retrieve all satisfied PostingList from holder GetEntries(field *FieldDesc, assigns Values) (EntriesCursors, error) // IndexingBETx holder tokenize/parse values into what its needed data // then wait IndexerBuilder call CommitAppend to apply 'Data' into holder // when all expression prepare success in a conjunction IndexingBETx(field *FieldDesc, bv *BoolValues) (TxData, error) // CommitIndexingBETx NOTE: builder will panic when error return, // because partial success for a conjunction will cause logic error CommitIndexingBETx(tx IndexingBETx) error // DecodeTxData decode data; used for building progress cache DecodeTxData(data []byte) (TxData, error) // CompileEntries finalize entries status for query, build or make sorted // according to the paper, entries must be sorted CompileEntries() error }
EntriesHolder 存储索引的PostingList数据 目前的三种典型场景: 1. 内存KV 存储所有Field值对应的EntryID列表(PostingList) 2. AC自动机:用于将所有的values 构建生成AC自动机,对输入的语句找到匹配的PostingList 3. 1的一种扩展,引入网络\磁盘存储,内部维护一个LRU/LFU cache减轻内存压力
func NewEntriesHolder ¶
func NewEntriesHolder(name string) EntriesHolder
type EntryID ¶
type EntryID uint64
EntryID [--ConjID(60bit)--|--empty(3bit)--|--incl/excl(1bit)--]
const ( MaxDocID = 0x7FFFFFFFFFF NULLENTRY EntryID = 0xFFFFFFFFFFFFFFFF )
func NewEntryID ¶
NewEntryID encode entry id |-- ConjID(60bit) --|-- empty(3bit) --|--incl/excl(1bit) --| |--[ size(8bit) | index(8bit) | negSign(1bit) | docID(43bit)]--|-- empty(3bit) --|--incl/excl(1bit) --|
func (EntryID) IsNULLEntry ¶
type FieldCursor ¶
type FieldCursor struct {
// contains filtered or unexported fields
}
FieldCursor for a boolean expression: {"tag", "in", [1, 2, 3]} tag_2: [ID5] tag_1: [ID1, ID2, ID7]
func NewFieldCursor ¶
func NewFieldCursor(cursors ...EntriesCursor) FieldCursor
func (*FieldCursor) DumpCursorEntryID ¶ added in v0.2.0
func (fc *FieldCursor) DumpCursorEntryID(sb *strings.Builder)
func (*FieldCursor) DumpEntries ¶
func (fc *FieldCursor) DumpEntries(sb *strings.Builder)
func (*FieldCursor) GetCurEntryID ¶
func (fc *FieldCursor) GetCurEntryID() EntryID
func (*FieldCursor) ReachEnd ¶
func (fc *FieldCursor) ReachEnd() bool
func (*FieldCursor) SkipTo ¶
func (fc *FieldCursor) SkipTo(id EntryID) (newMin EntryID)
type FieldCursors ¶
type FieldCursors []FieldCursor
func (FieldCursors) Dump ¶
func (s FieldCursors) Dump() string
func (FieldCursors) DumpJustCursors ¶ added in v0.2.0
func (s FieldCursors) DumpJustCursors() string
func (FieldCursors) Less ¶
func (s FieldCursors) Less(i, j int) bool
func (FieldCursors) Sort ¶
func (s FieldCursors) Sort()
Sort golang's internal sort.Sort method have obvious overhead in performance.(runtime convTSlice) so here use a simple insert sort replace it. bz not much Element, may another quickSort here later
func (FieldCursors) Swap ¶
func (s FieldCursors) Swap(i, j int)
type FieldDesc ¶ added in v0.2.0
type FieldDesc struct { FieldOption ID uint64 Field BEField }
type FieldOption ¶
type FieldOption struct {
Container string // specify Entries holder for all tokenized value Entries
}
type HolderBuilder ¶
type HolderBuilder func() EntriesHolder
type IndexOpt ¶
type IndexOpt func(ctx *retrieveContext)
func WithCollector ¶
func WithCollector(fn ResultCollector) IndexOpt
WithCollector specify a user defined collector
func WithDumpEntries ¶
func WithDumpEntries() IndexOpt
func WithStepDetail ¶
func WithStepDetail() IndexOpt
type IndexerBuilder ¶
type IndexerBuilder struct { BuilderOption // contains filtered or unexported fields }
func NewCompactIndexerBuilder ¶
func NewCompactIndexerBuilder(opts ...BuilderOpt) *IndexerBuilder
func NewIndexerBuilder ¶
func NewIndexerBuilder(opts ...BuilderOpt) *IndexerBuilder
func (*IndexerBuilder) AddDocument ¶
func (b *IndexerBuilder) AddDocument(docs ...*Document) error
func (*IndexerBuilder) BuildIndex ¶
func (b *IndexerBuilder) BuildIndex() BEIndex
func (*IndexerBuilder) ConfigField ¶
func (b *IndexerBuilder) ConfigField(field BEField, settings FieldOption)
func (*IndexerBuilder) Reset ¶ added in v0.2.0
func (b *IndexerBuilder) Reset()
type IndexerSettings ¶
type IndexerSettings struct {
FieldConfig map[BEField]FieldOption
}
type IndexerType ¶ added in v0.2.0
type IndexerType int
type IndexingBETx ¶ added in v0.2.0
type KGroupsBEIndex ¶ added in v0.2.0
type KGroupsBEIndex struct {
// contains filtered or unexported fields
}
func (*KGroupsBEIndex) DumpEntries ¶ added in v0.2.0
func (bi *KGroupsBEIndex) DumpEntries(sb *strings.Builder)
func (*KGroupsBEIndex) DumpIndexInfo ¶ added in v0.2.0
func (bi *KGroupsBEIndex) DumpIndexInfo(sb *strings.Builder)
func (*KGroupsBEIndex) Retrieve ¶ added in v0.2.0
func (bi *KGroupsBEIndex) Retrieve( queries Assignments, opts ...IndexOpt) (result DocIDList, err error)
func (*KGroupsBEIndex) RetrieveWithCollector ¶ added in v0.2.0
func (bi *KGroupsBEIndex) RetrieveWithCollector( queries Assignments, collector ResultCollector, opts ...IndexOpt) (err error)
type ResultCollector ¶
type Uint64TxData ¶ added in v0.2.0
type Uint64TxData cache.Uint64ListValues
func (*Uint64TxData) BetterToCache ¶ added in v0.2.0
func (txd *Uint64TxData) BetterToCache() bool
func (*Uint64TxData) Encode ¶ added in v0.2.0
func (txd *Uint64TxData) Encode() ([]byte, error)
type ValueOpt ¶ added in v0.2.0
type ValueOpt int
ValueOpt value数值的描述符; 注意这里将其与最终的bool逻辑运算符区分开; 描述一个值: >5 代表了所有数值空间中[5, *)所有的值; 结合布尔描述 中的Incl/Excl 才构成一个布尔描述; 简而言之它用于描述存在"哪些值"
type Values ¶
type Values interface{}