Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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-server
Commits
5964a1bc
Commit
5964a1bc
authored
6 years ago
by
Alexander Schlemmer
Browse files
Options
Downloads
Patches
Plain Diff
added the FAQ and a new folder for documentation
parent
1f8f84fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/faq.md
+46
-0
46 additions, 0 deletions
doc/faq.md
with
46 additions
and
0 deletions
doc/faq.md
0 → 100644
+
46
−
0
View file @
5964a1bc
**Table of content**
[[
_TOC_
]]
# How do I declare a LIST property?
Use the datatype parameter (available with Property constructors and with the
```add_property```
method and the
```LIST```
function.
```
python
#with constructor
p
=
caosdb
.
Property
(
name
=
"
ListOfDoubles
"
,
datatype
=
caosdb
.
LIST
(
caosdb
.
DOUBLE
))
# with add_property method
my_entity
.
add_property
(
name
=
"
ListOfIntegers
"
,
datatype
=
caosdb
.
LIST
(
caosdb
.
INTEGER
))
my_entity
.
add_property
(
name
=
"
ListOfThings
"
,
datatype
=
caosdb
.
LIST
(
"
Thing
"
))
my_entity
.
add_property
(
name
=
"
ListOfThings
"
,
datatype
=
caosdb
.
LIST
(
caosdb
.
RecordType
(
'
Thing
'
))
```
# Which data types are there?
There are 7 basic data types:
*
`INTEGER`
*
`DOUBLE`
*
`DATETIME`
*
`TEXT`
*
`BOOLEAN`
*
`FILE`
*
`REFERENCE`
There is (so far) 1 data type for collections:
*
`LIST`
(Well, LIST-of-another-data-type, e.g.
`LIST(INTEGER)`
)
And furthermore,...
*
Any RecordType can be used as a
`REFERENCE`
data type with a limited scope. That is, a property
```python
p = caosdb.Property(name="Conductor", datatype="Person")
```
will only accept those Entities as value which have a "Person" RecordType as a direct or indirect parent.
See also:
[
Datatype
](
Datatype
)
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