Commit graph

9 commits

Author SHA1 Message Date
b33d9af302 schema.Table: Add add_child_row_location() and friends
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>
2025-02-15 16:30:14 +01:00
5ca775eb82 schema.Table: Add property add_row_location_rule and friends
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-02-15 11:43:00 +01:00
91d7517054 schema.Column: Add property translate
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-02-14 08:12:02 +01:00
ba1b7eda19 schema.Table: Add property relationships
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-02-13 08:35:40 +01:00
173ff0ef5a schema: Continue
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-02-04 10:27:38 +01:00
fb907b0493 schema: Add utils
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-02-01 09:58:25 +01:00
c50c614f13 schema: Continue
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-01-30 20:34:44 +01:00
9cfcc1bd68 db.schema: Add location definition to API
Signed-off-by: Jan Lindemann <jan@janware.com>
2025-01-30 14:26:43 +01:00
17ab47e96a Add db.schema framework
jw.db.schema is a set of classes meant as an interface to describe a database schema.

Signed-off-by: Jan Lindemann <jan@janware.com>
2025-01-28 10:18:57 +01:00