Documentation
¶
Index ¶
- type InsertOption
- type List
- func (myList *List) LIndex(key string, index int) []byte
- func (myList *List) LInsert(key string, option InsertOption, pivot, val []byte) int
- func (myList *List) LLen(key string) int
- func (myList *List) LPop(key string) []byte
- func (myList *List) LPush(key string, val ...[]byte) int
- func (myList *List) LRange(key string, start, end int) (values [][]byte)
- func (myList *List) LRem(key string, val []byte, count int) int
- func (myList *List) LSet(key string, index int, val []byte) bool
- func (myList *List) LTrim(key string, start, end int) bool
- func (myList *List) RPop(key string) []byte
- func (myList *List) RPush(key string, val ...[]byte) int
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertOption ¶
type InsertOption uint8
InsertOption insert option for LInsert
const ( Before InsertOption = iota After )
insert direction
type List ¶
type List struct {
// contains filtered or unexported fields
}
func (*List) LInsert ¶
func (myList *List) LInsert(key string, option InsertOption, pivot, val []byte) int
LInsert insert val to list of key, in the front or back of pivot 如果命令成功返回插入后列表的长度, 如果没有找到pivot,返回 -1
func (*List) LRange ¶
LRange return list of key 中指定区间的元素, 如果start下标比最大下标还大, 则return空列表 如果end下标比len大,则将end修改为len - 1
Click to show internal directories.
Click to hide internal directories.