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
2 unresolved threads
2 files
+ 36
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 26
0
@@ -375,7 +375,33 @@ ERROR_RETURN_CODE(GENERIC_ERROR,
result_set->wrapped_result_set);
auto requested_entity = wrapped_result_set->At(index);
entity->wrapped_entity = (void *)(&requested_entity);
// TODO(fspreck) explicit pointers to id, name, ...
return 0;
})
ERROR_RETURN_CODE(GENERIC_ERROR,
int caosdb_transaction_result_set_size(
caosdb_transaction_result_set *result_set, int *out),
{
auto *wrapped_result_set =
static_cast<caosdb::transaction::MultiResultSet *>(
result_set->wrapped_result_set);
int size(wrapped_result_set->Size());
*out = size;
return 0;
})
ERROR_RETURN_CODE(GENERIC_ERROR,
int caosdb_entity_create_entity(caosdb_entity_entity *out), {
auto entity = caosdb::entity::Entity();
out->wrapped_entity = (void *)(&entity);
return 0;
})
ERROR_RETURN_CODE(GENERIC_ERROR,
int caosdb_entity_delete_entity(caosdb_entity_entity *out), {
delete static_cast<caosdb::entity::Entity *>(
out->wrapped_entity);
return 0;
})
}
Loading