Add database session API to db. This is a breaking change, because
from this commit on, a session object has to be passed to every
query.
This commit also removes any reference to Cmds / App objects. An
instantiated database object can be worked with outside of an App.
Signed-off-by: Jan Lindemann <jan@janware.com>
Support property edit_columns, intended to populate forms where rows
are created or edited, defaulting to log_columns.
Signed-off-by: Jan Lindemann <jan@janware.com>
Add the following methods:
add_child_row_location(self, parent_table: Union[Self, str], **kwargs) -> Optional[str]
add_child_row_location_rules(self) -> Iterable[str]
add_child_row_location_rule(self, child_table: Union[Self, str]) -> Optional[str]
These are meant to be called from different pieces of code:
- add_child_row_location() is meant to be used where the parent is
rendered, to display a link to adding another child
- add_child_row_location_rules() and add_child_row_location_rule()
are meant to be invoked where processing is going to be done, i.e.
likely code rendering child row content
Signed-off-by: Jan Lindemann <jan@janware.com>