| 3516 | } |
| 3517 | |
| 3518 | static void node_scan_bind(cbm_store_node_scan_t *scan, sqlite3_stmt *stmt, node_scan_stmt_t which, |
| 3519 | int max) { |
| 3520 | int col = SKIP_ONE; |
| 3521 | bind_text(stmt, col++, scan->project); |
| 3522 | if (which == NODE_SCAN_LABEL) { |
| 3523 | bind_text(stmt, col++, scan->label); |
| 3524 | } |
| 3525 | if (which == NODE_SCAN_FILE_SAME || which == NODE_SCAN_FILE_AFTER) { |
| 3526 | sqlite3_bind_value(stmt, col++, scan->last_file); |
| 3527 | } |
| 3528 | if (which == NODE_SCAN_LABEL || which == NODE_SCAN_NULL_FILE) { |
| 3529 | sqlite3_bind_int64(stmt, col++, scan->keyed ? scan->last_id + SKIP_ONE : INT64_MIN); |
| 3530 | } else if (which == NODE_SCAN_FILE_SAME) { |
| 3531 | sqlite3_bind_int64(stmt, col++, scan->last_id); |
| 3532 | } |
| 3533 | sqlite3_bind_int(stmt, col, max); |
| 3534 | } |
| 3535 | |
| 3536 | /* One page of the current phase into out[0..max). A short page ends the |
| 3537 | * phase; the statement is reset before returning either way. */ |
no test coverage detected