Skip to content
Snippets Groups Projects
Commit 3daf9492 authored by Alexander Kreft's avatar Alexander Kreft
Browse files

ENH: add delete_by_id

parent 707bd09e
No related branches found
No related tags found
1 merge request!8F full ak
Checking pipeline status
......@@ -85,6 +85,7 @@ export create_transaction,
add_retrieve_by_id,
add_insert_entity,
add_update_entity,
add_delete_by_id,
add_query,
execute,
get_result_set,
......
......@@ -28,6 +28,7 @@ export create_transaction,
add_query,
add_insert_entity,
add_update_entity,
add_delete_by_id,
execute,
get_result_set,
get_count_result,
......@@ -181,6 +182,27 @@ function add_update_entity(transaction::Ref{_Transaction}, entity::Ref{CaosDB.En
CaosDB.Exceptions.evaluate_return_code(err_code)
end
"""
function add_delete_by_id(transaction::Ref{_Transaction}, id::AbstractString)
Add a sub-request to delete a single entity to the given `transaction`.
!!! info
This does not execute the transaction.
"""
function add_delete_by_id(transaction::Ref{_Transaction}, id::AbstractString)
err_code = ccall(
(:caosdb_transaction_transaction_delete_by_id, CaosDB.library_name),
Cint,
(Ref{_Transaction}, Cstring),
transaction,
id,
)
CaosDB.Exceptions.evaluate_return_code(err_code)
end
"""
function add_retrieve_by_id(
......
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