mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 09:53:32 +01:00
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>
This commit is contained in:
parent
cc7aeeac31
commit
17ab47e96a
8 changed files with 556 additions and 0 deletions
19
tools/python/jwutils/db/schema/SingleForeignKey.py
Normal file
19
tools/python/jwutils/db/schema/SingleForeignKey.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from typing import Optional, List, Any
|
||||
|
||||
from .ColumnSet import ColumnSet
|
||||
|
||||
class SingleForeignKey:
|
||||
|
||||
def __init__(self, child_col, parent_col):
|
||||
self.__child_col = child_col
|
||||
self.__parent_col = parent_col
|
||||
|
||||
@property
|
||||
def child_col(self):
|
||||
return self.__child_col
|
||||
|
||||
@property
|
||||
def parent_col(self):
|
||||
return self.__parent_col
|
||||
Loading…
Add table
Add a link
Reference in a new issue