| 531 | } |
| 532 | |
| 533 | bool redis_command::check_status(const char* success /* = "OK" */) |
| 534 | { |
| 535 | const redis_result* result = run(); |
| 536 | if (result == NULL || result->get_type() != REDIS_RESULT_STATUS) { |
| 537 | logger_result(result); |
| 538 | return false; |
| 539 | } |
| 540 | |
| 541 | const char* status = result->get_status(); |
| 542 | if (status == NULL || *status == '\0') { |
| 543 | return false; |
| 544 | } else if (success == NULL || strcasecmp(status, success) == 0) { |
| 545 | return true; |
| 546 | } else { |
| 547 | return false; |
| 548 | } |
| 549 | } |
| 550 | |
| 551 | int redis_command::get_status(std::vector<bool>& out) |
| 552 | { |
nothing calls this directly
no test coverage detected