diff options
author | Egon Valdmees | 2011-05-05 12:37:54 +0000 |
---|---|---|
committer | Marko Kreen | 2011-05-11 09:39:40 +0000 |
commit | ea4ee34522e75908f11f513d8ed040c6580b97fb (patch) | |
tree | 528ce7d743ff588b0151cee48b10ed59d56ab66f /python/londiste/handler.py | |
parent | 8abaf61c48f72e573d076a585d334d059f71fa14 (diff) |
OCM-2279: londiste3 should translate everything to utf8, in a lossy way
where appropriate
* added argument 'encoding' to dispatcher handler
* tests for invalid utf8 sequences
* support for renamed table copy in dispatcher handler
Diffstat (limited to 'python/londiste/handler.py')
-rw-r--r-- | python/londiste/handler.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/python/londiste/handler.py b/python/londiste/handler.py index 7477675f..a0c72b07 100644 --- a/python/londiste/handler.py +++ b/python/londiste/handler.py @@ -99,12 +99,13 @@ class BaseHandler: """Called when batch finishes.""" pass - def prepare_copy(self, expr_list, dst_curs): - """Can change COPY behaviour. - - Returns new expr. + def real_copy(self, tablename, src_curs, dst_curs, column_list, cond_list): + """do actual table copy and return tuple with number of bytes and rows + copyed """ - pass + condition = ' and '.join(cond_list) + return skytools.full_copy(tablename, src_curs, dst_curs, column_list, + condition) class TableHandler(BaseHandler): """Default Londiste handler, inserts events into tables with plain SQL.""" |