this repo has no description

add Client convenience methods for command modules, fix error set

+48 -1
+47
src/client.zig
··· 362 362 } 363 363 364 364 // ======================================================================== 365 + // Command Module Accessors 366 + // ======================================================================== 367 + 368 + const strings_mod = @import("commands/strings.zig"); 369 + const keys_mod = @import("commands/keys.zig"); 370 + const hashes_mod = @import("commands/hashes.zig"); 371 + const lists_mod = @import("commands/lists.zig"); 372 + const sets_mod = @import("commands/sets.zig"); 373 + const sorted_sets_mod = @import("commands/sorted_sets.zig"); 374 + const streams_mod = @import("commands/streams.zig"); 375 + 376 + /// Get string commands interface 377 + pub fn strings(self: *Self) strings_mod.StringCommands { 378 + return strings_mod.StringCommands.init(self); 379 + } 380 + 381 + /// Get key commands interface 382 + pub fn keys(self: *Self) keys_mod.KeyCommands { 383 + return keys_mod.KeyCommands.init(self); 384 + } 385 + 386 + /// Get hash commands interface 387 + pub fn hashes(self: *Self) hashes_mod.HashCommands { 388 + return hashes_mod.HashCommands.init(self); 389 + } 390 + 391 + /// Get list commands interface 392 + pub fn lists(self: *Self) lists_mod.ListCommands { 393 + return lists_mod.ListCommands.init(self); 394 + } 395 + 396 + /// Get set commands interface 397 + pub fn sets(self: *Self) sets_mod.SetCommands { 398 + return sets_mod.SetCommands.init(self); 399 + } 400 + 401 + /// Get sorted set commands interface 402 + pub fn sortedSets(self: *Self) sorted_sets_mod.SortedSetCommands { 403 + return sorted_sets_mod.SortedSetCommands.init(self); 404 + } 405 + 406 + /// Get stream commands interface 407 + pub fn streams(self: *Self) streams_mod.StreamCommands { 408 + return streams_mod.StreamCommands.init(self); 409 + } 410 + 411 + // ======================================================================== 365 412 // Value Management 366 413 // ======================================================================== 367 414
+1 -1
src/resp.zig
··· 76 76 77 77 /// Combined error set for all client operations. 78 78 /// Use this for functions that might fail at any level. 79 - pub const ClientError = ConnectionError || ProtocolError || CommandError || std.mem.Allocator.Error || std.posix.ReadError || std.posix.WriteError; 79 + pub const ClientError = ConnectionError || ProtocolError || CommandError || std.mem.Allocator.Error || std.posix.ReadError || std.net.Stream.WriteError; 80 80 81 81 // ============================================================================ 82 82 // RESP Value Type