From b286c129d6a4183b52a7779ac4ccef8e0d674c43 Mon Sep 17 00:00:00 2001 From: Alexander Kreft <akreft@trineo.org> Date: Mon, 6 Sep 2021 06:11:09 +0000 Subject: [PATCH] MAINT: Docstrings --- src/Entity.jl | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/Entity.jl b/src/Entity.jl index 742ea79..2e71971 100644 --- a/src/Entity.jl +++ b/src/Entity.jl @@ -767,7 +767,7 @@ function get_property_list_length(property::Ref{_Property}) return length[] end """ - function get_value(entity::Ref{_Property}) + function get_value(property::Ref{_Property}) Return the value of the given `property` """ @@ -857,8 +857,13 @@ function get_value(property::Ref{_Property}) return out end +""" + function get_int_list_value_at(property::Ref{_Property}, index::Cint) + +Return the value of the INTEGER list of the given `property` at the position `index`. +""" function get_int_list_value_at(property::Ref{_Property}, index::Cint) - out = Ref{Cint}(0) + err_code = ccall( (:caosdb_entity_property_get_int_list_value_at, CaosDB.library_name), Cint, @@ -867,11 +872,16 @@ function get_int_list_value_at(property::Ref{_Property}, index::Cint) out, index-Cint(1), ) - + CaosDB.Exceptions.evaluate_return_code(err_code) return out[] end +""" + function get_double_list_value_at(property::Ref{_Property}, index::Cint) + +Return the value of the DOUBLE list of the given `property` at the position `index`. +""" function get_double_list_value_at(property::Ref{_Property}, index::Cint) out = Ref{Cdouble}(0) err_code = ccall( @@ -887,6 +897,11 @@ function get_double_list_value_at(property::Ref{_Property}, index::Cint) return out[] end +""" + function get_bool_list_value_at(property::Ref{_Property}, index::Cint) + +Return the value of the BOOLEAN list of the given `property` at the position `index`. +""" function get_bool_list_value_at(property::Ref{_Property}, index::Cint) out = Ref{Cint}(0) err_code = ccall( @@ -903,6 +918,11 @@ function get_bool_list_value_at(property::Ref{_Property}, index::Cint) return out end +""" + function get_string_list_value_at(property::Ref{_Property}, index::Cint) + +Return the value of the TEXT list of the given `property` at the position `index`. +""" function get_string_list_value_at(property::Ref{_Property}, index::Cint) out = Ref{Ptr{UInt8}}(Ptr{UInt8}()) err_code = ccall( @@ -918,6 +938,7 @@ function get_string_list_value_at(property::Ref{_Property}, index::Cint) out = unsafe_string(out[]) return out end + """ function get_version_id(entity::Ref{_Entity}) -- GitLab