Skip to content
Snippets Groups Projects
Commit ffa9e700 authored by florian's avatar florian
Browse files

WIP: Implement result sets and count results

parent bd751023
No related branches found
No related tags found
3 merge requests!12F consolidation,!9Draft: API: remove UniqueResult, lower-case at, size for ResultSet,!8ENH: Add retrieval and queries to Extern C interface
Pipeline #11623 failed
......@@ -266,6 +266,9 @@ int caosdb_transaction_transaction_get_result_set(
caosdb_transaction_transaction *transaction,
caosdb_transaction_result_set *out);
int caosdb_transaction_transaction_get_count_result(
caosdb_transaction_transaction *transaction, long *out);
typedef struct {
void *wrapped_entity;
char **id;
......
......@@ -306,4 +306,29 @@ ERROR_RETURN_CODE(GENERIC_ERROR,
wrapped_transaction->Execute();
return 0;
})
ERROR_RETURN_CODE(GENERIC_ERROR,
int caosdb_transaction_transaction_get_result_set(
caosdb_transaction_transaction *transaction,
caosdb_transaction_result_set *out),
{
auto *wrapped_transaction =
static_cast<caosdb::transaction::Transaction *>(
transaction->wrapped_transaction);
out->wrapped_result_set =
(void *)(&(wrapped_transaction->GetResultSet()));
return 0;
})
ERROR_RETURN_CODE(GENERIC_ERROR,
int caosdb_transaction_transaction_get_count_result(
caosdb_transaction_transaction *transaction, long *out),
{
auto *wrapped_transaction =
static_cast<caosdb::transaction::Transaction *>(
transaction->wrapped_transaction);
long cr(wrapped_transaction->GetCountResult());
*out = cr;
return 0;
})
}
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