@@ -267,6 +267,19 @@ extension RedisClient {
267267 return send ( command: " LPUSH " , with: args)
268268 . convertFromRESPValue ( )
269269 }
270+
271+ /// Pushes all of the provided elements into a list.
272+ /// - Note: This inserts the elements at the head of the list; for the tail see `rpush(_:into:)`.
273+ ///
274+ /// See [https://redis.io/commands/lpush](https://redis.io/commands/lpush)
275+ /// - Parameters:
276+ /// - elements: The values to push into the list.
277+ /// - key: The key of the list.
278+ /// - Returns: The length of the list after adding the new elements.
279+ @inlinable
280+ public func lpush< Value: RESPValueConvertible > ( _ elements: Value ... , into key: String ) -> EventLoopFuture < Int > {
281+ return self . lpush ( elements, into: key)
282+ }
270283
271284 /// Pushes an element into a list, but only if the key exists and holds a list.
272285 /// - Note: This inserts the element at the head of the list, for the tail see `rpushx(_:into:)`.
@@ -318,6 +331,18 @@ extension RedisClient {
318331 return send ( command: " RPUSH " , with: args)
319332 . convertFromRESPValue ( )
320333 }
334+
335+ /// Pushes all of the provided elements into a list.
336+ /// - Note: This inserts the elements at the tail of the list; for the head see `lpush(_:into:)`.
337+ ///
338+ /// See [https://redis.io/commands/rpush](https://redis.io/commands/rpush)
339+ /// - elements: The values to push into the list.
340+ /// - key: The key of the list.
341+ /// - Returns: The length of the list after adding the new elements.
342+ @inlinable
343+ public func rpush< Value: RESPValueConvertible > ( _ elements: Value ... , into key: String ) -> EventLoopFuture < Int > {
344+ return self . rpush ( elements, into: key)
345+ }
321346
322347 /// Pushes an element into a list, but only if the key exists and holds a list.
323348 /// - Note: This inserts the element at the tail of the list; for the head see `lpushx(_:into:)`.
@@ -378,12 +403,31 @@ extension RedisClient {
378403 ///
379404 /// Otherwise, the key of the list the element was removed from and the popped element.
380405 @inlinable
381- public func blpop(
382- from keys: [ String ] ,
383- timeout: Int = 0
384- ) -> EventLoopFuture < ( String , RESPValue ) ? > {
406+ public func blpop( from keys: [ String ] , timeout: Int = 0 ) -> EventLoopFuture < ( String , RESPValue ) ? > {
385407 return _bpop ( command: " BLPOP " , keys, timeout)
386408 }
409+
410+ /// Removes the first element of a list, blocking until an element is available.
411+ ///
412+ /// - Important:
413+ /// This will block the connection from completing further commands until an element
414+ /// is available to pop from the group of lists.
415+ ///
416+ /// It is **highly** recommended to set a reasonable `timeout`
417+ /// or to use the non-blocking `lpop` method where possible.
418+ ///
419+ /// See [https://redis.io/commands/blpop](https://redis.io/commands/blpop)
420+ /// - Parameters:
421+ /// - keys: The keys of lists in Redis that should be popped from.
422+ /// - timeout: The time (in seconds) to wait. `0` means indefinitely.
423+ /// - Returns:
424+ /// If timeout was reached, `nil`.
425+ ///
426+ /// Otherwise, the key of the list the element was removed from and the popped element.
427+ @inlinable
428+ public func blpop( from keys: String ... , timeout: Int = 0 ) -> EventLoopFuture < ( String , RESPValue ) ? > {
429+ return self . blpop ( from: keys, timeout: timeout)
430+ }
387431
388432 /// Removes the last element of a list, blocking until an element is available.
389433 ///
@@ -422,13 +466,32 @@ extension RedisClient {
422466 ///
423467 /// Otherwise, the key of the list the element was removed from and the popped element.
424468 @inlinable
425- public func brpop(
426- from keys: [ String ] ,
427- timeout: Int = 0
428- ) -> EventLoopFuture < ( String , RESPValue ) ? > {
469+ public func brpop( from keys: [ String ] , timeout: Int = 0 ) -> EventLoopFuture < ( String , RESPValue ) ? > {
429470 return _bpop ( command: " BRPOP " , keys, timeout)
430471 }
431472
473+ /// Removes the last element of a list, blocking until an element is available.
474+ ///
475+ /// - Important:
476+ /// This will block the connection from completing further commands until an element
477+ /// is available to pop from the group of lists.
478+ ///
479+ /// It is **highly** recommended to set a reasonable `timeout`
480+ /// or to use the non-blocking `rpop` method where possible.
481+ ///
482+ /// See [https://redis.io/commands/brpop](https://redis.io/commands/brpop)
483+ /// - Parameters:
484+ /// - keys: The keys of lists in Redis that should be popped from.
485+ /// - timeout: The time (in seconds) to wait. `0` means indefinitely.
486+ /// - Returns:
487+ /// If timeout was reached, `nil`.
488+ ///
489+ /// Otherwise, the key of the list the element was removed from and the popped element.
490+ @inlinable
491+ public func brpop( from keys: String ... , timeout: Int = 0 ) -> EventLoopFuture < ( String , RESPValue ) ? > {
492+ return self . brpop ( from: keys, timeout: timeout)
493+ }
494+
432495 @usableFromInline
433496 func _bpop(
434497 command: String ,
0 commit comments