@@ -50,7 +50,7 @@ This example defines 3 ``RecordType``s:
...
@@ -50,7 +50,7 @@ This example defines 3 ``RecordType``s:
- A Person with a ``firstName`` and a ``lastName`` (as recommended properties)
- A Person with a ``firstName`` and a ``lastName`` (as recommended properties)
- A ``LabbookEntry`` with multiple recommended properties of different data types
- A ``LabbookEntry`` with multiple recommended properties of different data types
- It is assumed that the server knows a RecordType or Property with the name
- It is assumed that the server knows a RecordType or Property with the name
"Textfile".
``Textfile``.
One major advantage of using this interface (in contrast to the standard python interface) is that properties can be defined and added to record types "on-the-fly". E.g. the three lines for ``firstName`` as sub entries of ``Person`` have two effects on CaosDB:
One major advantage of using this interface (in contrast to the standard python interface) is that properties can be defined and added to record types "on-the-fly". E.g. the three lines for ``firstName`` as sub entries of ``Person`` have two effects on CaosDB:
...
@@ -66,7 +66,8 @@ Note the difference between the three property declarations of ``LabbookEntry``:
...
@@ -66,7 +66,8 @@ Note the difference between the three property declarations of ``LabbookEntry``:
- ``responsible``: This defines and adds a property with name "responsible" to ``LabbookEntry`, which has a datatype ``Person``. ``Person`` is defined above.
- ``responsible``: This defines and adds a property with name "responsible" to ``LabbookEntry`, which has a datatype ``Person``. ``Person`` is defined above.
- ``firstName``: This defines and adds a property with the standard data type ``TEXT`` to record type ``Person``.
- ``firstName``: This defines and adds a property with the standard data type ``TEXT`` to record type ``Person``.
If the data model depends on already existing parts, those can be added using the ``extern`` keyword.
If the data model depends on record types or properties which already exist in CaosDB, those can be
added using the ``extern`` keyword: ``extern`` takes a list of previously defined names.