jw-python/tools/python/jwutils/db/Session.py
Jan Lindemann 495cebd769 db.Session: Add
Add database session API to db. This is a breaking change, because
from this commit on, a session object has to be passed to every
query.

This commit also removes any reference to Cmds / App objects. An
instantiated database object can be worked with outside of an App.

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

12 lines
180 B
Python

# -*- coding: utf-8 -*-
import abc
class Session(abc.ABC): # export
def __init__(self, db):
self.__db = db
@property
def db(self):
return self.__db