Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename in RequestType enum according to Feng-Shui. #262

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions csharp/lib/AsyncClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public AsyncClient(string host, uint port, bool useTLS)
IntPtr[] args = _arrayPool.Rent(2);
args[0] = Marshal.StringToHGlobalAnsi(key);
args[1] = Marshal.StringToHGlobalAnsi(value);
string? result = await Command(args, 2, RequestType.SetString);
string? result = await Command(args, 2, RequestType.Set);
_arrayPool.Return(args);
return result;
}
Expand All @@ -47,7 +47,7 @@ public AsyncClient(string host, uint port, bool useTLS)
{
IntPtr[] args = _arrayPool.Rent(1);
args[0] = Marshal.StringToHGlobalAnsi(key);
string? result = await Command(args, 1, RequestType.GetString);
string? result = await Command(args, 1, RequestType.Get);
_arrayPool.Return(args);
return result;
}
Expand Down Expand Up @@ -129,8 +129,8 @@ private enum RequestType
{
InvalidRequest = 0,
CustomCommand = 1,
GetString = 2,
SetString = 3,
Get = 2,
Set = 3,
Ping = 4,
Info = 5,
Del = 6,
Expand All @@ -154,22 +154,22 @@ private enum RequestType
ClientUnblock = 24,
ClientUnpause = 25,
Expire = 26,
HashSet = 27,
HashGet = 28,
HashDel = 29,
HashExists = 30,
HSet = 27,
HGet = 28,
HDel = 29,
HExists = 30,
MGet = 31,
MSet = 32,
Incr = 33,
IncrBy = 34,
Decr = 35,
IncrByFloat = 36,
DecrBy = 37,
HashGetAll = 38,
HashMSet = 39,
HashMGet = 40,
HashIncrBy = 41,
HashIncrByFloat = 42,
HGetAll = 38,
HMSet = 39,
HMGet = 40,
HIncrBy = 41,
HIncrByFloat = 42,
LPush = 43,
LPop = 44,
RPush = 45,
Expand All @@ -188,19 +188,19 @@ private enum RequestType
Exists = 58,
Unlink = 59,
TTL = 60,
Zadd = 61,
Zrem = 62,
Zrange = 63,
Zcard = 64,
Zcount = 65,
ZAdd = 61,
ZRem = 62,
ZRange = 63,
ZCard = 64,
ZCount = 65,
ZIncrBy = 66,
ZScore = 67,
Type = 68,
HLen = 69,
Echo = 70,
ZPopMin = 71,
Strlen = 72,
Lindex = 73,
LIndex = 73,
ZPopMax = 74,
XRead = 75,
XAdd = 76,
Expand All @@ -209,23 +209,23 @@ private enum RequestType
XTrim = 79,
XGroupCreate = 80,
XGroupDestroy = 81,
HSetNX = 82,
HSetNx = 82,
SIsMember = 83,
Hvals = 84,
PTTL = 85,
HVals = 84,
PTtl = 85,
ZRemRangeByRank = 86,
Persist = 87,
ZRemRangeByScore = 88,
Time = 89,
Zrank = 90,
ZRank = 90,
Rename = 91,
DBSize = 92,
Brpop = 93,
Hkeys = 94,
DbSize = 92,
BRPop = 93,
HKeys = 94,
PfAdd = 96,
PfCount = 97,
PfMerge = 98,
Blpop = 100,
BLPop = 100,
RPushX = 102,
LPushX = 103,
}
Expand Down
58 changes: 28 additions & 30 deletions glide-core/src/protobuf/redis_request.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ enum RequestType {
InvalidRequest = 0;
/// An unknown command, where all arguments are defined by the user.
CustomCommand = 1;
/// Type of a get string request.
GetString = 2;
/// Type of a set string request.
SetString = 3;
Get = 2;
Set = 3;
Ping = 4;
Info = 5;
Del = 6;
Expand All @@ -68,22 +66,22 @@ enum RequestType {
ClientUnblock = 24;
ClientUnpause = 25;
Expire = 26;
HashSet = 27;
HashGet = 28;
HashDel = 29;
HashExists = 30;
HSet = 27;
HGet = 28;
HDel = 29;
HExists = 30;
MGet=31;
MSet=32;
Incr=33;
IncrBy=34;
Decr=35;
IncrByFloat=36;
DecrBy=37;
HashGetAll=38;
HashMSet=39;
HashMGet=40;
HashIncrBy = 41;
HashIncrByFloat = 42;
HGetAll=38;
HMSet=39;
HMGet=40;
HIncrBy = 41;
HIncrByFloat = 42;
LPush = 43;
LPop = 44;
RPush = 45;
Expand All @@ -102,19 +100,19 @@ enum RequestType {
Exists = 58;
Unlink = 59;
TTL = 60;
Zadd = 61;
Zrem = 62;
Zrange = 63;
Zcard = 64;
Zcount = 65;
ZAdd = 61;
ZRem = 62;
ZRange = 63;
ZCard = 64;
ZCount = 65;
ZIncrBy = 66;
ZScore = 67;
Type = 68;
HLen = 69;
Echo = 70;
ZPopMin = 71;
Strlen = 72;
Lindex = 73;
LIndex = 73;
ZPopMax = 74;
XRead = 75;
XAdd = 76;
Expand All @@ -123,24 +121,24 @@ enum RequestType {
XTrim = 79;
XGroupCreate = 80;
XGroupDestroy = 81;
HSetNX = 82;
HSetNx = 82;
SIsMember = 83;
Hvals = 84;
PTTL = 85;
HVals = 84;
PTtl = 85;
ZRemRangeByRank = 86;
Persist = 87;
ZRemRangeByScore = 88;
Time = 89;
Zrank = 90;
ZRank = 90;
Rename = 91;
DBSize = 92;
Brpop = 93;
Hkeys = 94;
Spop = 95;
DbSize = 92;
BRPop = 93;
HKeys = 94;
SPop = 95;
PfAdd = 96;
PfCount = 97;
PfMerge = 98;
Blpop = 100;
BLPop = 100;
LInsert = 101;
RPushX = 102;
LPushX = 103;
Expand All @@ -164,8 +162,8 @@ enum RequestType {
GeoHash = 122;
ObjectEncoding = 123;
SDiff = 124;
ObjectIdletime = 125;
ObjectRefcount = 126;
ObjectIdleTime = 125;
ObjectRefCount = 126;
LOLWUT = 100500;
GeoDist = 127;
GeoPos = 128;
Expand Down
Loading
Loading