Skip to content

Commit a4aec72

Browse files
committed
Update command symbol docs to use DocC symbol references
1 parent 20f6c45 commit a4aec72

10 files changed

+74
-74
lines changed

Sources/RediStack/Commands/ConnectionCommands.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2020 RediStack project authors
5+
// Copyright (c) 2020-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -60,7 +60,7 @@ extension RedisCommand {
6060
extension RedisClient {
6161
/// Pings the server, which will respond with a message.
6262
///
63-
/// See `RedisCommand.ping(with:)`
63+
/// See ``RedisCommand/ping(with:)``
6464
/// - Parameter message: The optional message that the server should respond with instead of the default.
6565
/// - Returns: A `NIO.EventLoopFuture` that resolves the given `message` or Redis' default response of `PONG`.
6666
public func ping(with message: String? = nil) -> EventLoopFuture<String> {
@@ -69,7 +69,7 @@ extension RedisClient {
6969

7070
/// Requests the client to authenticate with Redis to allow other commands to be executed.
7171
///
72-
/// See `RedisCommand.auth(with:)`
72+
/// See ``RedisCommand/auth(with:)``
7373
/// - Parameter password: The password to authenticate with.
7474
/// - Returns: A `NIO.EventLoopFuture` that resolves if the password as accepted, otherwise it fails.
7575
public func authorize(with password: String) -> EventLoopFuture<Void> {
@@ -78,7 +78,7 @@ extension RedisClient {
7878

7979
/// Selects the Redis logical database having the given zero-based numeric index.
8080
///
81-
/// See `RedisCommand.select(database:)`
81+
/// See ``RedisCommand/select(database:)``
8282
/// - Note: New connections always use the database `0`.
8383
/// - Parameter index: The 0-based index of the database that the connection sending this command will execute later commands against.
8484
/// - Returns: A `NIO.EventLoopFuture` resolving once the operation has succeeded.

Sources/RediStack/Commands/HashCommands.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2019-2020 RediStack project authors
5+
// Copyright (c) 2019-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -148,7 +148,7 @@ extension RedisCommand {
148148
}
149149

150150
/// [HSET](https://redis.io/commands/hset)
151-
/// - Note: If you do not want to overwrite existing values, use `hsetnx(_:field:to:)`.
151+
/// - Note: If you do not want to overwrite existing values, use ``hsetnx(_:field:to:)``.
152152
/// - Parameters:
153153
/// - field: The key of the field in the hash being set.
154154
/// - value: The value the hash field should be set to.
@@ -168,7 +168,7 @@ extension RedisCommand {
168168
}
169169

170170
/// [HSETNX](https://redis.io/commands/hsetnx)
171-
/// - Note: If you do not care about overwriting existing values, use `hset(_:field:to:)`.
171+
/// - Note: If you do not care about overwriting existing values, use ``hset(_:field:to:)``.
172172
/// - Parameters:
173173
/// - field: The key of the field in the hash being set.
174174
/// - value: The value the hash field should be set to.
@@ -231,7 +231,7 @@ extension RedisCommand {
231231
extension RedisClient {
232232
/// Incrementally iterates over all fields in a hash.
233233
///
234-
/// See `RedisCommand.hscan(_:startingFrom:matching:count:)`
234+
/// See ``RedisCommand/hscan(_:startingFrom:matching:count:)``
235235
/// - Parameters:
236236
/// - key: The key of the hash.
237237
/// - position: The position to start the scan from.

Sources/RediStack/Commands/KeyCommands.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ extension RedisCommand {
9393
extension RedisClient {
9494
/// Deletes the given keys. Any key that does not exist is ignored.
9595
///
96-
/// See `RedisCommand.del(keys:)`
96+
/// See ``RedisCommand/.del(keys:)``
9797
/// - Parameter keys: The list of keys to delete from the database.
9898
/// - Returns: A `NIO.EventLoopFuture` that resolves the number of keys that were deleted from the database.
9999
public func delete(_ keys: RedisKey...) -> EventLoopFuture<Int> {
@@ -102,7 +102,7 @@ extension RedisClient {
102102

103103
/// Deletes the given keys. Any key that does not exist is ignored.
104104
///
105-
/// See `RedisCommand.del(keys:)`
105+
/// See ``RedisCommand/del(keys:)``
106106
/// - Parameter keys: The list of keys to delete from the database.
107107
/// - Returns: A `NIO.EventLoopFuture` that resolves the number of keys that were deleted from the database.
108108
public func delete(_ keys: [RedisKey]) -> EventLoopFuture<Int> {
@@ -112,7 +112,7 @@ extension RedisClient {
112112

113113
/// Sets a timeout on key. After the timeout has expired, the key will automatically be deleted.
114114
///
115-
/// See `RedisCommand.expire(_:after:)`
115+
/// See ``RedisCommand/expire(_:after:)``
116116
/// - Parameters:
117117
/// - key: The key to set the expiration on.
118118
/// - timeout: The time from now the key will expire at.
@@ -125,14 +125,14 @@ extension RedisClient {
125125
///
126126
/// See ``RedisCommand/keys(matching:)``
127127
/// - Parameter pattern: The key pattern to search for matching keys that exist in Redis.
128-
/// - Returns: A list of keys that matched the provided pattern.
128+
/// - Returns: A result set of ``RedisKey`` values that exist and match the provided pattern.
129129
public func listKeys(matching pattern: String) -> EventLoopFuture<[RedisKey]> {
130130
return self.send(.keys(matching: pattern))
131131
}
132132

133133
/// Incrementally iterates over all keys in the currently selected database.
134134
///
135-
/// See `RedisCommand.scan(startingFrom:matching:count:)`
135+
/// See ``RedisCommand/scan(startingFrom:matching:count:)``
136136
/// - Parameters:
137137
/// - position: The cursor position to start from.
138138
/// - match: A glob-style pattern to filter values to be selected from the result set.

Sources/RediStack/Commands/ListCommands.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2019-2020 RediStack project authors
5+
// Copyright (c) 2019-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -193,7 +193,7 @@ extension RedisCommand {
193193
) -> RedisCommand<Int> { .lpush(elements, into: key) }
194194

195195
/// [LPUSHX](https://redis.io/commands/lpushx)
196-
/// - Note: This inserts the element at the head of the list, for the tail see `rpushx(_:into:)`.
196+
/// - Note: This inserts the element at the head of the list, for the tail see ``rpushx(_:into:)``.
197197
/// - Parameters:
198198
/// - element: The value to try and push into the list.
199199
/// - key: The key of the list.
@@ -239,7 +239,7 @@ extension RedisCommand {
239239
/// - Precondition: A `ClosedRange` cannot be created where `upperBound` is less than `lowerBound`; so while Redis may support `0...-1`,
240240
/// `ClosedRange` will trigger a precondition failure.
241241
///
242-
/// If you need such a range, use `lrange(from:firstIndex:lastIndex:)` instead.
242+
/// If you need such a range, use ``lrange(from:firstIndex:lastIndex:)`` instead.
243243
/// - Parameters:
244244
/// - key: The key of the List to return elements from.
245245
/// - range: The range of inclusive indices of elements to get.
@@ -266,7 +266,7 @@ extension RedisCommand {
266266
/// - Precondition: A `Range` cannot be created where `upperBound` is less than `lowerBound`; so while Redis may support `0..<(-1)`,
267267
/// `Range` will trigger a precondition failure.
268268
///
269-
/// If you need such a range, use `lrange(from:firstIndex:lastIndex:)` instead.
269+
/// If you need such a range, use ``lrange(from:firstIndex:lastIndex:)`` instead.
270270
/// - Parameters:
271271
/// - key: The key of the List to return elements from.
272272
/// - range: The range of indices (inclusive lower, exclusive upper) elements to get.
@@ -394,7 +394,7 @@ extension RedisCommand {
394394
/// - Precondition: A `ClosedRange` cannot be created where `upperBound` is less than `lowerBound`; so while Redis may support `0...-1`,
395395
/// `ClosedRange` will trigger a precondition failure.
396396
///
397-
/// If you need such a range, use `ltrim(_:before:after:)` instead.
397+
/// If you need such a range, use ``ltrim(_:before:after:)`` instead.
398398
/// - Parameters:
399399
/// - key: The key of the List to trim.
400400
/// - range: The range of indices that should be kept in the List.
@@ -515,7 +515,7 @@ extension RedisCommand {
515515
}
516516

517517
/// [RPUSHX](https://redis.io/commands/rpushx)
518-
/// - Note: This inserts the element at the tail of the list; for the head see `lpushx(_:into:)`.
518+
/// - Note: This inserts the element at the tail of the list; for the head see ``lpushx(_:into:)``.
519519
/// - Parameters:
520520
/// - element: The value to try and push into the list.
521521
/// - key: The key of the list.

Sources/RediStack/Commands/PubSubCommands.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2020 RediStack project authors
5+
// Copyright (c) 2020-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -82,7 +82,7 @@ extension RedisCommand {
8282
extension RedisClient {
8383
/// Publishes the provided message to a specific Redis channel.
8484
///
85-
/// See `RedisCommand.publish(_:to:)`
85+
/// See ``RedisCommand/publish(_:to:)``
8686
/// - Parameters:
8787
/// - message: The "message" value to publish on the channel.
8888
/// - channel: The name of the channel to publish the message to.

Sources/RediStack/Commands/RedisCommand.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
/// An instance will retain the keyword of the command in plaintext as a `String` for identity purposes,
1818
/// while all the arguments will be stored as `RESPValue` representations.
1919
///
20-
/// ## ResultType
21-
/// Each `RedisCommand` has a generic type referred to as `ResultType` that is the native Swift representation of the response Redis will send for the command.
20+
/// Each `RedisCommand` has a generic type referred to as `ResultType` that is the native Swift representation
21+
/// of the final result type parsed from the Redis command response.
2222
///
23-
/// When creating a `RedisCommand`, a closure will be provided for transforming an arbitrary `RESPValue` instance into the `ResultType`.
23+
/// When creating a `RedisCommand`, a closure is provided for transforming an arbitrary `RESPValue` instance into the `ResultType`.
2424
public struct RedisCommand<ResultType> {
2525
public let keyword: String
2626
public let arguments: [RESPValue]

Sources/RediStack/Commands/ServerCommands.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2020 RediStack project authors
5+
// Copyright (c) 2020-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -37,7 +37,7 @@ extension RedisCommand {
3737
extension RedisClient {
3838
/// Swaps the data of two Redis databases by their index IDs.
3939
///
40-
/// See `RedisCommand.swapdb(_:with:)`
40+
/// See ``RedisCommand/swapdb(_:with:)``
4141
/// - Parameters:
4242
/// - first: The index of the first database.
4343
/// - second: The index of the second database.

Sources/RediStack/Commands/SetCommands.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the RediStack open source project
44
//
5-
// Copyright (c) 2019-2020 RediStack project authors
5+
// Copyright (c) 2019-2022 RediStack project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -248,7 +248,7 @@ extension RedisCommand {
248248
extension RedisClient {
249249
/// Incrementally iterates over all values in a set.
250250
///
251-
/// See `RedisCommand.sscan(_:startingFrom:matching:count:)`
251+
/// See ``RedisCommand/sscan(_:startingFrom:matching:count:)``
252252
/// - Parameters:
253253
/// - key: The key of the set.
254254
/// - position: The position to start the scan from.

0 commit comments

Comments
 (0)