mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-python
synced 2026-01-15 01:52:56 +01:00
db: Add DataBase.py
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
859bb8000f
commit
2b061a6dc4
1 changed files with 28 additions and 0 deletions
28
tools/python/jwutils/db/DataBase.py
Normal file
28
tools/python/jwutils/db/DataBase.py
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
import abc
|
||||||
|
|
||||||
|
from jwutils.Config import Config
|
||||||
|
from jwutils.db.schema.Schema import Schema
|
||||||
|
from jwutils import Cmds
|
||||||
|
|
||||||
|
class DataBase(abc.ABC):
|
||||||
|
|
||||||
|
def __init__(self, schema: Schema, conf: Config, app: Any) -> None:
|
||||||
|
self.__conf = conf
|
||||||
|
self.__app = app
|
||||||
|
self.__schema = schema
|
||||||
|
|
||||||
|
@property
|
||||||
|
def app(self) -> Cmds:
|
||||||
|
return self.__app
|
||||||
|
|
||||||
|
@property
|
||||||
|
def schema(self):
|
||||||
|
return self.__schema
|
||||||
|
|
||||||
|
@property
|
||||||
|
def conf(self):
|
||||||
|
return self.__conf
|
||||||
Loading…
Add table
Add a link
Reference in a new issue