Add parse_row method to replication stream class

This will allow individual stream classes to override how a row is parsed.
This commit is contained in:
Richard van der Hoff 2019-03-27 07:40:32 +00:00
parent 91c3513668
commit f570916a3e
3 changed files with 19 additions and 3 deletions

View file

@ -105,13 +105,14 @@ class ReplicationClientHandler(object):
def on_rdata(self, stream_name, token, rows):
"""Called to handle a batch of replication data with a given stream token.
By default this just pokes the slave store. Can be overriden in subclasses to
By default this just pokes the slave store. Can be overridden in subclasses to
handle more.
Args:
stream_name (str): name of the replication stream for this batch of rows
token (int): stream token for this batch of rows
rows (list): a list of Stream.ROW_TYPE objects.
rows (list): a list of Stream.ROW_TYPE objects as returned by
Stream.parse_row.
Returns:
Deferred|None