diff --git a/src/Transaction.jl b/src/Transaction.jl index 4d883194e813b29df6e677a3f29157c8df2fe620..4efb77c81325837403497661d7127d474d416efc 100644 --- a/src/Transaction.jl +++ b/src/Transaction.jl @@ -159,6 +159,27 @@ function add_insert_entity(transaction::Ref{_Transaction}, entity::Ref{CaosDB.En CaosDB.Exceptions.evaluate_return_code(err_code) end +""" + function add_update_entity(transaction::Ref{_Transaction}, entity::Ref{_CaosDB.Entity.Entity}) + +Add a sub-request to update a single entity to the given `transaction`. + +!!! info + + This does not execute the transaction. +""" +function add_update_entity(transaction::Ref{_Transaction}, entity::Ref{CaosDB.Entity._Entity}) + + err_code = ccall( + (:caosdb_transaction_transaction_update_entity, CaosDB.library_name), + Cint, + (Ref{_Transaction}, Ref{CaosDB.Entity._Entity}), + transaction, + entity, + ) + + CaosDB.Exceptions.evaluate_return_code(err_code) +end """ function add_retrieve_by_id(