Skip to content
Snippets Groups Projects

ENH: Add retrieval and queries to Extern C interface

Merged Florian Spreckelsen requested to merge f-extended-c into f-files
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
+ 3
0
@@ -26,6 +26,7 @@
#include "caosdb/status_code.h"
#include "caosdb/logging.h"
#include <cassert>
#include <cstring>
#include <exception>
#include <iostream>
#include <stdio.h>
@@ -337,7 +338,9 @@ ERROR_RETURN_CODE(
transaction->wrapped_transaction);
// Fill a string vector with the contents of the array of char arrays.
std::vector<std::string> str_ids;
std::cout << "Filling vector with ids ..." << std::endl;
for (const char **i = ids; *i; ++i) {
std::cout << *i << ", empty: " << (strcmp(*i, "") == 0) << std::endl;
str_ids.push_back(std::string(*i));
}
return wrapped_transaction->RetrieveById(str_ids.begin(), str_ids.end());
Loading