mirror of https://github.com/tidwall/buntdb.git
Update README.md
This commit is contained in:
parent
847243a6cf
commit
6249481c29
|
@ -457,9 +457,9 @@ db.View(func(tx *buntdb.Tx) error {
|
|||
Any index can be put in descending order by wrapping it's less function with `buntdb.Desc`.
|
||||
|
||||
```go
|
||||
db.CreateIndex("last_name_age", "*",
|
||||
buntdb.IndexJSON("name.last"),
|
||||
buntdb.Desc(buntdb.IndexJSON("age")))
|
||||
db.CreateIndex("last_name_age", "*",
|
||||
buntdb.IndexJSON("name.last"),
|
||||
buntdb.Desc(buntdb.IndexJSON("age")))
|
||||
```
|
||||
|
||||
This will create a multi value index where the last name is ascending and the age is descending.
|
||||
|
|
Loading…
Reference in New Issue