Skip to content

Commit

Permalink
stardict: BaseSqList: remove self._filename, do not commit on append
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Dec 7, 2024
1 parent 7a8fd71 commit 9ec81a1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pyglossary/plugins/stardict/sqlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def __init__(
log.warning(f"Renaming {database} to {database}.bak")
os.rename(database, database + "bak")

self._filename = database

self._con: sqlite3.Connection | None = connect(database)
self._cur: sqlite3.Cursor | None = self._con.cursor()

Expand Down Expand Up @@ -76,8 +74,6 @@ def append(self, item: Sequence) -> None:
f"insert into data({self._columnNames}) values (?{', ?' * extraN})",
[item[0].lower()] + list(item),
)
if self._len % 1000 == 0:
self._con.commit()

def sort(self) -> None:
pass
Expand Down

0 comments on commit 9ec81a1

Please sign in to comment.