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
Compare and Show latest version
3 files
+ 201
31
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 72
24
@@ -265,9 +265,17 @@ typedef struct {
void *wrapped_transaction;
} caosdb_transaction_transaction;
/**
* Create a transaction on an existing connection.
*
* This transaction has to be deleted manually by
* caosdb_transaction_delete_transaction() later on.
*/
int caosdb_connection_connection_create_transaction(
caosdb_connection_connection *connection,
caosdb_transaction_transaction *out);
int caosdb_transaction_delete_transaction(
caosdb_transaction_transaction *transaction);
int caosdb_transaction_transaction_retrieve_by_id(
caosdb_transaction_transaction *transaction, const char *id);
int caosdb_transaction_transaction_retrieve_by_ids(
@@ -292,42 +300,34 @@ int caosdb_transaction_transaction_get_count_result(
typedef struct {
void *wrapped_entity;
char **id;
char **role;
char **name;
char **description;
char **datatype;
char **unit;
char **value;
char **version_id;
} caosdb_entity_entity;
int caosdb_transaction_result_set_get_entity(
caosdb_transaction_result_set *result_set, caosdb_entity_entity *entity,
int index);
int caosdb_transaction_result_set_at(caosdb_transaction_result_set *result_set,
caosdb_entity_entity *entity, int index);
int caosdb_transaction_result_set_size(
caosdb_transaction_result_set *result_set, int *out);
typedef struct {
void *wrapped_property;
char **id;
char **name;
char **description;
char **datatype;
char **unit;
char **value;
} caosdb_entity_property;
typedef struct {
void *wrapped_parent;
char **id;
char **name;
char **description;
} caosdb_entity_parent;
typedef struct {
void *wrapped_message;
int *code;
char **description;
} caosdb_entity_message;
// GETTERS FOR COMPLEX OBJECTS
// GETTERS FOR EVERYTHING
int caosdb_entity_entity_get_id(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_role(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_name(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_description(caosdb_entity_entity *entity,
char *out);
int caosdb_entity_entity_get_datatype(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_unit(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_value(caosdb_entity_entity *entity, char *out);
int caosdb_entity_entity_get_version_id(caosdb_entity_entity *entity,
char *out);
int caosdb_entity_entity_get_errors_size(caosdb_entity_entity *entity,
int *out);
int caosdb_entity_entity_get_error(caosdb_entity_entity *entity,
@@ -348,6 +348,29 @@ int caosdb_entity_entity_get_parents_size(caosdb_entity_entity *entity,
int caosdb_entity_entity_get_parent(caosdb_entity_entity *entity,
caosdb_entity_parent *out, int index);
int caosdb_entity_property_get_id(caosdb_entity_property *property, char *out);
int caosdb_entity_property_get_name(caosdb_entity_property *property,
char *out);
int caosdb_entity_property_get_description(caosdb_entity_property *property,
char *out);
int caosdb_entity_property_get_importance(caosdb_entity_property *property,
char *out);
int caosdb_entity_property_get_datatype(caosdb_entity_property *property,
char *out);
int caosdb_entity_property_get_unit(caosdb_entity_property *property,
char *out);
int caosdb_entity_property_get_value(caosdb_entity_property *property,
char *out);
int caosdb_entity_parent_get_id(caosdb_entity_parent *parent, char *out);
int caosdb_entity_parent_get_name(caosdb_entity_parent *parent, char *out);
int caosdb_entity_parent_get_description(caosdb_entity_parent *parent,
char *out);
int caosdb_entity_message_get_code(caosdb_entity_message *message, int *out);
int caosdb_entity_message_get_description(caosdb_entity_message *message,
char *out);
// CONSTRUCTORS AND DESTRUCTORS
int caosdb_entity_create_entity(caosdb_entity_entity *out);
int caosdb_entity_delete_entity(caosdb_entity_entity *out);
@@ -356,12 +379,37 @@ int caosdb_entity_delete_property(caosdb_entity_property *out);
int caosdb_entity_create_parent(caosdb_entity_parent *out);
int caosdb_entity_delete_parent(caosdb_entity_parent *out);
// SETTERS FOR COMPLEX OBJECTS
// SETTERS FOR EVERYTHING THAT MAY BE SET
int caosdb_entity_entity_set_role(caosdb_entity_entity *entity,
const char *role);
int caosdb_entity_entity_set_name(caosdb_entity_entity *entity,
const char *name);
int caosdb_entity_entity_set_description(caosdb_entity_entity *entity,
const char *description);
int caosdb_entity_entity_set_datatype(caosdb_entity_entity *entity,
const char *datatype);
int caosdb_entity_entity_set_unit(caosdb_entity_entity *entity,
const char *unit);
int caosdb_entity_entity_set_value(caosdb_entity_entity *entity,
const char *value);
int caosdb_entity_entity_append_parent(caosdb_entity_entity *entity,
caosdb_entity_parent *parent);
int caosdb_entity_entity_append_property(caosdb_entity_entity *entity,
caosdb_entity_property *property);
int caosdb_entity_property_set_id(caosdb_entity_property *property,
const char *id);
int caosdb_entity_property_set_name(caosdb_entity_property *property,
const char *name);
int caosdb_entity_property_set_datatype(caosdb_entity_property *property,
const char *datatype);
int caosdb_entity_property_set_importance(caosdb_entity_property *property,
const char *importance);
int caosdb_entity_property_set_unit(caosdb_entity_property *property,
const char *unit);
int caosdb_entity_property_set_value(caosdb_entity_property *property,
const char *value);
#ifdef __cplusplus
}
#endif
Loading