MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / soptStoreGeneric

Function soptStoreGeneric

set.go:61–78  ·  view source on GitHub ↗
(args [][]byte, optType byte)

Source from the content-addressed store, hash-verified

59}
60
61func soptStoreGeneric(args [][]byte, optType byte) (interface{}, error) {
62 if len(args) < 3 {
63 return 0, uhaha.ErrWrongNumArgs
64 }
65
66 var n int64
67 var err error
68
69 switch optType {
70 case ledis.UnionType:
71 n, err = ldb.SUnionStore(args[1], args[2:]...)
72 case ledis.DiffType:
73 n, err = ldb.SDiffStore(args[1], args[2:]...)
74 case ledis.InterType:
75 n, err = ldb.SInterStore(args[1], args[2:]...)
76 }
77 return redcon.SimpleInt(n), err
78}
79
80func cmdSCARD(m uhaha.Machine, args []string) (interface{}, error) {
81 if len(args) != 2 {

Callers 3

cmdSDIFFSTOREFunction · 0.85
cmdSINTERSTOREFunction · 0.85
cmdSUNIONSTOREFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected