| 1468 | } |
| 1469 | |
| 1470 | void UpdateImage(const Image& image) override { |
| 1471 | if (image.HasFrameId()) { |
| 1472 | const Frame frame = ReadFrame(image.FrameId()); |
| 1473 | THROW_CHECK(frame.HasDataId(image.DataId())); |
| 1474 | } |
| 1475 | |
| 1476 | Sqlite3StmtContext context(sql_stmt_update_image_); |
| 1477 | |
| 1478 | SQLITE3_CALL(sqlite3_bind_text(sql_stmt_update_image_, |
| 1479 | 1, |
| 1480 | image.Name().c_str(), |
| 1481 | static_cast<int>(image.Name().size()), |
| 1482 | SQLITE_STATIC)); |
| 1483 | SQLITE3_CALL( |
| 1484 | sqlite3_bind_int64(sql_stmt_update_image_, 2, image.CameraId())); |
| 1485 | SQLITE3_CALL( |
| 1486 | sqlite3_bind_int64(sql_stmt_update_image_, 3, image.ImageId())); |
| 1487 | |
| 1488 | SQLITE3_CALL(sqlite3_step(sql_stmt_update_image_)); |
| 1489 | } |
| 1490 | |
| 1491 | void UpdatePosePrior(const PosePrior& pose_prior) override { |
| 1492 | Sqlite3StmtContext context(sql_stmt_update_pose_prior_); |