Skip to content
Snippets Groups Projects
Commit 965205da authored by Daniel Hornung's avatar Daniel Hornung
Browse files

ENH: More information in cxxcaosdbcli

parent 8add060c
No related branches found
No related tags found
No related merge requests found
Pipeline #12495 failed
...@@ -50,12 +50,19 @@ auto main() -> int { ...@@ -50,12 +50,19 @@ auto main() -> int {
// retrieve an entity // retrieve an entity
auto transaction(connection->CreateTransaction()); auto transaction(connection->CreateTransaction());
transaction->RetrieveById("20"); transaction->RetrieveById("120");
transaction->Execute(); transaction->Execute();
const auto &result_set = transaction->GetResultSet(); const auto &result_set = transaction->GetResultSet();
// print description // print information
std::cout << "Entity Description: " << result_set.at(0).GetDescription() << std::endl; const auto &ent = result_set.at(0);
const auto &props = ent.GetProperties();
std::cout << "Entity Name: " << ent.GetName() << std::endl;
std::cout << "Entity Description: " << ent.GetDescription() << std::endl;
std::cout << "Entity Properties: " << std::endl;
for (const auto &prop : props) {
std::cout << "----------\n" << prop.ToString() << std::endl;
}
return 0; return 0;
} catch (const caosdb::exceptions::ConfigurationError &exc) { } catch (const caosdb::exceptions::ConfigurationError &exc) {
......
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