diff options
Diffstat (limited to 'vk/tracking/db/backend')
-rw-r--r-- | vk/tracking/db/backend/csv.py | 2 | ||||
-rw-r--r-- | vk/tracking/db/backend/log.py | 1 | ||||
-rw-r--r-- | vk/tracking/db/backend/null.py | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/vk/tracking/db/backend/csv.py b/vk/tracking/db/backend/csv.py index 4943ff2..43038e4 100644 --- a/vk/tracking/db/backend/csv.py +++ b/vk/tracking/db/backend/csv.py @@ -8,6 +8,7 @@ from ..io import FileReaderCSV, FileWriterCSV from ..record import Record from ..timestamp import Timestamp + class Writer(meta.Writer): def __init__(self, fd): self._writer = FileWriterCSV(fd) @@ -30,6 +31,7 @@ class Writer(meta.Writer): def _record_to_row(record): return [str(record.get_timestamp())] + [str(record[field]) for field in record] + class Reader(meta.Reader): def __init__(self, fd): self._reader = FileReaderCSV(fd) diff --git a/vk/tracking/db/backend/log.py b/vk/tracking/db/backend/log.py index 814cabc..d301856 100644 --- a/vk/tracking/db/backend/log.py +++ b/vk/tracking/db/backend/log.py @@ -7,6 +7,7 @@ import logging from .. import meta + class Writer(meta.Writer): def __init__(self, fd): self._logger = logging.getLogger(__file__) diff --git a/vk/tracking/db/backend/null.py b/vk/tracking/db/backend/null.py index 663af10..80a66b4 100644 --- a/vk/tracking/db/backend/null.py +++ b/vk/tracking/db/backend/null.py @@ -5,6 +5,7 @@ from .. import meta + class Writer(meta.Writer): def __init__(self): pass @@ -18,6 +19,7 @@ class Writer(meta.Writer): def on_connection_error(self, e): pass + class Reader(meta.Reader): def __init__(self): pass |