-
Notifications
You must be signed in to change notification settings - Fork 153
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
怎么 select db 啊? #50
Comments
由于xredis底层采用连接池。默认每个连接都是0号db,xredis不支持在执行命令前选择db。 |
第二个问题:”这里的1和2 ,应该是不同的2个redis连接对象吧?“ |
不支持 select 命令
小强 ***@***.***> 于2019年12月4日周三 11:13写道:
… 怎么select 到某个db啊,如果是单机模式的时候。
bool bRet = redisclient.ConnectRedis("127.0.0.1", 6379, 4);
redisclient.RedisCommand(result, "select %d", 1); // 1.
RedisResult result;
redisclient.RedisCommand(result, "set %s %s", "key", "hello"); //2
这里的1和2 ,应该是不同的2个redis连接对象吧?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50?email_source=notifications&email_token=ABHXTHZOTYZVQOALMYGVTNLQW4N6FA5CNFSM4JVCGOXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H54DFBQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHXTH2JLAKHW6VAPP6CUNTQW4N6FANCNFSM4JVCGOXA>
.
|
怎么select 到某个db啊,如果是单机模式的时候。
bool bRet = redisclient.ConnectRedis("127.0.0.1", 6379, 4);
redisclient.RedisCommand(result, "select %d", 1); // 1.
RedisResult result;
redisclient.RedisCommand(result, "set %s %s", "key", "hello"); //2
这里的1和2 ,应该是不同的2个redis连接对象吧?
The text was updated successfully, but these errors were encountered: