| 881 | } |
| 882 | |
| 883 | std::vector<std::pair<image_pair_t, FeatureMatchesBlob>> ReadAllMatchesBlob() |
| 884 | const override { |
| 885 | Sqlite3StmtContext context(sql_stmt_read_matches_all_); |
| 886 | |
| 887 | std::vector<std::pair<image_pair_t, FeatureMatchesBlob>> all_matches; |
| 888 | |
| 889 | int rc; |
| 890 | while ((rc = SQLITE3_CALL(sqlite3_step(sql_stmt_read_matches_all_))) == |
| 891 | SQLITE_ROW) { |
| 892 | const image_pair_t pair_id = static_cast<image_pair_t>( |
| 893 | sqlite3_column_int64(sql_stmt_read_matches_all_, 0)); |
| 894 | all_matches.emplace_back(pair_id, |
| 895 | ReadDynamicMatrixBlob<FeatureMatchesBlob>( |
| 896 | sql_stmt_read_matches_all_, rc, 1)); |
| 897 | } |
| 898 | |
| 899 | return all_matches; |
| 900 | } |
| 901 | |
| 902 | std::vector<std::pair<image_pair_t, FeatureMatches>> ReadAllMatches() |
| 903 | const override { |