mirror of https://github.com/status-im/consul.git
Add case-insensitive flag to `MDBIndex`
This commit is contained in:
parent
e5798c74d2
commit
ee4de11741
|
@ -45,12 +45,13 @@ type MDBTables []*MDBTable
|
|||
// An Index is named, and uses a series of column values to
|
||||
// map to the row-id containing the table
|
||||
type MDBIndex struct {
|
||||
AllowBlank bool // Can fields be blank
|
||||
Unique bool // Controls if values are unique
|
||||
Fields []string // Fields are used to build the index
|
||||
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
|
||||
AllowBlank bool // Can fields be blank
|
||||
Unique bool // Controls if values are unique
|
||||
Fields []string // Fields are used to build the index
|
||||
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
|
||||
|
|
|
@ -179,6 +179,7 @@ func (s *StateStore) initialize() error {
|
|||
"id": &MDBIndex{
|
||||
Unique: true,
|
||||
Fields: []string{"Node"},
|
||||
CaseInsensitive: true,
|
||||
},
|
||||
},
|
||||
Decoder: func(buf []byte) interface{} {
|
||||
|
|
Loading…
Reference in New Issue