Enable SQL autocommit

This commit is contained in:
Alexander Popov 2025-05-02 01:37:38 +03:00
parent 699d48bbd4
commit 22866616eb
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6

View File

@ -30,6 +30,8 @@ class DataBase(object):
password=self.password,
port=self.port,
)
self.conn.autocommit = True # Активирует автоматический коммит транзакций
return True
def close(self) -> bool:
@ -59,7 +61,6 @@ class DataBase(object):
),
)
)
self.commit()
cur.close()
return True