I'm using Sqlite as backend, which doesn't use any connection pools. In my
case, I don't know if there is any negative consequences to just let Python
garbage collect each Session instance after use? Especially under a
multi-threading context. Could someone point out any risks not closing them
Hey Mike,
I can expand my example. I have an orm mapped attribute like this
class Obj(Base):
_evaluator = Column(String)
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._eval_func = eval(self._evaluator)
@orm.reconstructor
def init_on_load(self):
When reading the official SQLAlchemy documentation, I found the example
below:
### this is the **wrong way to do it** ###
class ThingOne(object):
def go(self):
session = Session()
try:
session.query(FooBar).update({"x": 5})
session.commit()
On Aug 6, 2017 1:33 PM, "Shane Carey" wrote:
Hey Mike,
I can expand my example. I have an orm mapped attribute like this
class Obj(Base):
_evaluator = Column(String)
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._eval_func =
On Aug 6, 2017 8:11 PM, "Jinghui Niu" wrote:
When reading the official SQLAlchemy documentation, I found the example
below:
### this is the **wrong way to do it** ###
class ThingOne(object):
def go(self):
session = Session()
try: