Commits

Nikhil Marathe committed 49de7c7

Added post processing for INFO and EXISTS

  • Participants
  • Parent commits dea0a84

Comments (0)

Files changed (1)

 (define (postprocess cmd reply)
   (cond
     ((= cmd "keys") (parse reply " "))
+    ((= cmd "info") (map (curry flipped-parse ":") (parse reply "\r\n")))
+    ((= cmd "exists") (!= 0 reply))
     (true reply)))
 
+(define (flipped-parse delim str)
+  (parse str delim))
+
 (context MAIN)
 
 ;; @syntax (redis [host] [port])