mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #600 from yakolee/master
support create table ... UNSIGNED ZEROFILL
This commit is contained in:
@@ -578,7 +578,12 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
|
||||
if (identifierEquals("UNSIGNED")) {
|
||||
lexer.nextToken();
|
||||
dataType.getAttributes().put("unsigned", true);
|
||||
dataType.getAttributes().put("UNSIGNED", true);
|
||||
}
|
||||
|
||||
if (identifierEquals("ZEROFILL")) {
|
||||
lexer.nextToken();
|
||||
dataType.getAttributes().put("ZEROFILL", true);
|
||||
}
|
||||
|
||||
return dataType;
|
||||
|
||||
@@ -343,9 +343,14 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
print(")");
|
||||
}
|
||||
|
||||
if (Boolean.TRUE == x.getAttribute("unsigned")) {
|
||||
print(" unsigned");
|
||||
if (Boolean.TRUE == x.getAttribute("UNSIGNED")) {
|
||||
print(" UNSIGNED");
|
||||
}
|
||||
|
||||
if (Boolean.TRUE == x.getAttribute("ZEROFILL")) {
|
||||
print(" ZEROFILL");
|
||||
}
|
||||
|
||||
|
||||
if (x instanceof SQLCharactorDataType) {
|
||||
SQLCharactorDataType charType = (SQLCharactorDataType) x;
|
||||
|
||||
Reference in New Issue
Block a user