MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / push

Method push

tx_list.go:97–106  ·  view source on GitHub ↗

push sets values for list stored in the bucket at given bucket, key, flag and values.

(bucket string, key []byte, flag uint16, values ...[]byte)

Source from the content-addressed store, hash-verified

95
96// push sets values for list stored in the bucket at given bucket, key, flag and values.
97func (tx *Tx) push(bucket string, key []byte, flag uint16, values ...[]byte) error {
98 for _, value := range values {
99 err := tx.put(bucket, key, value, Persistent, flag, uint64(time.Now().Unix()), DataStructureList)
100 if err != nil {
101 return err
102 }
103 }
104
105 return nil
106}
107
108// getListWithDefault
109// this function will get list, if list not exists, will create

Callers 11

RPopMethod · 0.95
RPushMethod · 0.95
LPushMethod · 0.95
LPushRawMethod · 0.95
RPushRawMethod · 0.95
LPopMethod · 0.95
LRemMethod · 0.95
LTrimMethod · 0.95
LRemByIndexMethod · 0.95
ExpireListMethod · 0.95
CheckExpireMethod · 0.95

Calls 1

putMethod · 0.95

Tested by

no test coverage detected