mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Fix obvious mistakes like spelling errors
This commit is contained in:
@@ -62,14 +62,14 @@ import com.alibaba.druid.sql.ast.expr.SQLUnaryOperator;
|
||||
import com.alibaba.druid.sql.ast.expr.SQLVariantRefExpr;
|
||||
import com.alibaba.druid.sql.ast.statement.NotNullConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLAssignItem;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCharactorDataType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCharacterDataType;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnCheck;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnDefinition;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnPrimaryKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnReference;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLColumnUniqueKey;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLConstaint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyConstraint;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLForeignKeyImpl;
|
||||
import com.alibaba.druid.sql.ast.statement.SQLPrimaryKey;
|
||||
@@ -1314,7 +1314,7 @@ public class SQLExprParser extends SQLParser {
|
||||
String typeName = typeExpr.toString();
|
||||
|
||||
if (isCharType(typeName)) {
|
||||
SQLCharactorDataType charType = new SQLCharactorDataType(typeName);
|
||||
SQLCharacterDataType charType = new SQLCharacterDataType(typeName);
|
||||
|
||||
if (lexer.token() == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
@@ -1359,7 +1359,7 @@ public class SQLExprParser extends SQLParser {
|
||||
;
|
||||
}
|
||||
|
||||
protected SQLDataType parseCharTypeRest(SQLCharactorDataType charType) {
|
||||
protected SQLDataType parseCharTypeRest(SQLCharacterDataType charType) {
|
||||
if (identifierEquals("CHARACTER")) {
|
||||
lexer.nextToken();
|
||||
|
||||
@@ -1418,7 +1418,7 @@ public class SQLExprParser extends SQLParser {
|
||||
if (lexer.token() == Token.NOT) {
|
||||
lexer.nextToken();
|
||||
accept(Token.NULL);
|
||||
column.getConstaints().add(new NotNullConstraint());
|
||||
column.getConstraints().add(new NotNullConstraint());
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1431,7 +1431,7 @@ public class SQLExprParser extends SQLParser {
|
||||
if (lexer.token == Token.PRIMARY) {
|
||||
lexer.nextToken();
|
||||
accept(Token.KEY);
|
||||
column.getConstaints().add(new SQLColumnPrimaryKey());
|
||||
column.getConstraints().add(new SQLColumnPrimaryKey());
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1440,7 +1440,7 @@ public class SQLExprParser extends SQLParser {
|
||||
if (lexer.token() == Token.KEY) {
|
||||
lexer.nextToken();
|
||||
}
|
||||
column.getConstaints().add(new SQLColumnPrimaryKey());
|
||||
column.getConstraints().add(new SQLColumnPrimaryKey());
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1454,7 +1454,7 @@ public class SQLExprParser extends SQLParser {
|
||||
accept(Token.KEY);
|
||||
SQLColumnPrimaryKey pk = new SQLColumnPrimaryKey();
|
||||
pk.setName(name);
|
||||
column.getConstaints().add(pk);
|
||||
column.getConstraints().add(pk);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1462,7 +1462,7 @@ public class SQLExprParser extends SQLParser {
|
||||
lexer.nextToken();
|
||||
SQLColumnUniqueKey uk = new SQLColumnUniqueKey();
|
||||
uk.setName(name);
|
||||
column.getConstaints().add(uk);
|
||||
column.getConstraints().add(uk);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1474,7 +1474,7 @@ public class SQLExprParser extends SQLParser {
|
||||
accept(Token.LPAREN);
|
||||
this.names(ref.getColumns(), ref);
|
||||
accept(Token.RPAREN);
|
||||
column.getConstaints().add(ref);
|
||||
column.getConstraints().add(ref);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1483,7 +1483,7 @@ public class SQLExprParser extends SQLParser {
|
||||
accept(Token.NULL);
|
||||
NotNullConstraint notNull = new NotNullConstraint();
|
||||
notNull.setName(name);
|
||||
column.getConstaints().add(notNull);
|
||||
column.getConstraints().add(notNull);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1491,7 +1491,7 @@ public class SQLExprParser extends SQLParser {
|
||||
SQLColumnCheck check = parseColumnCheck();
|
||||
check.setName(name);
|
||||
check.setParent(column);
|
||||
column.getConstaints().add(check);
|
||||
column.getConstraints().add(check);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1507,7 +1507,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.token == Token.CHECK) {
|
||||
SQLColumnCheck check = parseColumnCheck();
|
||||
column.getConstaints().add(check);
|
||||
column.getConstraints().add(check);
|
||||
return parseColumnRest(column);
|
||||
}
|
||||
|
||||
@@ -1590,7 +1590,7 @@ public class SQLExprParser extends SQLParser {
|
||||
}
|
||||
}
|
||||
|
||||
public SQLConstaint parseConstaint() {
|
||||
public SQLConstraint parseConstaint() {
|
||||
SQLName name = null;
|
||||
|
||||
if (lexer.token() == Token.CONSTRAINT) {
|
||||
@@ -1598,7 +1598,7 @@ public class SQLExprParser extends SQLParser {
|
||||
name = this.name();
|
||||
}
|
||||
|
||||
SQLConstaint constraint;
|
||||
SQLConstraint constraint;
|
||||
if (lexer.token() == Token.PRIMARY) {
|
||||
constraint = parsePrimaryKey();
|
||||
} else if (lexer.token() == Token.UNIQUE) {
|
||||
|
||||
Reference in New Issue
Block a user