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:
Jan Lindemann 2025-01-28 10:18:57 +01:00
commit 17ab47e96a
8 changed files with 556 additions and 0 deletions

View 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