mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-13 12:04:09 +02:00
progressbar for inserts/upserts of all fileformats, closes #485
This commit is contained in:
parent
d9b9e075f0
commit
5fd78e27d2
2 changed files with 31 additions and 26 deletions
|
|
@ -155,6 +155,11 @@ class UpdateWrapper:
|
|||
self._update(len(line))
|
||||
yield line
|
||||
|
||||
def read(self, size=-1):
|
||||
data = self._wrapped.read(size)
|
||||
self._update(len(data))
|
||||
return data
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def file_progress(file, silent=False, **kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue