Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo 几个调整建议 #33

Open
Frankgong2020 opened this issue May 14, 2021 · 0 comments
Open

demo 几个调整建议 #33

Frankgong2020 opened this issue May 14, 2021 · 0 comments

Comments

@Frankgong2020
Copy link

1、 # 原代码连等式会造成before 和 after的值全部都是after的值,需分别创建字典。
format_data['before'] = dict()
format_data['after'] = dict()
'''
format_data['before'] = format_data['after'] = dict()
'''
2、 if event_type == EntryProtocol_pb2.EventType.DELETE:
for column in row.beforeColumns:
# 原代码只能记录记录的最后一个字段,需做一下更改,这样可以显示所有字段
format_data[column.name] = column.value
'''
format_data = {
column.name: column.value
}
'''
elif event_type == EntryProtocol_pb2.EventType.INSERT:
for column in row.afterColumns:
# 原代码只能记录记录的最后一个字段,需做一下更改,这样可以显示所有字段
format_data[column.name] = column.value
'''
format_data = {
column.name: column.value
}
'''

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant