Skip to content

Commit a9df2b6

Browse files
authored
Fixup plurals (#144)
Signed-off-by: Adam Fowler <[email protected]>
1 parent 8911589 commit a9df2b6

14 files changed

+103
-98
lines changed

Sources/Valkey/Commands/ConnectionCommands.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ extension CLIENT {
5555
/// A client claims its capability.
5656
@_documentation(visibility: internal)
5757
public struct CAPA<Capability: RESPStringRenderable>: ValkeyCommand {
58-
public var capabilitys: [Capability]
58+
public var capabilities: [Capability]
5959

60-
@inlinable public init(capabilitys: [Capability]) {
61-
self.capabilitys = capabilitys
60+
@inlinable public init(capabilities: [Capability]) {
61+
self.capabilities = capabilities
6262
}
6363

6464
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
65-
commandEncoder.encodeArray("CLIENT", "CAPA", capabilitys.map { RESPBulkString($0) })
65+
commandEncoder.encodeArray("CLIENT", "CAPA", capabilities.map { RESPBulkString($0) })
6666
}
6767
}
6868

@@ -829,8 +829,8 @@ extension ValkeyConnectionProtocol {
829829
/// - Available: 8.0.0
830830
/// - Complexity: O(1)
831831
@inlinable
832-
public func clientCapa<Capability: RESPStringRenderable>(capabilitys: [Capability]) async throws {
833-
_ = try await send(command: CLIENT.CAPA(capabilitys: capabilitys))
832+
public func clientCapa<Capability: RESPStringRenderable>(capabilities: [Capability]) async throws {
833+
_ = try await send(command: CLIENT.CAPA(capabilities: capabilities))
834834
}
835835

836836
/// Returns the name of the connection.

Sources/Valkey/Commands/Custom/StreamCustomCommands.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ public struct XREADStreams<Message>: RESPTokenDecodable, Sendable where Message:
115115
@_documentation(visibility: internal)
116116
public struct XAUTOCLAIMResponse: RESPTokenDecodable, Sendable {
117117
public let streamID: String
118-
public let messsages: [XREADMessage]
118+
public let messages: [XREADMessage]
119119
public let deletedMessages: [String]
120120

121121
public init(fromRESP token: RESPToken) throws {
122122
switch token.value {
123123
case .array(let array):
124-
(self.streamID, self.messsages, self.deletedMessages) = try array.decodeElements()
124+
(self.streamID, self.messages, self.deletedMessages) = try array.decodeElements()
125125
default:
126126
throw RESPParsingError(code: .unexpectedType, buffer: token.base)
127127
}

Sources/Valkey/Commands/GenericCommands.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public struct MIGRATE<Host: RESPStringRenderable>: ValkeyCommand {
395395
public var copy: Bool
396396
public var replace: Bool
397397
public var authentication: Authentication?
398-
public var keyss: [ValkeyKey]
398+
public var keys: [ValkeyKey]
399399

400400
@inlinable public init(
401401
host: Host,
@@ -406,7 +406,7 @@ public struct MIGRATE<Host: RESPStringRenderable>: ValkeyCommand {
406406
copy: Bool = false,
407407
replace: Bool = false,
408408
authentication: Authentication? = nil,
409-
keyss: [ValkeyKey] = []
409+
keys: [ValkeyKey] = []
410410
) {
411411
self.host = host
412412
self.port = port
@@ -416,10 +416,10 @@ public struct MIGRATE<Host: RESPStringRenderable>: ValkeyCommand {
416416
self.copy = copy
417417
self.replace = replace
418418
self.authentication = authentication
419-
self.keyss = keyss
419+
self.keys = keys
420420
}
421421

422-
public var keysAffected: [ValkeyKey] { keyss }
422+
public var keysAffected: [ValkeyKey] { keys }
423423

424424
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
425425
commandEncoder.encodeArray(
@@ -432,7 +432,7 @@ public struct MIGRATE<Host: RESPStringRenderable>: ValkeyCommand {
432432
RESPPureToken("COPY", copy),
433433
RESPPureToken("REPLACE", replace),
434434
authentication,
435-
RESPWithToken("KEYS", keyss)
435+
RESPWithToken("KEYS", keys)
436436
)
437437
}
438438
}
@@ -1133,7 +1133,7 @@ extension ValkeyConnectionProtocol {
11331133
copy: Bool = false,
11341134
replace: Bool = false,
11351135
authentication: MIGRATE<Host>.Authentication? = nil,
1136-
keyss: [ValkeyKey] = []
1136+
keys: [ValkeyKey] = []
11371137
) async throws -> String? {
11381138
try await send(
11391139
command: MIGRATE(
@@ -1145,7 +1145,7 @@ extension ValkeyConnectionProtocol {
11451145
copy: copy,
11461146
replace: replace,
11471147
authentication: authentication,
1148-
keyss: keyss
1148+
keys: keys
11491149
)
11501150
)
11511151
}

Sources/Valkey/Commands/GeoCommands.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,19 @@ public struct GEOADD<Member: RESPStringRenderable>: ValkeyCommand {
6868
public var key: ValkeyKey
6969
public var condition: Condition?
7070
public var change: Bool
71-
public var datas: [Data]
71+
public var data: [Data]
7272

73-
@inlinable public init(_ key: ValkeyKey, condition: Condition? = nil, change: Bool = false, datas: [Data]) {
73+
@inlinable public init(_ key: ValkeyKey, condition: Condition? = nil, change: Bool = false, data: [Data]) {
7474
self.key = key
7575
self.condition = condition
7676
self.change = change
77-
self.datas = datas
77+
self.data = data
7878
}
7979

8080
public var keysAffected: CollectionOfOne<ValkeyKey> { .init(key) }
8181

8282
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
83-
commandEncoder.encodeArray("GEOADD", key, condition, RESPPureToken("CH", change), datas)
83+
commandEncoder.encodeArray("GEOADD", key, condition, RESPPureToken("CH", change), data)
8484
}
8585
}
8686

@@ -1117,9 +1117,9 @@ extension ValkeyConnectionProtocol {
11171117
_ key: ValkeyKey,
11181118
condition: GEOADD<Member>.Condition? = nil,
11191119
change: Bool = false,
1120-
datas: [GEOADD<Member>.Data]
1120+
data: [GEOADD<Member>.Data]
11211121
) async throws -> Int {
1122-
try await send(command: GEOADD(key, condition: condition, change: change, datas: datas))
1122+
try await send(command: GEOADD(key, condition: condition, change: change, data: data))
11231123
}
11241124

11251125
/// Returns the distance between two members of a geospatial index.

Sources/Valkey/Commands/HashCommands.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -236,17 +236,17 @@ public struct HMSET<Field: RESPStringRenderable, Value: RESPStringRenderable>: V
236236
}
237237
}
238238
public var key: ValkeyKey
239-
public var datas: [Data]
239+
public var data: [Data]
240240

241-
@inlinable public init(_ key: ValkeyKey, datas: [Data]) {
241+
@inlinable public init(_ key: ValkeyKey, data: [Data]) {
242242
self.key = key
243-
self.datas = datas
243+
self.data = data
244244
}
245245

246246
public var keysAffected: CollectionOfOne<ValkeyKey> { .init(key) }
247247

248248
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
249-
commandEncoder.encodeArray("HMSET", key, datas)
249+
commandEncoder.encodeArray("HMSET", key, data)
250250
}
251251
}
252252

@@ -353,17 +353,17 @@ public struct HSET<Field: RESPStringRenderable, Value: RESPStringRenderable>: Va
353353
public typealias Response = Int
354354

355355
public var key: ValkeyKey
356-
public var datas: [Data]
356+
public var data: [Data]
357357

358-
@inlinable public init(_ key: ValkeyKey, datas: [Data]) {
358+
@inlinable public init(_ key: ValkeyKey, data: [Data]) {
359359
self.key = key
360-
self.datas = datas
360+
self.data = data
361361
}
362362

363363
public var keysAffected: CollectionOfOne<ValkeyKey> { .init(key) }
364364

365365
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
366-
commandEncoder.encodeArray("HSET", key, datas)
366+
commandEncoder.encodeArray("HSET", key, data)
367367
}
368368
}
369369

@@ -547,8 +547,8 @@ extension ValkeyConnectionProtocol {
547547
/// - Deprecated since: 4.0.0. Replaced by `HSET` with multiple field-value pairs.
548548
/// - Complexity: O(N) where N is the number of fields being set.
549549
@inlinable
550-
public func hmset<Field: RESPStringRenderable, Value: RESPStringRenderable>(_ key: ValkeyKey, datas: [HMSET<Field, Value>.Data]) async throws {
551-
_ = try await send(command: HMSET(key, datas: datas))
550+
public func hmset<Field: RESPStringRenderable, Value: RESPStringRenderable>(_ key: ValkeyKey, data: [HMSET<Field, Value>.Data]) async throws {
551+
_ = try await send(command: HMSET(key, data: data))
552552
}
553553

554554
/// Returns one or more random fields from a hash.
@@ -593,9 +593,9 @@ extension ValkeyConnectionProtocol {
593593
/// - Response: [Integer]: The number of fields that were added
594594
@inlinable
595595
@discardableResult
596-
public func hset<Field: RESPStringRenderable, Value: RESPStringRenderable>(_ key: ValkeyKey, datas: [HSET<Field, Value>.Data]) async throws -> Int
596+
public func hset<Field: RESPStringRenderable, Value: RESPStringRenderable>(_ key: ValkeyKey, data: [HSET<Field, Value>.Data]) async throws -> Int
597597
{
598-
try await send(command: HSET(key, datas: datas))
598+
try await send(command: HSET(key, data: data))
599599
}
600600

601601
/// Sets the value of a field in a hash only when the field doesn't exist.

Sources/Valkey/Commands/SentinelCommands.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ public enum SENTINEL {
122122
}
123123
public typealias Response = RESPToken.Map?
124124

125-
public var datas: [Data]
125+
public var data: [Data]
126126

127-
@inlinable public init(datas: [Data] = []) {
128-
self.datas = datas
127+
@inlinable public init(data: [Data] = []) {
128+
self.data = data
129129
}
130130

131131
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
132-
commandEncoder.encodeArray("SENTINEL", "DEBUG", datas)
132+
commandEncoder.encodeArray("SENTINEL", "DEBUG", data)
133133
}
134134
}
135135

@@ -453,15 +453,15 @@ public enum SENTINEL {
453453
}
454454
}
455455
public var primaryName: PrimaryName
456-
public var datas: [Data]
456+
public var data: [Data]
457457

458-
@inlinable public init(primaryName: PrimaryName, datas: [Data]) {
458+
@inlinable public init(primaryName: PrimaryName, data: [Data]) {
459459
self.primaryName = primaryName
460-
self.datas = datas
460+
self.data = data
461461
}
462462

463463
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
464-
commandEncoder.encodeArray("SENTINEL", "SET", RESPBulkString(primaryName), datas)
464+
commandEncoder.encodeArray("SENTINEL", "SET", RESPBulkString(primaryName), data)
465465
}
466466
}
467467

@@ -554,8 +554,8 @@ extension ValkeyConnectionProtocol {
554554
/// * [Map]: List of configurable time parameters and their values (milliseconds).
555555
@inlinable
556556
@discardableResult
557-
public func sentinelDebug(datas: [SENTINEL.DEBUG.Data] = []) async throws -> RESPToken.Map? {
558-
try await send(command: SENTINEL.DEBUG(datas: datas))
557+
public func sentinelDebug(data: [SENTINEL.DEBUG.Data] = []) async throws -> RESPToken.Map? {
558+
try await send(command: SENTINEL.DEBUG(data: data))
559559
}
560560

561561
/// Forces a Sentinel failover.
@@ -804,9 +804,9 @@ extension ValkeyConnectionProtocol {
804804
@inlinable
805805
public func sentinelSet<PrimaryName: RESPStringRenderable, Option: RESPStringRenderable, Value: RESPStringRenderable>(
806806
primaryName: PrimaryName,
807-
datas: [SENTINEL.SET<PrimaryName, Option, Value>.Data]
807+
data: [SENTINEL.SET<PrimaryName, Option, Value>.Data]
808808
) async throws {
809-
_ = try await send(command: SENTINEL.SET(primaryName: primaryName, datas: datas))
809+
_ = try await send(command: SENTINEL.SET(primaryName: primaryName, data: data))
810810
}
811811

812812
/// Simulates failover scenarios.

Sources/Valkey/Commands/ServerCommands.swift

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -585,14 +585,14 @@ public enum CONFIG {
585585
RESPBulkString(value).encode(into: &commandEncoder)
586586
}
587587
}
588-
public var datas: [Data]
588+
public var data: [Data]
589589

590-
@inlinable public init(datas: [Data]) {
591-
self.datas = datas
590+
@inlinable public init(data: [Data]) {
591+
self.data = data
592592
}
593593

594594
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
595-
commandEncoder.encodeArray("CONFIG", "SET", datas)
595+
commandEncoder.encodeArray("CONFIG", "SET", data)
596596
}
597597
}
598598

@@ -865,17 +865,17 @@ public enum MODULE {
865865
}
866866
}
867867
public var path: Path
868-
public var configss: [Configs]
869-
public var argss: [String]
868+
public var configs: [Configs]
869+
public var args: [String]
870870

871-
@inlinable public init(path: Path, configss: [Configs] = [], argss: [String] = []) {
871+
@inlinable public init(path: Path, configs: [Configs] = [], args: [String] = []) {
872872
self.path = path
873-
self.configss = configss
874-
self.argss = argss
873+
self.configs = configs
874+
self.args = args
875875
}
876876

877877
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
878-
commandEncoder.encodeArray("MODULE", "LOADEX", RESPBulkString(path), RESPWithToken("CONFIG", configss), RESPWithToken("ARGS", argss))
878+
commandEncoder.encodeArray("MODULE", "LOADEX", RESPBulkString(path), RESPWithToken("CONFIG", configs), RESPWithToken("ARGS", args))
879879
}
880880
}
881881

@@ -1871,8 +1871,8 @@ extension ValkeyConnectionProtocol {
18711871
/// * 7.0.0: Added the ability to set multiple parameters in one call.
18721872
/// - Complexity: O(N) when N is the number of configuration parameters provided
18731873
@inlinable
1874-
public func configSet<Parameter: RESPStringRenderable, Value: RESPStringRenderable>(datas: [CONFIG.SET<Parameter, Value>.Data]) async throws {
1875-
_ = try await send(command: CONFIG.SET(datas: datas))
1874+
public func configSet<Parameter: RESPStringRenderable, Value: RESPStringRenderable>(data: [CONFIG.SET<Parameter, Value>.Data]) async throws {
1875+
_ = try await send(command: CONFIG.SET(data: data))
18761876
}
18771877

18781878
/// Returns the number of keys in the database.
@@ -2153,9 +2153,8 @@ extension ValkeyConnectionProtocol {
21532153
/// - Available: 7.0.0
21542154
/// - Complexity: O(1)
21552155
@inlinable
2156-
public func moduleLoadex<Path: RESPStringRenderable>(path: Path, configss: [MODULE.LOADEX<Path>.Configs] = [], argss: [String] = []) async throws
2157-
{
2158-
_ = try await send(command: MODULE.LOADEX(path: path, configss: configss, argss: argss))
2156+
public func moduleLoadex<Path: RESPStringRenderable>(path: Path, configs: [MODULE.LOADEX<Path>.Configs] = [], args: [String] = []) async throws {
2157+
_ = try await send(command: MODULE.LOADEX(path: path, configs: configs, args: args))
21592158
}
21602159

21612160
/// Unloads a module.

Sources/Valkey/Commands/SortedSetCommands.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,28 +161,28 @@ public struct ZADD<Member: RESPStringRenderable>: ValkeyCommand {
161161
public var comparison: Comparison?
162162
public var change: Bool
163163
public var increment: Bool
164-
public var datas: [Data]
164+
public var data: [Data]
165165

166166
@inlinable public init(
167167
_ key: ValkeyKey,
168168
condition: Condition? = nil,
169169
comparison: Comparison? = nil,
170170
change: Bool = false,
171171
increment: Bool = false,
172-
datas: [Data]
172+
data: [Data]
173173
) {
174174
self.key = key
175175
self.condition = condition
176176
self.comparison = comparison
177177
self.change = change
178178
self.increment = increment
179-
self.datas = datas
179+
self.data = data
180180
}
181181

182182
public var keysAffected: CollectionOfOne<ValkeyKey> { .init(key) }
183183

184184
@inlinable public func encode(into commandEncoder: inout ValkeyCommandEncoder) {
185-
commandEncoder.encodeArray("ZADD", key, condition, comparison, RESPPureToken("CH", change), RESPPureToken("INCR", increment), datas)
185+
commandEncoder.encodeArray("ZADD", key, condition, comparison, RESPPureToken("CH", change), RESPPureToken("INCR", increment), data)
186186
}
187187
}
188188

@@ -1299,9 +1299,9 @@ extension ValkeyConnectionProtocol {
12991299
comparison: ZADD<Member>.Comparison? = nil,
13001300
change: Bool = false,
13011301
increment: Bool = false,
1302-
datas: [ZADD<Member>.Data]
1302+
data: [ZADD<Member>.Data]
13031303
) async throws -> RESPToken? {
1304-
try await send(command: ZADD(key, condition: condition, comparison: comparison, change: change, increment: increment, datas: datas))
1304+
try await send(command: ZADD(key, condition: condition, comparison: comparison, change: change, increment: increment, data: data))
13051305
}
13061306

13071307
/// Returns the number of members in a sorted set.

0 commit comments

Comments
 (0)