Enable SQL autocommit
This commit is contained in:
parent
699d48bbd4
commit
22866616eb
@ -30,6 +30,8 @@ class DataBase(object):
|
|||||||
password=self.password,
|
password=self.password,
|
||||||
port=self.port,
|
port=self.port,
|
||||||
)
|
)
|
||||||
|
self.conn.autocommit = True # Активирует автоматический коммит транзакций
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def close(self) -> bool:
|
def close(self) -> bool:
|
||||||
@ -59,7 +61,6 @@ class DataBase(object):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self.commit()
|
|
||||||
cur.close()
|
cur.close()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user