-
Notifications
You must be signed in to change notification settings - Fork 686
expose primay_keys info for row based events #66
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
expose primay_keys info for row based events #66
Conversation
👍 I am fine with that, will merge it when we finished #65 |
👍 I'm fine too |
Hm, PRIMARY KEYs could be more than one column. Is this addressed? Could not spot it :) |
in favor of sqlalchemy's primary_key definition style
@@ -3,12 +3,21 @@ | |||
|
|||
class Table(object): | |||
def __init__(self, column_schemas, table_id, schema, table, columns): | |||
primary_key = [c.data["name"] for c in columns if c.data["is_primary"]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There may be multiple primary keys or none primary key here, so the final primary_key can either be str
or tuple
.
I convert it to tuple here so it's not mutable.
It should be fixed now. Please review it again, thanks. |
👍 |
@noplay shall we merge it? |
@lxyu You can make a new pull request in which you add yourself to the contributors list |
@bjoernhaeuser I'm already added. The "Lx Yu" is me ;) |
okay :) thats good to know :) |
Yeah we can merge it :) |
expose primay_keys info for row based events
a 2nd PR continues on the previous one.
This PR will expose primary keys info in row-based events, so we may only listen/publish the primary key values.