Add case-insensitive flag to `MDBIndex`

This commit is contained in:
William Tisäter 2014-07-17 08:38:01 +02:00
parent 75e631ee94
commit f7263e8e7a
2 changed files with 8 additions and 6 deletions

View File

@ -51,6 +51,7 @@ type MDBIndex struct {
IdxFunc IndexFunc // Can be used to provide custom indexing
Virtual bool // Virtual index does not exist, but can be used for queries
RealIndex string // Virtual indexes use a RealIndex for iteration
CaseInsensitive bool // Controls if values are case-insensitive
table *MDBTable
name string

View File

@ -179,6 +179,7 @@ func (s *StateStore) initialize() error {
"id": &MDBIndex{
Unique: true,
Fields: []string{"Node"},
CaseInsensitive: true,
},
},
Decoder: func(buf []byte) interface{} {