True when `id` names a node of the walk's project. */
| 695 | |
| 696 | /* True when `id` names a node of the walk's project. */ |
| 697 | static bool impact_node_exists(cbm_impact_walk_t *w, int64_t id) { |
| 698 | if (!impact_check(w) || !impact_known_id(w, id) || sqlite3_reset(w->stmt_node) != SQLITE_OK || |
| 699 | sqlite3_bind_int64(w->stmt_node, IMPACT_BIND_ID, id) != SQLITE_OK) { |
| 700 | return false; |
| 701 | } |
| 702 | int rc = sqlite3_step(w->stmt_node); |
| 703 | int reset = sqlite3_reset(w->stmt_node); |
| 704 | return rc == SQLITE_ROW && reset == SQLITE_OK && impact_check(w); |
| 705 | } |
| 706 | |
| 707 | int cbm_impact_walk_add_sinks(cbm_impact_walk_t *w, const int64_t *ids, int count) { |
| 708 | if (!impact_check(w) || count < 0 || (count > 0 && !ids)) { |
no test coverage detected