mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser.
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ public class MySqlShowColumnOutpuVisitor extends MySqlOutputVisitor {
|
||||
List<String> dataTypes = new ArrayList<String>();
|
||||
List<String> defaultValues = new ArrayList<String>();
|
||||
|
||||
int name_len = -1, dataType_len = -1, defaultVal_len = -1, extra_len = 5;
|
||||
int name_len = -1, dataType_len = -1, defaultVal_len = 7, extra_len = 5;
|
||||
for (SQLTableElement element : x.getTableElementList()) {
|
||||
if (element instanceof SQLColumnDefinition) {
|
||||
SQLColumnDefinition column = (SQLColumnDefinition) element;
|
||||
|
||||
@@ -60,10 +60,6 @@ public class OraclePrimaryKey extends SQLPrimaryKeyImpl implements OracleConstra
|
||||
this.deferrable = deferrable;
|
||||
}
|
||||
|
||||
public List<SQLExpr> getColumns() {
|
||||
return columns;
|
||||
}
|
||||
|
||||
public OracleUsingIndexClause getUsing() {
|
||||
return using;
|
||||
}
|
||||
|
||||
@@ -1019,7 +1019,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
|
||||
OraclePrimaryKey primaryKey = new OraclePrimaryKey();
|
||||
accept(Token.LPAREN);
|
||||
exprList(primaryKey.getColumns(), primaryKey);
|
||||
orderBy(primaryKey.getColumns(), primaryKey);
|
||||
accept(Token.RPAREN);
|
||||
|
||||
|
||||
@@ -1349,7 +1349,7 @@ public class OracleExprParser extends SQLExprParser {
|
||||
|
||||
OracleUnique unique = new OracleUnique();
|
||||
accept(Token.LPAREN);
|
||||
exprList(unique.getColumns(), unique);
|
||||
orderBy(unique.getColumns(), unique);
|
||||
accept(Token.RPAREN);
|
||||
|
||||
if (lexer.token() == Token.USING) {
|
||||
|
||||
Reference in New Issue
Block a user