schema: Continue

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-02-04 10:27:38 +01:00
commit 173ff0ef5a
2 changed files with 70 additions and 27 deletions

View file

@ -49,6 +49,10 @@ class Schema(abc.ABC): # export
def _access_defining_columns(self):
pass
@abc.abstractmethod
def _model_module_search_paths(self) -> list[tuple[str, type]]:
pass
# ------ API to be called
def __len__(self):
@ -99,3 +103,7 @@ class Schema(abc.ABC): # export
def columns(self, table_name: str) -> Iterable[Column]:
return self.__tables[table_name].columns
@property
def model_module_search_paths(self) -> list[tuple[str, type]]:
return self._model_module_search_paths()