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

Method SAdd

tx_set.go:88–93  ·  view source on GitHub ↗

SAdd adds the specified members to the set stored int the bucket at given bucket,key and items.

(bucket string, key []byte, items ...[]byte)

Source from the content-addressed store, hash-verified

86
87// SAdd adds the specified members to the set stored int the bucket at given bucket,key and items.
88func (tx *Tx) SAdd(bucket string, key []byte, items ...[]byte) error {
89 if err := tx.checkTxIsClosed(); err != nil {
90 return err
91 }
92 return tx.sPut(bucket, key, DataSetFlag, items...)
93}
94
95// SRem removes the specified members from the set stored int the bucket at given bucket,key and items.
96func (tx *Tx) SRem(bucket string, key []byte, items ...[]byte) error {

Callers 15

buildSetIdxMethod · 0.45
txSAddFunction · 0.45
SMoveByTwoBucketsMethod · 0.45
testSAddFunction · 0.45
testSDiffByOneBucketFunction · 0.45
testSDiffByTwoBucketsFunction · 0.45
testSMoveByOneBucketFunction · 0.45
testSMoveByTwoBucketsFunction · 0.45

Calls 2

checkTxIsClosedMethod · 0.95
sPutMethod · 0.95