@@ -20,7 +20,6 @@ extension RedisClient {
20
20
/// See [https://redis.io/commands/echo](https://redis.io/commands/echo)
21
21
/// - Parameter message: The message to echo.
22
22
/// - Returns: The message sent with the command.
23
- @inlinable
24
23
public func echo( _ message: String ) -> EventLoopFuture < String > {
25
24
let args = [ RESPValue ( bulk: message) ]
26
25
return send ( command: " ECHO " , with: args)
@@ -32,7 +31,6 @@ extension RedisClient {
32
31
/// See [https://redis.io/commands/ping](https://redis.io/commands/ping)
33
32
/// - Parameter message: The optional message that the server should respond with.
34
33
/// - Returns: The provided message or Redis' default response of `"PONG"`.
35
- @inlinable
36
34
public func ping( with message: String ? = nil ) -> EventLoopFuture < String > {
37
35
let args : [ RESPValue ] = message != nil
38
36
? [ . init( bulk: message!) ] // safe because we did a nil pre-check
@@ -47,7 +45,6 @@ extension RedisClient {
47
45
/// [https://redis.io/commands/select](https://redis.io/commands/select)
48
46
/// - Parameter index: The 0-based index of the database that will receive later commands.
49
47
/// - Returns: An `EventLoopFuture` that resolves when the operation has succeeded, or fails with a `RedisError`.
50
- @inlinable
51
48
public func select( database index: Int ) -> EventLoopFuture < Void > {
52
49
let args = [ RESPValue ( bulk: index) ]
53
50
return send ( command: " SELECT " , with: args)
@@ -61,7 +58,6 @@ extension RedisClient {
61
58
/// - first: The index of the first database.
62
59
/// - second: The index of the second database.
63
60
/// - Returns: `true` if the swap was successful.
64
- @inlinable
65
61
public func swapDatabase( _ first: Int , with second: Int ) -> EventLoopFuture < Bool > {
66
62
let args : [ RESPValue ] = [
67
63
. init( bulk: first) ,
@@ -77,7 +73,6 @@ extension RedisClient {
77
73
/// [https://redis.io/commands/auth](https://redis.io/commands/auth)
78
74
/// - Parameter password: The password to authenticate with.
79
75
/// - Returns: A `NIO.EventLoopFuture` that resolves if the password was accepted, otherwise it fails.
80
- @inlinable
81
76
public func authorize( with password: String ) -> EventLoopFuture < Void > {
82
77
let args = [ RESPValue ( bulk: password) ]
83
78
return send ( command: " AUTH " , with: args)
@@ -89,7 +84,6 @@ extension RedisClient {
89
84
/// [https://redis.io/commands/del](https://redis.io/commands/del)
90
85
/// - Parameter keys: A list of keys to delete from the database.
91
86
/// - Returns: The number of keys deleted from the database.
92
- @inlinable
93
87
public func delete( _ keys: [ RedisKey ] ) -> EventLoopFuture < Int > {
94
88
guard keys. count > 0 else { return self . eventLoop. makeSucceededFuture ( 0 ) }
95
89
@@ -103,7 +97,6 @@ extension RedisClient {
103
97
/// [https://redis.io/commands/del](https://redis.io/commands/del)
104
98
/// - Parameter keys: A list of keys to delete from the database.
105
99
/// - Returns: The number of keys deleted from the database.
106
- @inlinable
107
100
public func delete( _ keys: RedisKey ... ) -> EventLoopFuture < Int > {
108
101
return self . delete ( keys)
109
102
}
@@ -116,7 +109,6 @@ extension RedisClient {
116
109
/// - key: The key to set the expiration on.
117
110
/// - timeout: The time from now the key will expire at.
118
111
/// - Returns: `true` if the expiration was set.
119
- @inlinable
120
112
public func expire( _ key: RedisKey , after timeout: TimeAmount ) -> EventLoopFuture < Bool > {
121
113
let args : [ RESPValue ] = [
122
114
. init( bulk: key) ,
@@ -136,16 +128,15 @@ extension RedisClient {
136
128
/// [https://redis.io/commands/scan](https://redis.io/commands/scan)
137
129
/// - Parameters:
138
130
/// - position: The cursor position to start from.
139
- /// - count: The number of elements to advance by. Redis default is 10.
140
131
/// - match: A glob-style pattern to filter values to be selected from the result set.
132
+ /// - count: The number of elements to advance by. Redis default is 10.
141
133
/// - Returns: A cursor position for additional invocations with a limited collection of keys found in the database.
142
- @inlinable
143
134
public func scan(
144
135
startingFrom position: Int = 0 ,
145
- count : Int ? = nil ,
146
- matching match : String ? = nil
136
+ matching match : String ? = nil ,
137
+ count : Int ? = nil
147
138
) -> EventLoopFuture < ( Int , [ String ] ) > {
148
- return _scan ( command: " SCAN " , nil , position, count , match )
139
+ return _scan ( command: " SCAN " , nil , position, match , count )
149
140
}
150
141
151
142
@usableFromInline
@@ -154,8 +145,8 @@ extension RedisClient {
154
145
resultType: T . Type = T . self,
155
146
_ key: RedisKey ? ,
156
147
_ pos: Int ,
157
- _ count : Int ? ,
158
- _ match : String ?
148
+ _ match : String ? ,
149
+ _ count : Int ?
159
150
) -> EventLoopFuture < ( Int , T ) >
160
151
where
161
152
T: RESPValueConvertible
0 commit comments