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

ENH: Add retrieve_and_download_file_by_id

parent 3daf9492
Branches f-full-ak-uploadFile
No related tags found
1 merge request!8F full ak
Pipeline #12619 passed with warnings
Pipeline: CaosDB Julia Integration Tests

#12620

    ......@@ -86,6 +86,7 @@ export create_transaction,
    add_insert_entity,
    add_update_entity,
    add_delete_by_id,
    add_retrieve_and_download_file_by_id,
    add_query,
    execute,
    get_result_set,
    ......
    ......@@ -29,6 +29,7 @@ export create_transaction,
    add_insert_entity,
    add_update_entity,
    add_delete_by_id,
    add_retrieve_and_download_file_by_id,
    execute,
    get_result_set,
    get_count_result,
    ......@@ -235,6 +236,29 @@ function add_retrieve_by_id(
    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_retrieve_and_download_file_by_id(transaction::Ref{_Transaction}, id::AbstractString, path::AbstractString)
    err_code = ccall(
    (:caosdb_transaction_transaction_retrieve_and_download_file_by_id, CaosDB.library_name),
    Cint,
    (Ref{_Transaction}, Cstring, Cstring),
    transaction,
    id,
    path,
    )
    CaosDB.Exceptions.evaluate_return_code(err_code)
    end
    """
    function add_query(transaction::Ref{_Transaction}, query::AbstractString)
    ......
    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