Implement altering column with SET DEFAULT and DROP DEFAULT#152
Implement altering column with SET DEFAULT and DROP DEFAULT#152JanJakes wants to merge 3 commits into
SET DEFAULT and DROP DEFAULT#152Conversation
8766a52 to
bb3b943
Compare
The CHANGE COLUMN logic can be extracted to a reusable method now. I'm only keeping the changes in a separate commit for a more useful diff. The update column callback can be used to modify any columns. Since it is also provided with the old column definition, it will enable column-modifying statements withtout a full column definition (like SET/DROP default). In the future, it should also unlock implementing expressions like MODIFY COLUMN and DROP COLUMN and enable modifying multiple columns at once to avoid unnecessary table copying.
bb3b943 to
c330962
Compare
|
@brandonpayton I took another stab at this. It required extracting all the column-changing logic to a private method, and allowing edits to the columns via a callback, so that the old column definition is available to statements like I'm not sure if it's worth pushing this much further given that #153 would change the translator quite a bit, and will likely be a chance to re-architect the translator a bit more. |
This completes the changes in the previous commit.
c330962 to
d0c4b6d
Compare
|
Superseded by #179 |
This PR implements the support for the following MySQL statements:
It required a small refactor so that the CHANGE COLUMN logic can be extracted to a reusable method.