ENH: Add retrieval and queries to Extern C interface
Summary
See https://gitlab.indiscale.com/caosdb/customers/lfpb/management/-/issues/411. Extends the Extern C interface by retrieving single and multiple entities and executing queries.
Focus
There is a lot of repetitive new code for create, delete, set, and get functions in ccaosdb.cpp
. Some aspects of the c++ objects of Entities, Parents, and Propeties had to be changed in order to comply with the C interface, mainly because of memory management.
The most important new parts is that entities, transactions, properties and parents can now be created and deleted via the C interface, and that their properties can be set and gotten.
Test Environment
In principle, unit tests should be sufficient. Check whether you are content with the extent of the tests. Queries and retrievals are checked in the integration tests.
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related Issues [ ] Up-to-date CHANGELOG.md-
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass [ ] Up-to-date CHANGELOG.md-
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Merge request reports
Activity
added 1 commit
- 364b9519 - ENH: Add destructor for transactions to Extern C
added 5 commits
-
92faecca...cdd7e7d4 - 3 commits from branch
dev
- 01a84668 - Merge branch 'dev' into f-extended-c
- 0b69843a - FIX: Remove duplicate GetDescription
-
92faecca...cdd7e7d4 - 3 commits from branch
mentioned in merge request caosdb-cppinttest!7 (merged)
added 4 commits
-
7f07dded...0f96286c - 3 commits from branch
dev
- 0ea49404 - Merge branch 'dev' into f-extended-c
-
7f07dded...0f96286c - 3 commits from branch
added 1 commit
- b94d3f89 - DOC: Add TODO and rename section in README_SETUP
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
113 */ 114 inline auto Append(const T &element) -> void { 115 auto *destination = this->wrapped->Add(); 116 destination->Swap(element.wrapped); 117 118 // Clear the originally wrapped object and return it to the Arena 119 element.wrapped->Clear(); 120 121 // set the pointer to the new object which is owned by the RepeatedPtrField 122 element.wrapped = destination; 123 } 124 125 /** 126 * Remove the element at the given index. 127 */ 128 inline auto remove(int index) -> void { - Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Florian Spreckelsen
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
- Resolved by Henrik tom Wörden
added 1 commit
- ec2eb3eb - ENH: Add removal of parents and properties to Extern C
- Resolved by Henrik tom Wörden
requested review from @henrik
added 5 commits
Toggle commit list