Skip to content

Commit

Permalink
Merge pull request alibaba#600 from yakolee/master
Browse files Browse the repository at this point in the history
support create table ... UNSIGNED ZEROFILL
  • Loading branch information
yakolee committed Aug 1, 2014
2 parents 4327e40 + 6cc9d9b commit df97ea9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,12 @@ protected SQLDataType parseDataTypeRest(SQLDataType dataType) {

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,14 @@ public boolean visit(SQLDataType x) {
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;
Expand Down

0 comments on commit df97ea9

Please sign in to comment.