| 100 | } |
| 101 | |
| 102 | int redis_result::get_integer(bool* success /* = NULL */) const |
| 103 | { |
| 104 | if (success) { |
| 105 | *success = false; |
| 106 | } |
| 107 | if (result_type_ != REDIS_RESULT_INTEGER) { |
| 108 | return -1; |
| 109 | } |
| 110 | const char* ptr = get(0); |
| 111 | if (ptr == NULL || *ptr == 0) { |
| 112 | return -1; |
| 113 | } |
| 114 | if (success) { |
| 115 | *success = true; |
| 116 | } |
| 117 | return atoi(ptr); |
| 118 | } |
| 119 | |
| 120 | long long int redis_result::get_integer64(bool* success /* = NULL */) const |
| 121 | { |
no test coverage detected