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:
@@ -15,11 +15,11 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLDataTypeImpl extends SQLObjectImpl implements SQLDataType {
|
||||
|
||||
protected String name;
|
||||
@@ -59,7 +59,7 @@ public class SQLDataTypeImpl extends SQLObjectImpl implements SQLDataType {
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((arguments == null) ? 0 : arguments.hashCode());
|
||||
result = prime * result + arguments.hashCode();
|
||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||
return result;
|
||||
}
|
||||
@@ -70,9 +70,7 @@ public class SQLDataTypeImpl extends SQLObjectImpl implements SQLDataType {
|
||||
if (obj == null) return false;
|
||||
if (getClass() != obj.getClass()) return false;
|
||||
SQLDataTypeImpl other = (SQLDataTypeImpl) obj;
|
||||
if (arguments == null) {
|
||||
if (other.arguments != null) return false;
|
||||
} else if (!arguments.equals(other.arguments)) return false;
|
||||
if (!arguments.equals(other.arguments)) return false;
|
||||
if (name == null) {
|
||||
if (other.name != null) return false;
|
||||
} else if (!name.equals(other.name)) return false;
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
package com.alibaba.druid.sql.ast;
|
||||
|
||||
public interface SQLName extends SQLExpr {
|
||||
String getSimleName();
|
||||
String getSimpleName();
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.statement.SQLSelectOrderByItem;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SQLOrderBy extends SQLObjectImpl {
|
||||
|
||||
protected final List<SQLSelectOrderByItem> items = new ArrayList<SQLSelectOrderByItem>();
|
||||
@@ -58,7 +58,7 @@ public class SQLOrderBy extends SQLObjectImpl {
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((items == null) ? 0 : items.hashCode());
|
||||
result = prime * result + items.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -68,10 +68,7 @@ public class SQLOrderBy extends SQLObjectImpl {
|
||||
if (obj == null) return false;
|
||||
if (getClass() != obj.getClass()) return false;
|
||||
SQLOrderBy other = (SQLOrderBy) obj;
|
||||
if (items == null) {
|
||||
if (other.items != null) return false;
|
||||
} else if (!items.equals(other.items)) return false;
|
||||
return true;
|
||||
return items.equals(other.items);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
package com.alibaba.druid.sql.ast;
|
||||
|
||||
public enum SQLOrderingSpecification {
|
||||
ASC, DESC;
|
||||
ASC, DESC
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.alibaba.druid.sql.ast;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
/*
|
||||
* Copyright 1999-2011 Alibaba Group Holding Ltd.
|
||||
*
|
||||
@@ -62,7 +62,7 @@ public class SQLOver extends SQLObjectImpl {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((orderBy == null) ? 0 : orderBy.hashCode());
|
||||
result = prime * result + ((partitionBy == null) ? 0 : partitionBy.hashCode());
|
||||
result = prime * result + partitionBy.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -85,14 +85,7 @@ public class SQLOver extends SQLObjectImpl {
|
||||
} else if (!orderBy.equals(other.orderBy)) {
|
||||
return false;
|
||||
}
|
||||
if (partitionBy == null) {
|
||||
if (other.partitionBy != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!partitionBy.equals(other.partitionBy)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return partitionBy.equals(other.partitionBy);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class SQLIdentifierExpr extends SQLExprImpl implements SQLName {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSimleName() {
|
||||
public String getSimpleName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SQLPropertyExpr extends SQLExprImpl implements SQLName {
|
||||
|
||||
}
|
||||
|
||||
public String getSimleName() {
|
||||
public String getSimpleName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class NotNullConstraint extends SQLConstaintImpl implements SQLColumnConstraint {
|
||||
public class NotNullConstraint extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
public NotNullConstraint(){
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@ import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableAddConstraint extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private SQLConstaint constraint;
|
||||
private SQLConstraint constraint;
|
||||
private boolean withNoCheck = false;
|
||||
|
||||
public SQLAlterTableAddConstraint(){
|
||||
|
||||
}
|
||||
|
||||
public SQLAlterTableAddConstraint(SQLConstaint constraint){
|
||||
public SQLAlterTableAddConstraint(SQLConstraint constraint){
|
||||
this.setConstraint(constraint);
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ public class SQLAlterTableAddConstraint extends SQLObjectImpl implements SQLAlte
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
public SQLConstaint getConstraint() {
|
||||
public SQLConstraint getConstraint() {
|
||||
return constraint;
|
||||
}
|
||||
|
||||
public void setConstraint(SQLConstaint constraint) {
|
||||
public void setConstraint(SQLConstraint constraint) {
|
||||
if (constraint != null) {
|
||||
constraint.setParent(this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLAlterTableDropForeinKey extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
public class SQLAlterTableDropForeignKey extends SQLObjectImpl implements SQLAlterTableItem {
|
||||
|
||||
private SQLName indexName;
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
import com.alibaba.druid.sql.ast.SQLDataTypeImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCharactorDataType extends SQLDataTypeImpl {
|
||||
public class SQLCharacterDataType extends SQLDataTypeImpl {
|
||||
|
||||
private String charSetName;
|
||||
private String collate;
|
||||
@@ -28,7 +28,7 @@ public class SQLCharactorDataType extends SQLDataTypeImpl {
|
||||
public final static String CHAR_TYPE_BYTE = "BYTE";
|
||||
public final static String CHAR_TYPE_CHAR = "CHAR";
|
||||
|
||||
public SQLCharactorDataType(String name){
|
||||
public SQLCharacterDataType(String name){
|
||||
super(name);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLCheck extends SQLConstaintImpl implements SQLTableElement {
|
||||
public class SQLCheck extends SQLConstraintImpl implements SQLTableElement {
|
||||
|
||||
private SQLExpr expr;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLColumnCheck extends SQLConstaintImpl implements SQLColumnConstraint {
|
||||
public class SQLColumnCheck extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
private SQLExpr expr;
|
||||
|
||||
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
public interface SQLColumnConstraint extends SQLConstaint {
|
||||
public interface SQLColumnConstraint extends SQLConstraint {
|
||||
|
||||
}
|
||||
|
||||
@@ -15,21 +15,21 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLDataType;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SQLColumnDefinition extends SQLObjectImpl implements SQLTableElement {
|
||||
|
||||
protected SQLName name;
|
||||
protected SQLDataType dataType;
|
||||
protected SQLExpr defaultExpr;
|
||||
protected final List<SQLColumnConstraint> constaints = new ArrayList<SQLColumnConstraint>(0);
|
||||
protected final List<SQLColumnConstraint> constraints = new ArrayList<SQLColumnConstraint>(0);
|
||||
protected SQLExpr comment;
|
||||
|
||||
protected Boolean enable;
|
||||
@@ -73,8 +73,8 @@ public class SQLColumnDefinition extends SQLObjectImpl implements SQLTableElemen
|
||||
this.defaultExpr = defaultExpr;
|
||||
}
|
||||
|
||||
public List<SQLColumnConstraint> getConstaints() {
|
||||
return constaints;
|
||||
public List<SQLColumnConstraint> getConstraints() {
|
||||
return constraints;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,7 +94,7 @@ public class SQLColumnDefinition extends SQLObjectImpl implements SQLTableElemen
|
||||
this.acceptChild(visitor, name);
|
||||
this.acceptChild(visitor, dataType);
|
||||
this.acceptChild(visitor, defaultExpr);
|
||||
this.acceptChild(visitor, constaints);
|
||||
this.acceptChild(visitor, constraints);
|
||||
}
|
||||
visitor.endVisit(this);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLColumnPrimaryKey extends SQLConstaintImpl implements SQLColumnConstraint {
|
||||
public class SQLColumnPrimaryKey extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLColumnReference extends SQLConstaintImpl implements SQLColumnConstraint {
|
||||
public class SQLColumnReference extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
private SQLName table;
|
||||
private List<SQLName> columns = new ArrayList<SQLName>();
|
||||
|
||||
@@ -17,7 +17,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLColumnUniqueKey extends SQLConstaintImpl implements SQLColumnConstraint {
|
||||
public class SQLColumnUniqueKey extends SQLConstraintImpl implements SQLColumnConstraint {
|
||||
|
||||
@Override
|
||||
protected void accept0(SQLASTVisitor visitor) {
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObject;
|
||||
|
||||
public interface SQLConstaint extends SQLObject {
|
||||
public interface SQLConstraint extends SQLObject {
|
||||
|
||||
SQLName getName();
|
||||
|
||||
+2
-2
@@ -18,12 +18,12 @@ package com.alibaba.druid.sql.ast.statement;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.ast.SQLObjectImpl;
|
||||
|
||||
public abstract class SQLConstaintImpl extends SQLObjectImpl implements SQLConstaint {
|
||||
public abstract class SQLConstraintImpl extends SQLObjectImpl implements SQLConstraint {
|
||||
|
||||
private SQLName name;
|
||||
private Boolean enable;
|
||||
|
||||
public SQLConstaintImpl(){
|
||||
public SQLConstraintImpl(){
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
|
||||
public interface SQLForeignKeyConstraint extends SQLConstaint, SQLTableElement, SQLTableConstaint {
|
||||
public interface SQLForeignKeyConstraint extends SQLConstraint, SQLTableElement, SQLTableConstraint {
|
||||
|
||||
List<SQLName> getReferencingColumns();
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
import com.alibaba.druid.sql.ast.SQLName;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLForeignKeyImpl extends SQLConstaintImpl implements SQLForeignKeyConstraint {
|
||||
public class SQLForeignKeyImpl extends SQLConstraintImpl implements SQLForeignKeyConstraint {
|
||||
|
||||
private SQLName referencedTableName;
|
||||
private List<SQLName> referencingColumns = new ArrayList<SQLName>();
|
||||
|
||||
+1
-1
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
package com.alibaba.druid.sql.ast.statement;
|
||||
|
||||
public interface SQLTableConstaint extends SQLConstaint, SQLTableElement {
|
||||
public interface SQLTableConstraint extends SQLConstraint, SQLTableElement {
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
import com.alibaba.druid.sql.visitor.SQLASTVisitor;
|
||||
|
||||
public class SQLUnique extends SQLConstaintImpl implements SQLUniqueConstraint, SQLTableElement {
|
||||
public class SQLUnique extends SQLConstraintImpl implements SQLUniqueConstraint, SQLTableElement {
|
||||
|
||||
private final List<SQLExpr> columns = new ArrayList<SQLExpr>();
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
|
||||
import com.alibaba.druid.sql.ast.SQLExpr;
|
||||
|
||||
public interface SQLUniqueConstraint extends SQLConstaint {
|
||||
public interface SQLUniqueConstraint extends SQLConstraint {
|
||||
|
||||
List<SQLExpr> getColumns();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user