Skip to content
Snippets Groups Projects
Commit 897da977 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

MAINT: rename Transaction::RetrieveAndDownloadFilesById

parent 0115f88b
No related branches found
No related tags found
1 merge request!15ENH: Allow insert/update/delete and files in Extern C
This commit is part of merge request !15. Comments created here will be created in the context of that merge request.
...@@ -224,11 +224,11 @@ Up- and Download a file ...@@ -224,11 +224,11 @@ Up- and Download a file
const auto &insert_results = insert_transaction->GetResultSet(); const auto &insert_results = insert_transaction->GetResultSet();
const auto &inserted_file = insert_results.at(0); const auto &inserted_file = insert_results.at(0);
// for the download you need to use the RetrieveAndDownloadFilesById task and // for the download you need to use the RetrieveAndDownloadFileById task and
// supply the path where the file shall be stored // supply the path where the file shall be stored
test_download_file = fs::path("test_download_file_delete_me.dat"); test_download_file = fs::path("test_download_file_delete_me.dat");
auto download_transaction(connection->CreateTransaction()); auto download_transaction(connection->CreateTransaction());
download_transaction->RetrieveAndDownloadFilesById( download_transaction->RetrieveAndDownloadFileById(
inserted_file.GetId(), test_download_file.string()); inserted_file.GetId(), test_download_file.string());
download_transaction->ExecuteAsynchronously(); download_transaction->ExecuteAsynchronously();
download_transaction->WaitForIt().GetCode() download_transaction->WaitForIt().GetCode()
......
...@@ -279,7 +279,7 @@ public: ...@@ -279,7 +279,7 @@ public:
* If the file cannot be downloaded due to unsufficient permissions an error * If the file cannot be downloaded due to unsufficient permissions an error
* is appended. * is appended.
*/ */
auto RetrieveAndDownloadFilesById(const std::string &id, const std::string &local_path) noexcept auto RetrieveAndDownloadFileById(const std::string &id, const std::string &local_path) noexcept
-> StatusCode; -> StatusCode;
/** /**
......
...@@ -172,8 +172,8 @@ auto Transaction::RetrieveById(const std::string &id) noexcept -> StatusCode { ...@@ -172,8 +172,8 @@ auto Transaction::RetrieveById(const std::string &id) noexcept -> StatusCode {
return this->status.GetCode(); return this->status.GetCode();
} }
auto Transaction::RetrieveAndDownloadFilesById(const std::string &id, auto Transaction::RetrieveAndDownloadFileById(const std::string &id,
const std::string &local_path) noexcept const std::string &local_path) noexcept
-> StatusCode { -> StatusCode {
ASSERT_CAN_ADD_RETRIEVAL ASSERT_CAN_ADD_RETRIEVAL
......
...@@ -199,7 +199,7 @@ TEST(test_transaction, test_retrieve_and_download) { ...@@ -199,7 +199,7 @@ TEST(test_transaction, test_retrieve_and_download) {
auto transaction = connection.CreateTransaction(); auto transaction = connection.CreateTransaction();
EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::INITIAL); EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::INITIAL);
transaction->RetrieveAndDownloadFilesById("asdf", "local_path"); transaction->RetrieveAndDownloadFileById("asdf", "local_path");
EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::GO_ON); EXPECT_EQ(transaction->GetStatus().GetCode(), StatusCode::GO_ON);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment