Sha256: 8f7463496c371f5ff79f11bd732782f065152464361068907a595cabc2c26408
Contents?: true
Size: 402 Bytes
Versions: 18
Compression:
Stored size: 402 Bytes
Contents
class Redi2casa # Supports only hashes now def hlen key, type = "hash" if type == "hash" response = execute("select count(*) from hashes where key = ?", key.to_s) elsif type == "counter" response = execute("select count(*) from counters where key = ?", key.to_s) else raise RuntimeError.new("Invalid type") end parse_response(response, "count").to_i end end
Version data entries
18 entries across 18 versions & 1 rubygems