@@ -25,7 +25,7 @@
|
||||
namespace {
|
||||
|
||||
constexpr auto application_id = std::int64_t{0x56414D50};
|
||||
constexpr auto catalogue_schema_version = std::int64_t{2};
|
||||
constexpr auto catalogue_schema_version = std::int64_t{3};
|
||||
|
||||
auto connection_config(vamp_zero::database_config const &config) -> noto::connection_config {
|
||||
auto result = noto::file_connection_config(config.path, "product-vamp");
|
||||
@@ -183,7 +183,7 @@ auto vamp_zero::async_load_practice_library(boost::asio::any_io_executor executo
|
||||
if (!connected) {
|
||||
co_return std::unexpected(connected.error());
|
||||
}
|
||||
auto selected = co_await connection.async_prepare("SELECT id, title, composer, key_signature, source_path, measure_count, total_pages, authored_key_signature, exercise_id "
|
||||
auto selected = co_await connection.async_prepare("SELECT id, title, composer, key_signature, source_path, measure_count, total_pages, part, exercise_id "
|
||||
"FROM practice_exercises ORDER BY exercise_id, id");
|
||||
if (!selected) {
|
||||
auto close = co_await connection.async_close();
|
||||
@@ -213,9 +213,12 @@ auto vamp_zero::async_load_practice_library(boost::asio::any_io_executor executo
|
||||
status = std::unexpected(source.error());
|
||||
break;
|
||||
}
|
||||
auto variant = vamp_zero::practice_exercise::score_variant{
|
||||
auto practice_part = vamp_zero::library_part{
|
||||
.id = text_value(row[0]),
|
||||
.title = text_value(row[1]),
|
||||
.composer = text_value(row[2]),
|
||||
.key_signature = text_value(row[3]),
|
||||
.part = text_value(row[7]),
|
||||
.source_path = std::move(*source),
|
||||
.measure_count = count_value(row[5]),
|
||||
.total_pages = count_value(row[6]),
|
||||
@@ -224,8 +227,7 @@ auto vamp_zero::async_load_practice_library(boost::asio::any_io_executor executo
|
||||
.id = text_value(row[8]),
|
||||
.title = text_value(row[1]),
|
||||
.composer = text_value(row[2]),
|
||||
.authored_key_signature = text_value(row[7]),
|
||||
.variants = {std::move(variant)},
|
||||
.parts = {std::move(practice_part)},
|
||||
});
|
||||
}
|
||||
auto closed = co_await close_catalogue_query(connection, *selected, std::move(status));
|
||||
|
||||
Reference in New Issue
Block a user