From c177ed57d062daec19ce6df674e35fc05b5a5b13 Mon Sep 17 00:00:00 2001 From: Arpit Bhayani Date: Wed, 27 Nov 2024 23:37:16 +0530 Subject: [PATCH] Removing unused method --- internal/eval/store_eval.go | 51 ------------------------------------- 1 file changed, 51 deletions(-) diff --git a/internal/eval/store_eval.go b/internal/eval/store_eval.go index d276a4846..37b694f5e 100644 --- a/internal/eval/store_eval.go +++ b/internal/eval/store_eval.go @@ -6589,57 +6589,6 @@ func evalObjectIdleTime(key string, store *dstore.Store) *EvalResponse { return makeEvalResult(int64(dstore.GetIdleTime(obj.LastAccessedAt))) } -func evalObjectEncoding(key string, store *dstore.Store) *EvalResponse { - var encodingTypeStr string - - obj := store.GetNoTouch(key) - if obj == nil { - return makeEvalResult(clientio.NIL) - } - - oType := object.ExtractType(obj) - switch { - case oType == object.ObjTypeString: - encodingTypeStr = "raw" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeInt: - encodingTypeStr = "int" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeDequeue: - encodingTypeStr = "deque" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeBF: - encodingTypeStr = "bf" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeJSON: - encodingTypeStr = "json" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeByteArray: - encodingTypeStr = "bytearray" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeSet: - encodingTypeStr = "setstr" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeHashMap: - encodingTypeStr = "hashmap" - return makeEvalResult(encodingTypeStr) - - case oType == object.ObjTypeSortedSet: - encodingTypeStr = "btree" - return makeEvalResult(encodingTypeStr) - - default: - return makeEvalError(diceerrors.ErrWrongTypeOperation) - } -} - func evalOBJECT(args []string, store *dstore.Store) *EvalResponse { if len(args) < 2 { return makeEvalError(diceerrors.ErrWrongArgumentCount("OBJECT"))