diff --git a/src/doc/future_caosdb.md b/src/doc/future_caosdb.md index 1a68e43425a6e6acd20779c3404019f734d822c2..de6170fa42674ed4e3161fb791a397a149dba659 100644 --- a/src/doc/future_caosdb.md +++ b/src/doc/future_caosdb.md @@ -69,6 +69,11 @@ Analogue, to what Pandas does. Provide bracket notation `rec.properties["test"]` for Properties with names that are in conflict with default attributes or contain spaces (or other forbidden characters). +Entities can be initialized with a set of Propertynames. Those Propertynames will be used as +attributes such that tab completion is possible in interactive use. The value however will be a special +value (e.g. UnsetPropertyValue) and accessing it results in an Exception. Thus, tab completion can be used +but no Properties are inserted unexpectedly with NULL values. + - Raise Exception if attribute does not exist but is accessed? [Discussion](https://gitlab.com/caosdb/caosdb-pylib/-/issues/60) @@ -168,6 +173,14 @@ inserted = new_one.insert() print("The new record has the ID:", inserted.id) ``` +### Factory method +While creating an Entity will not talk to a CaosDB server and can thus be done offline, the factory method +`create_record` allows to +1. Retrieve the parent and set attributes according to inheritance +2. Use a container to resolve the parent and set attributes + +In general, more complex "magic" will be placed in the factory and only the straight forward version +in the constructor. ### References and sub entities