alchemydumps
alchemydumps copied to clipboard
added sequences to the table
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 Added comments it self in the PR. Hope that's okay.
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
andtable_name = mapped_class.__tablename__
I think it is not the best choice:0
could be just the default return value for the proposedget_next_sequence
method, and the other variable is just a shortcut that only adds complexity to the readability (same is valid fordb = self.db()
inget_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?