| 141 | } |
| 142 | |
| 143 | bool is_replayable(cson_value *val) { |
| 144 | int64_t nbound; |
| 145 | |
| 146 | if(have_json_key(val, "error")) |
| 147 | return false; |
| 148 | |
| 149 | // Have an array of bound parameters? Should be replayable. |
| 150 | bool have_bindings = have_json_key(val, "bound_parameters"); |
| 151 | if (have_bindings) |
| 152 | return true; |
| 153 | |
| 154 | // Don't have any bound parameters? Should be replayable. |
| 155 | have_bindings = get_intprop(val, "nbindings", &nbound); |
| 156 | if (!have_bindings || nbound == 0) |
| 157 | return true; |
| 158 | |
| 159 | return false; |
| 160 | } |
| 161 | |
| 162 | bool event_is_sql(cson_value *val) { |
| 163 | return get_strprop(val, "type") == std::string("sql"); |
no test coverage detected