raise on exception in connection, fix operator not being considered in QueryBuilder

This commit is contained in:
2025-12-06 22:19:12 +03:00
parent 2b45cab4e8
commit c18dad4a77

View File

@@ -31,6 +31,7 @@ class DB:
except Exception as e:
if in_transaction and self._connection:
conn.rollback()
raise
finally:
if in_transaction:
self._transaction_depth -= 1
@@ -126,7 +127,7 @@ class DB:
def where(self, condition, operator = "="):
if isinstance(condition, dict):
for key, value in condition.items():
self._where.append((key, "=", value))
self._where.append((key, operator, value))
elif isinstance(condition, list):
for c in condition:
self._where.append(c)