Skip to content
Snippets Groups Projects
Verified Commit 653ec88f authored by Timm Fitschen's avatar Timm Fitschen
Browse files

revert more wrong styling

parent c4ae2fa3
Branches
Tags
1 merge request!27F move entity
Pipeline #14862 failed
......@@ -379,8 +379,8 @@ public:
*
* A client may request the current status at any time via GetStatus().
*
* Use WaitForIt() to join the back-ground execution of this transaction,
* otherwise the behaviour of getting the ResultSet is undefined.
* Use WaitForIt() to join the back-ground execution of this transaction, otherwise the behaviour
* of getting the ResultSet is undefined.
*/
auto ExecuteAsynchronously() noexcept -> StatusCode;
......@@ -388,8 +388,8 @@ public:
* Join the background execution and return the status when the execution
* terminates.
*
* Use this after ExecuteAsynchronously(), otherwise the TransactionStatus
* still remains EXECUTING.
* Use this after ExecuteAsynchronously(), otherwise the TransactionStatus still remains
* EXECUTING.
*/
[[nodiscard]] auto WaitForIt() const noexcept -> TransactionStatus;
......@@ -409,8 +409,7 @@ public:
[[nodiscard]] inline auto GetResultSet() const noexcept -> const ResultSet & {
if (!this->result_set) {
CAOSDB_LOG_ERROR(logger_name)
<< "GetResultSet was called before the transaction has terminated. "
"This is a programming "
<< "GetResultSet was called before the transaction has terminated. This is a programming "
"error of the code which uses the transaction.";
// TODO(tf) This is a really bad SegFault factory. When the transaction
// terminates and the result_set is being overriden, the unique_ptr
......@@ -427,8 +426,7 @@ public:
* This method releases the ResultSet from the transaction leaving it in a
* currupted state.
*
* This method can be called only once and only after the transaction has
* terminated.
* This method can be called only once and only after the transaction has terminated.
*
* Otherwise, this method has undefined behavior.
*/
......
......@@ -49,8 +49,7 @@ using boost::json::stream_parser;
using boost::json::value;
/**
* @brief Get the name of the enum value. May be useful for higher-order CaosDB
* clients.
* @brief Get the name of the enum value. May be useful for higher-order CaosDB clients.
*/
template <typename Enum> auto getEnumNameFromValue(Enum v) -> std::string {
if (std::is_same_v<std::underlying_type_t<Enum>, int>) {
......@@ -70,8 +69,7 @@ template <> auto getEnumNameFromValue<caosdb::entity::Role>(caosdb::entity::Role
/**
* @brief Get the enum value from a string.
*
* @detail May be useful for higher-order CaosDB clients and only makes sense if
* specialized.
* @detail May be useful for higher-order CaosDB clients and only makes sense if specialized.
*/
template <typename Enum> auto getEnumValueFromName(const std::string &name) -> Enum;
......
......@@ -307,8 +307,7 @@ int caosdb_transaction_transaction_get_result_set(caosdb_transaction_transaction
*
* The transactions is spoiled after this action and should not be used anymore.
*
* Note: The result_set has to be deleted via
* caosdb_transaction_delete_result_set.
* Note: The result_set has to be deleted via caosdb_transaction_delete_result_set.
*
* EXPERT USE ONLY. Only use it when you know what you are doing.
*/
......
......@@ -57,8 +57,7 @@ template <> auto getEnumValueFromName<Importance>(const std::string &name) -> Im
// TODO (dh): Whereas this does not?
// auto result = std::find(caosdb::entity::importance_names.cbegin(),
// caosdb::entity::importance_names.cend(),
// [name](const auto& entry){ return entry.second ==
// name; });
// [name](const auto& entry){ return entry.second == name; });
// Workaround: plaint old iteration:
for (auto const &entry : caosdb::entity::importance_names) {
if (entry.second == name) {
......
......@@ -574,8 +574,7 @@ ERROR_RETURN_CODE(
auto *wrapped_transaction =
static_cast<caosdb::transaction::Transaction *>(transaction->wrapped_transaction);
out->wrapped_result_set = (void *)(wrapped_transaction->ReleaseResultSet());
// out is the owner now, that are the semantics of
// ReleaseResultSet
// out is the owner now, that are the semantics of ReleaseResultSet
out->_deletable = true;
return 0;
})
......@@ -622,8 +621,7 @@ ERROR_RETURN_CODE(
auto *wrapped_result_set =
static_cast<caosdb::transaction::MultiResultSet *>(result_set->wrapped_result_set);
entity->wrapped_entity = wrapped_result_set->release_at(index);
// entity is the owner now. That are the semantics of
// release_at.
// entity is the owner now. That are the semantics of release_at.
entity->_deletable = true;
return 0;
})
......
......@@ -4,30 +4,25 @@
int main(void) {
int status = 0; // last function return value
printf(
"CaosDB C client (libcaosdb %d.%d.%d)\nWe don't miss the H of caos.\n\n",
LIBCAOSDB_VERSION_MAJOR, LIBCAOSDB_VERSION_MINOR, LIBCAOSDB_VERSION_PATCH);
printf("CaosDB C client (libcaosdb %d.%d.%d)\nWe don't miss the H of caos.\n\n",
LIBCAOSDB_VERSION_MAJOR, LIBCAOSDB_VERSION_MINOR, LIBCAOSDB_VERSION_PATCH);
caosdb_connection_connection connection;
status =
caosdb_connection_connection_manager_get_default_connection(&connection);
status = caosdb_connection_connection_manager_get_default_connection(&connection);
if (status != 0) {
printf("An error occured: ERROR %d - %s\n", status,
caosdb_get_status_description(status));
printf("An error occured: ERROR %d - %s\n", status, caosdb_get_status_description(status));
return status;
}
caosdb_info_version_info version_info;
status = caosdb_connection_get_version_info(&version_info, &connection);
if (status != 0) {
printf("An error occured: ERROR %d - %s\n", status,
caosdb_get_status_description(status));
printf("An error occured: ERROR %d - %s\n", status, caosdb_get_status_description(status));
return status;
}
printf("Server version: %d.%d.%d-%s-%s\n", version_info.major,
version_info.minor, version_info.patch, version_info.pre_release,
version_info.build);
printf("Server version: %d.%d.%d-%s-%s\n", version_info.major, version_info.minor,
version_info.patch, version_info.pre_release, version_info.build);
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment