alchemydumps icon indicating copy to clipboard operation
alchemydumps copied to clipboard

added sequences to the table

Open gauravdagde opened this issue 4 years ago • 3 comments

gauravdagde avatar Jun 04 '20 20:06 gauravdagde

Hi dear. Thank for the interest and for the PR!

Would you mind adding a description, maybe with use cases and possible trade-offs so we can know what to look for while going through the code review?

Many thanks : )

cuducos avatar Jun 04 '20 22:06 cuducos

@cuducos Added comments it self in the PR. Hope that's okay.

gauravdagde avatar Jun 05 '20 10:06 gauravdagde

There still things in this PR that bugs me, and they were not covered when I asked a description, maybe with use cases and possible trade-offs. Some things that comes to my mind:

  • we have raw SQL, how to make sure they work with all databases supported by SQLAlchemy?
  • we have some files moved around to a new helper module without a proper reasoning
  • when we define sequence = 0 and table_name = mapped_class.__tablename__ I think it is not the best choice: 0 could be just the default return value for the proposed get_next_sequence method, and the other variable is just a shortcut that only adds complexity to the readability (same is valid for db = self.db() in get_next_sequence method)
  • as we support 3.6+ only, we should move to f-strings and not .format when it is not explicitly needed

What do you think about it?

cuducos avatar Jul 28 '20 01:07 cuducos