mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
Merge pull request #4560 from jnduan/fix_typo_in_SQLOrderBy
fix typo in SQLOrderBy.java
This commit is contained in:
@@ -26,7 +26,7 @@ public final class SQLOrderBy extends SQLObjectImpl implements SQLReplaceable {
|
||||
protected final List<SQLSelectOrderByItem> items = new ArrayList<SQLSelectOrderByItem>();
|
||||
|
||||
// for postgres
|
||||
private boolean sibings;
|
||||
private boolean siblings;
|
||||
|
||||
public SQLOrderBy(){
|
||||
|
||||
@@ -57,12 +57,12 @@ public final class SQLOrderBy extends SQLObjectImpl implements SQLReplaceable {
|
||||
return this.items;
|
||||
}
|
||||
|
||||
public boolean isSibings() {
|
||||
return this.sibings;
|
||||
public boolean isSiblings() {
|
||||
return this.siblings;
|
||||
}
|
||||
|
||||
public void setSibings(boolean sibings) {
|
||||
this.sibings = sibings;
|
||||
public void setSiblings(boolean siblings) {
|
||||
this.siblings = siblings;
|
||||
}
|
||||
|
||||
protected void accept0(SQLASTVisitor v) {
|
||||
@@ -83,14 +83,14 @@ public final class SQLOrderBy extends SQLObjectImpl implements SQLReplaceable {
|
||||
|
||||
SQLOrderBy order = (SQLOrderBy) o;
|
||||
|
||||
if (sibings != order.sibings) return false;
|
||||
if (siblings != order.siblings) return false;
|
||||
return items.equals(order.items);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = items.hashCode();
|
||||
result = 31 * result + (sibings ? 1 : 0);
|
||||
result = 31 * result + (siblings ? 1 : 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public final class SQLOrderBy extends SQLObjectImpl implements SQLReplaceable {
|
||||
x.items.add(item1);
|
||||
}
|
||||
|
||||
x.sibings = sibings;
|
||||
x.siblings = siblings;
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
@@ -2695,7 +2695,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.SIBLINGS)) {
|
||||
lexer.nextToken();
|
||||
orderBy.setSibings(true);
|
||||
orderBy.setSiblings(true);
|
||||
}
|
||||
|
||||
accept(Token.BY);
|
||||
@@ -2745,7 +2745,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.SIBLINGS)) {
|
||||
lexer.nextToken();
|
||||
orderBy.setSibings(true);
|
||||
orderBy.setSiblings(true);
|
||||
}
|
||||
|
||||
accept(Token.BY);
|
||||
@@ -2770,7 +2770,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.SIBLINGS)) {
|
||||
lexer.nextToken();
|
||||
orderBy.setSibings(true);
|
||||
orderBy.setSiblings(true);
|
||||
}
|
||||
|
||||
accept(Token.BY);
|
||||
@@ -2795,7 +2795,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.identifierEquals(FnvHash.Constants.SIBLINGS)) {
|
||||
lexer.nextToken();
|
||||
orderBy.setSibings(true);
|
||||
orderBy.setSiblings(true);
|
||||
}
|
||||
|
||||
accept(Token.BY);
|
||||
|
||||
@@ -2718,7 +2718,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
||||
List<SQLSelectOrderByItem> items = x.getItems();
|
||||
|
||||
if (items.size() > 0) {
|
||||
if (x.isSibings()) {
|
||||
if (x.isSiblings()) {
|
||||
print0(ucase ? "ORDER SIBLINGS BY " : "order siblings by ");
|
||||
} else {
|
||||
print0(ucase ? "ORDER BY " : "order by ");
|
||||
|
||||
Reference in New Issue
Block a user