diff --git a/src/Entity.jl b/src/Entity.jl index 48de9cedb95985364b771016779cea20522b0464..742ea79d5a1887ed65f14c37ca471548e5e16eaa 100644 --- a/src/Entity.jl +++ b/src/Entity.jl @@ -835,6 +835,18 @@ function get_value(property::Ref{_Property}) temp = get_double_list_value_at(property, i) append!(out, temp) end + elseif prop_datatype[1] == "BOOLEAN" + out = Vector{Bool}() + for i::Cint in 1:list_length + temp = get_bool_list_value_at(property, i) + append!(out, temp) + end + elseif prop_datatype[1] == "TEXT" + out = Vector{String}() + for i::Cint in 1:list_length + temp = get_string_list_value_at(property, i) + append!(out, [temp]) + end end end if @isdefined err_code @@ -874,6 +886,38 @@ function get_double_list_value_at(property::Ref{_Property}, index::Cint) CaosDB.Exceptions.evaluate_return_code(err_code) return out[] end + +function get_bool_list_value_at(property::Ref{_Property}, index::Cint) + out = Ref{Cint}(0) + err_code = ccall( + (:caosdb_entity_property_get_boolean_list_value_at, CaosDB.library_name), + Cint, + (Ref{_Property}, Ref{Cint}, Cint), + property, + out, + index-Cint(1), + ) + + CaosDB.Exceptions.evaluate_return_code(err_code) + out = convert(Bool, out[]) + return out +end + +function get_string_list_value_at(property::Ref{_Property}, index::Cint) + out = Ref{Ptr{UInt8}}(Ptr{UInt8}()) + err_code = ccall( + (:caosdb_entity_property_get_string_list_value_at, CaosDB.library_name), + Cint, + (Ref{_Property}, Ref{Ptr{UInt8}}, Cint), + property, + out, + index-Cint(1), + ) + + CaosDB.Exceptions.evaluate_return_code(err_code) + out = unsafe_string(out[]) + return out +end """ function get_version_id(entity::Ref{_Entity})