Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-julialib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-julialib
Commits
fff83ed9
Commit
fff83ed9
authored
3 years ago
by
florian
Browse files
Options
Downloads
Patches
Plain Diff
FIX: Use new string assignement from Extern C
parent
43bdc947
Branches
Branches containing commit
No related tags found
1 merge request
!7
ENH: Implement queries and entity retrieval
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Entity.jl
+57
-57
57 additions, 57 deletions
src/Entity.jl
with
57 additions
and
57 deletions
src/Entity.jl
+
57
−
57
View file @
fff83ed9
...
...
@@ -357,19 +357,19 @@ Return the id of the given `entity`
"""
function
get_id
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_id
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -379,19 +379,19 @@ Return the id of the given `parent`
"""
function
get_id
(
parent
::
Ref
{
_Parent
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_parent_get_id
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Parent
},
Ptr
{
UInt8
}),
(
Ref
{
_Parent
},
Ref
{
Ptr
{
UInt8
}
}
),
parent
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -401,19 +401,19 @@ Return the id of the given `property`
"""
function
get_id
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_id
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -423,19 +423,19 @@ Return the role of the given `entity`.
"""
function
get_role
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_role
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -445,19 +445,19 @@ Return the name of the given `entity`
"""
function
get_name
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_name
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -467,19 +467,19 @@ Return the name of the given `parent`
"""
function
get_name
(
parent
::
Ref
{
_Parent
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_parent_get_name
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Parent
},
Ptr
{
UInt8
}),
(
Ref
{
_Parent
},
Ref
{
Ptr
{
UInt8
}
}
),
parent
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -489,19 +489,19 @@ Return the name of the given `property`
"""
function
get_name
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_name
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -511,19 +511,19 @@ Return the description of the given `entity`
"""
function
get_description
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_description
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -533,19 +533,19 @@ Return the description of the given `parent`
"""
function
get_description
(
parent
::
Ref
{
_Parent
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_parent_get_description
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Parent
},
Ptr
{
UInt8
}),
(
Ref
{
_Parent
},
Ref
{
Ptr
{
UInt8
}
}
),
parent
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -555,19 +555,19 @@ Return the description of the given `property`
"""
function
get_description
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_description
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -577,19 +577,19 @@ Return the description of the given `message`
"""
function
get_description
(
message
::
Ref
{
_Message
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_message_get_description
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Message
},
Ptr
{
UInt8
}),
(
Ref
{
_Message
},
Ref
{
Ptr
{
UInt8
}
}
),
message
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -599,19 +599,19 @@ Return the datatype of the given `entity`
"""
function
get_datatype
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_datatype
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -621,19 +621,19 @@ Return the datatype of the given `property`
"""
function
get_datatype
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_datatype
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -643,19 +643,19 @@ Return the unit of the given `entity`
"""
function
get_unit
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_unit
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -665,19 +665,19 @@ Return the unit of the given `property`
"""
function
get_unit
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_unit
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -687,19 +687,19 @@ Return the value of the given `entity`
"""
function
get_value
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_value
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -709,19 +709,19 @@ Return the value of the given `property`
"""
function
get_value
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_value
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Property
},
Ptr
{
UInt8
}),
(
Ref
{
_Property
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -731,19 +731,19 @@ Return the version_id of the given `entity`
"""
function
get_version_id
(
entity
::
Ref
{
_Entity
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_entity_get_version_id
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
entity
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
@@ -776,19 +776,19 @@ Return the importance of the given `property`
"""
function
get_importance
(
property
::
Ref
{
_Property
})
out
=
Vecto
r
{
UInt8
}
(
undef
,
256
)
out
=
Ref
{
Pt
r
{
UInt8
}
}(
Ptr
{
UInt8
}()
)
err_code
=
ccall
(
(
:
caosdb_entity_property_get_importance
,
CaosDB
.
library_name
),
Cint
,
(
Ref
{
_Entity
},
Ptr
{
UInt8
}),
(
Ref
{
_Entity
},
Ref
{
Ptr
{
UInt8
}
}
),
property
,
out
,
)
CaosDB
.
Exceptions
.
evaluate_return_code
(
err_code
)
return
GC
.
@preserve
out
unsafe_string
(
pointer
(
out
)
)
return
unsafe_string
(
out
[]
)
end
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment