Replies: 1 comment
-
Unfortunately, the parsing of alter statements especially those parameters is done in a very unstructured way. As you already found out the parameters are stored within a list. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm using JSqlParser for reading ALTER statements that come from DDL logs. Specifically, Im mainly interested in finding out whether the ALTER statement has a default value and what that value is exactly.
ex.
ALTER TABLE SAMP.EMP_ACT ADD COLUMN DEPTNO INT DEFAULT 1
From my basic testing, im able to retrieve the default values but only after combing through two layers of lists within the Alter class that is returned.
Is there a neater way to get this information without having to call
.getAlterExpressions().get(0).getColDataTypeList().get(0)...
Beta Was this translation helpful? Give feedback.
All reactions