ffi-hiredis_vip 0.1.0.pre2 → 0.1.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ffi/hiredis_vip/client.rb +11 -11
- data/lib/ffi/hiredis_vip/exists.rb +1 -1
- data/lib/ffi/hiredis_vip/exists_before_3.rb +1 -1
- data/lib/ffi/hiredis_vip/keys.rb +1 -1
- data/lib/ffi/hiredis_vip/mget.rb +1 -1
- data/lib/ffi/hiredis_vip/persist.rb +1 -1
- data/lib/ffi/hiredis_vip/sadd.rb +2 -2
- data/lib/ffi/hiredis_vip/scan.rb +1 -1
- data/lib/ffi/hiredis_vip/set.rb +1 -1
- data/lib/ffi/hiredis_vip/set_before_2_6_12.rb +4 -4
- data/lib/ffi/hiredis_vip/sscan.rb +3 -3
- data/lib/ffi/hiredis_vip/touch.rb +1 -1
- data/lib/ffi/hiredis_vip/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ead994de23fa7de4efacb74af787d989acb82d4
|
4
|
+
data.tar.gz: 2e6f99f82a141bf37eb144bb57e7c1108ebd45cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efb2b833917327f59abcec80d43908eaba3fee6f113078076e0375e6fee997aef9b955975f2c95a48464e562851976818417734653da3a6036ff04c9ed70b694
|
7
|
+
data.tar.gz: 2a35ee601a6d641b0633664e36c8247841137982c6f56955319509f37edcf5e313c1f2194ddfe8e3d08411c7b75cbaaa98a71ecb4195dbb569545c6c7bdd175e
|
@@ -71,7 +71,7 @@ module FFI
|
|
71
71
|
def decr(key)
|
72
72
|
reply = nil
|
73
73
|
command = "DECR %b"
|
74
|
-
command_args = [ :
|
74
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
75
75
|
synchronize do |connection|
|
76
76
|
reply = execute_command(connection, command, *command_args)
|
77
77
|
end
|
@@ -90,7 +90,7 @@ module FFI
|
|
90
90
|
reply = nil
|
91
91
|
_amount = "#{amount}"
|
92
92
|
command = "DECRBY %b %b"
|
93
|
-
command_args = [ :
|
93
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, _amount, :size_t, _amount.size ]
|
94
94
|
synchronize do |connection|
|
95
95
|
reply = execute_command(connection, command, *command_args)
|
96
96
|
end
|
@@ -112,7 +112,7 @@ module FFI
|
|
112
112
|
command = "DEL#{' %b' * number_of_deletes}"
|
113
113
|
command_args = []
|
114
114
|
keys.each do |key|
|
115
|
-
command_args << :
|
115
|
+
command_args << :pointer << key << :size_t << key.size
|
116
116
|
end
|
117
117
|
|
118
118
|
synchronize do |connection|
|
@@ -132,7 +132,7 @@ module FFI
|
|
132
132
|
def dump(key)
|
133
133
|
reply = nil
|
134
134
|
command = "DUMP %b"
|
135
|
-
command_args = [ :
|
135
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
136
136
|
synchronize do |connection|
|
137
137
|
reply = execute_command(connection, command, *command_args)
|
138
138
|
end
|
@@ -150,7 +150,7 @@ module FFI
|
|
150
150
|
def echo(value)
|
151
151
|
reply = nil
|
152
152
|
command = "ECHO %b"
|
153
|
-
command_args = [ :
|
153
|
+
command_args = [ :pointer, value, :size_t, value.size ]
|
154
154
|
synchronize do |connection|
|
155
155
|
reply = execute_command(connection, command, *command_args)
|
156
156
|
end
|
@@ -183,7 +183,7 @@ module FFI
|
|
183
183
|
reply = nil
|
184
184
|
time_in_seconds = "#{seconds}"
|
185
185
|
command = "EXPIRE %b %b"
|
186
|
-
command_args = [ :
|
186
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, time_in_seconds, :size_t, time_in_seconds.size ]
|
187
187
|
synchronize do |connection|
|
188
188
|
reply = execute_command(connection, command, *command_args)
|
189
189
|
end
|
@@ -207,7 +207,7 @@ module FFI
|
|
207
207
|
reply = nil
|
208
208
|
epoch = "#{unix_time}"
|
209
209
|
command = "EXPIREAT %b %b"
|
210
|
-
command_args = [ :
|
210
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, epoch, :size_t, epoch.size ]
|
211
211
|
synchronize do |connection|
|
212
212
|
reply = execute_command(connection, command, *command_args)
|
213
213
|
end
|
@@ -269,7 +269,7 @@ module FFI
|
|
269
269
|
def get(key)
|
270
270
|
reply = nil
|
271
271
|
command = "GET %b"
|
272
|
-
command_args = [ :
|
272
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
273
273
|
|
274
274
|
synchronize do |connection|
|
275
275
|
reply = execute_command(connection, command, *command_args)
|
@@ -291,7 +291,7 @@ module FFI
|
|
291
291
|
def incr(key)
|
292
292
|
reply = nil
|
293
293
|
command = "INCR %b"
|
294
|
-
command_args = [ :
|
294
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
295
295
|
synchronize do |connection|
|
296
296
|
reply = execute_command(connection, command, *command_args)
|
297
297
|
end
|
@@ -310,7 +310,7 @@ module FFI
|
|
310
310
|
reply = nil
|
311
311
|
_amount = "#{amount}"
|
312
312
|
command = "INCRBY %b %b"
|
313
|
-
command_args = [ :
|
313
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, _amount, :size_t, _amount.size ]
|
314
314
|
synchronize do |connection|
|
315
315
|
reply = execute_command(connection, command, *command_args)
|
316
316
|
end
|
@@ -500,7 +500,7 @@ module FFI
|
|
500
500
|
def ttl(key)
|
501
501
|
reply = nil
|
502
502
|
command = "TTL %b"
|
503
|
-
command_args = [ :
|
503
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
504
504
|
synchronize do |connection|
|
505
505
|
reply = execute_command(connection, command, *command_args)
|
506
506
|
end
|
@@ -12,7 +12,7 @@ module FFI
|
|
12
12
|
|
13
13
|
keys.each do |key|
|
14
14
|
reply = nil
|
15
|
-
command_args = [ :
|
15
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
16
16
|
@client.synchronize do |connection|
|
17
17
|
reply = @client.execute_command(connection, command, *command_args)
|
18
18
|
end
|
data/lib/ffi/hiredis_vip/keys.rb
CHANGED
@@ -9,7 +9,7 @@ module FFI
|
|
9
9
|
reply = nil
|
10
10
|
pattern = "#{pattern}"
|
11
11
|
command = "KEYS %b"
|
12
|
-
command_args = [ :
|
12
|
+
command_args = [ :pointer, pattern, :size_t, pattern.size ]
|
13
13
|
|
14
14
|
synchronize do |connection|
|
15
15
|
reply = @client.execute_command(connection, command, *command_args)
|
data/lib/ffi/hiredis_vip/mget.rb
CHANGED
@@ -8,7 +8,7 @@ module FFI
|
|
8
8
|
def persist(key)
|
9
9
|
reply = nil
|
10
10
|
command = "PERSIST %b"
|
11
|
-
command_args = [ :
|
11
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
12
12
|
synchronize do |connection|
|
13
13
|
reply = @client.execute_command(connection, command, *command_args)
|
14
14
|
end
|
data/lib/ffi/hiredis_vip/sadd.rb
CHANGED
@@ -10,9 +10,9 @@ module FFI
|
|
10
10
|
values = values.flatten
|
11
11
|
number_of_values = values.size
|
12
12
|
command = "SADD %b#{' %b' * number_of_values}"
|
13
|
-
command_args = [ :
|
13
|
+
command_args = [ :pointer, key, :size_t, key.size ]
|
14
14
|
values.each do |value|
|
15
|
-
command_args << :
|
15
|
+
command_args << :pointer << value << :size_t << value.size
|
16
16
|
end
|
17
17
|
|
18
18
|
synchronize do |connection|
|
data/lib/ffi/hiredis_vip/scan.rb
CHANGED
data/lib/ffi/hiredis_vip/set.rb
CHANGED
@@ -13,7 +13,7 @@ module FFI
|
|
13
13
|
reply = nil
|
14
14
|
command = "SET %b %b"
|
15
15
|
value = value.to_s
|
16
|
-
command_args = [ :
|
16
|
+
command_args = [ :pointer, key, :size_t, key.size, :pointer, value, :size_t, value.size ]
|
17
17
|
|
18
18
|
if options[:ex]
|
19
19
|
expiry = "#{options[:ex]}"
|
@@ -10,7 +10,7 @@ module FFI
|
|
10
10
|
reply = nil
|
11
11
|
value = value.to_s
|
12
12
|
command = "PSETEX %b %b %b"
|
13
|
-
command_args = [ :
|
13
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, expiry, :size_t, expiry.size, :pointer, value, :size_t, value.size ]
|
14
14
|
|
15
15
|
synchronize do |connection|
|
16
16
|
reply = @client.execute_command(connection, command, *command_args)
|
@@ -34,7 +34,7 @@ module FFI
|
|
34
34
|
reply = nil
|
35
35
|
value = value.to_s
|
36
36
|
command = "SET %b %b"
|
37
|
-
command_args = [ :
|
37
|
+
command_args = [ :pointer, key, :size_t, key.size, :pointer, value, :size_t, value.size ]
|
38
38
|
|
39
39
|
case
|
40
40
|
when options[:ex]
|
@@ -68,7 +68,7 @@ module FFI
|
|
68
68
|
reply = nil
|
69
69
|
value = value.to_s
|
70
70
|
command = "SETEX %b %b %b"
|
71
|
-
command_args = [ :
|
71
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, expiry, :size_t, expiry.size, :pointer, value, :size_t, value.size ]
|
72
72
|
|
73
73
|
synchronize do |connection|
|
74
74
|
reply = @client.execute_command(connection, command, *command_args)
|
@@ -92,7 +92,7 @@ module FFI
|
|
92
92
|
reply = nil
|
93
93
|
value = value.to_s
|
94
94
|
command = "SETNX %b %b"
|
95
|
-
command_args = [ :
|
95
|
+
command_args = [ :pointer, key, :size_t, key.size, :pointer, value, :size_t, value.size ]
|
96
96
|
|
97
97
|
synchronize do |connection|
|
98
98
|
reply = @client.execute_command(connection, command, *command_args)
|
@@ -8,18 +8,18 @@ module FFI
|
|
8
8
|
def sscan(key, cursor, options = {})
|
9
9
|
reply = nil
|
10
10
|
command = "SSCAN %b %b"
|
11
|
-
command_args = [ :
|
11
|
+
command_args = [ :pointer, key, :size_t, key.size, :string, cursor, :size_t, cursor.size ]
|
12
12
|
|
13
13
|
if options[:match]
|
14
14
|
matcher = "#{options[:match]}"
|
15
15
|
command << " MATCH %b"
|
16
|
-
command_args << :
|
16
|
+
command_args << :pointer << matcher << :size_t << matcher.size
|
17
17
|
end
|
18
18
|
|
19
19
|
if options[:count]
|
20
20
|
count = "#{options[:count]}"
|
21
21
|
command << " COUNT %b"
|
22
|
-
command_args << :
|
22
|
+
command_args << :pointer << count << :size_t << count.size
|
23
23
|
end
|
24
24
|
|
25
25
|
synchronize do |connection|
|