Module: Async::Redis::Methods::Keys

Included in:
Client, Context::Multi
Defined in:
lib/async/redis/methods/keys.rb

Instance Method Summary collapse

Instance Method Details

#del(key, *keys) ⇒ Object



28
29
30
# File 'lib/async/redis/methods/keys.rb', line 28

def del(key, *keys)
	return call('DEL', key, *keys)
end

#dump(key) ⇒ Object



32
33
34
# File 'lib/async/redis/methods/keys.rb', line 32

def dump(key)
	return call('DUMP', key)
end

#exists(key, *keys) ⇒ Object



36
37
38
# File 'lib/async/redis/methods/keys.rb', line 36

def exists(key, *keys)
	return call('EXISTS', key, *keys)
end

#expire(key, seconds) ⇒ Object



40
41
42
# File 'lib/async/redis/methods/keys.rb', line 40

def expire(key, seconds)
	return call('EXPIRE', key, seconds)
end

#expireat(key, time) ⇒ Object



44
45
46
47
48
49
50
51
52
53
# File 'lib/async/redis/methods/keys.rb', line 44

def expireat(key, time)
	case time
	when DateTime, Time, Date 
		timestamp =  time.strftime('%s').to_i
	else
		timestamp = time
	end

	return call('EXPIREAT', key, timestamp)
end

#keys(pattern) ⇒ Object



55
56
57
# File 'lib/async/redis/methods/keys.rb', line 55

def keys(pattern)
	return call('KEYS', pattern)
end

#migrateObject



59
60
61
# File 'lib/async/redis/methods/keys.rb', line 59

def migrate

end

#move(key, db) ⇒ Object



63
64
65
# File 'lib/async/redis/methods/keys.rb', line 63

def move(key, db)
	return call('MOVE', key, db)
end

#objectObject



67
68
69
# File 'lib/async/redis/methods/keys.rb', line 67

def object

end

#persist(key) ⇒ Object



71
72
73
# File 'lib/async/redis/methods/keys.rb', line 71

def persist(key)
	return call('PERSIST', key)
end

#pexpire(key, milliseconds) ⇒ Object



75
76
77
# File 'lib/async/redis/methods/keys.rb', line 75

def pexpire(key, milliseconds)
	return call('PEXPIRE', milliseconds)
end

#pexpireat(key, time) ⇒ Object



79
80
81
82
83
84
85
86
87
88
# File 'lib/async/redis/methods/keys.rb', line 79

def pexpireat(key, time)
	case time.class
	when DateTime, Time, Date 
		timestamp =  time.strftime('%Q').to_i
	else
		timestamp = time
	end
	
	return call('PEXPIREAT', key, timestamp)
end

#pttl(key) ⇒ Object



90
91
92
# File 'lib/async/redis/methods/keys.rb', line 90

def pttl(key)
	return call('PTTL', key)
end

#randomkeyObject



94
95
96
# File 'lib/async/redis/methods/keys.rb', line 94

def randomkey
	return call('RANDOMKEY')
end

#rename(key, new_key) ⇒ Object



98
99
100
# File 'lib/async/redis/methods/keys.rb', line 98

def rename(key, new_key)
	return call('RENAME', key, new_key)
end

#renamenx(key, new_key) ⇒ Object



102
103
104
# File 'lib/async/redis/methods/keys.rb', line 102

def renamenx(key, new_key)
	return call('RENAMENX', key, new_key)
end

#restore(key, serialized_value, ttl = 0) ⇒ Object



106
107
108
# File 'lib/async/redis/methods/keys.rb', line 106

def restore(key, serialized_value, ttl=0)
	return call('RESTORE', key, ttl, serialized_value)
end

#scanObject



134
135
136
# File 'lib/async/redis/methods/keys.rb', line 134

def scan

end

#sortObject



110
111
112
# File 'lib/async/redis/methods/keys.rb', line 110

def sort

end

#touch(key, *keys) ⇒ Object



114
115
116
# File 'lib/async/redis/methods/keys.rb', line 114

def touch(key, *keys)
	return call('TOUCH', key, *keys)
end

#ttl(key) ⇒ Object



118
119
120
# File 'lib/async/redis/methods/keys.rb', line 118

def ttl(key)
	return call('TTL', key)
end

#type(key) ⇒ Object



122
123
124
# File 'lib/async/redis/methods/keys.rb', line 122

def type(key)
	return call('TYPE', key)
end


126
127
128
# File 'lib/async/redis/methods/keys.rb', line 126

def unlink(key)
	return call('UNLINK', key)
end

#wait(newreplicas, timeout) ⇒ Object



130
131
132
# File 'lib/async/redis/methods/keys.rb', line 130

def wait(newreplicas, timeout)

end