Skip to content

Commit

Permalink
Remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhengguanLi committed Jun 27, 2024
1 parent 2f89498 commit d4578cb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,27 @@ public void setStatementList(List<SQLStatement> statementList) {
public boolean isDollarQuoted() {
return isDollarQuoted;
}

public void setIsDollarQuoted(boolean isDollarQuoted) {
this.isDollarQuoted = isDollarQuoted;
}

public String getDollarQuoteTagName() {
return dollarQuoteTagName;
}

public void setDollarQuoteTagName(String dollarQuoteTagName) {
this.dollarQuoteTagName = dollarQuoteTagName;
}

public String getLanguage() {
return language;
}

public void setLanguage(String language) {
this.language = language;
}

public String getLabelName() {
return labelName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public class PGDoStatement extends SQLStatementImpl implements PGSQLStatement {
private SQLStatement block;

protected void accept0(SQLASTVisitor visitor) {
accept0((PGASTVisitor) visitor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,14 @@ public PGDoStatement parseDo() {
accept(Token.DO);
SQLStatement block = this.parseBlock();
stmt.setBlock(block);

return stmt;
}

public SQLBlockStatement parseBlock() {
SQLBlockStatement block = new SQLBlockStatement();
block.setDbType(dbType);

if (lexer.token() == Token.VARIANT) {
String dollarQuotedStr = lexer.stringVal();
if (!dollarQuotedStr.endsWith("$")) {
Expand All @@ -443,11 +443,11 @@ public SQLBlockStatement parseBlock() {
labelName = lexer.stringVal();
lexer.nextToken();
}

if (labelName != null) {
block.setLabelName(labelName);
}

if (lexer.token() == Token.DECLARE) {
lexer.nextToken();
}
Expand All @@ -457,7 +457,7 @@ public SQLBlockStatement parseBlock() {
param.setParent(block);
}
}

accept(Token.BEGIN);
List<SQLStatement> statementList = block.getStatementList();
this.parseStatementList(statementList, -1, block);
Expand All @@ -469,7 +469,7 @@ public SQLBlockStatement parseBlock() {
return block;
}
accept(Token.END);

Token token = lexer.token();
if (token != Token.SEMI) {
// END label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public boolean visit(PGStartTransactionStatement x) {
print0(ucase ? "START TRANSACTION" : "start transaction");
return false;
}

@Override
public boolean visit(PGDoStatement x) {
print0(ucase ? "DO " : "do ");
Expand All @@ -570,12 +570,12 @@ public boolean visit(SQLBlockStatement x) {
print(x.getDollarQuoteTagName() == null ? "$$" : "$" + x.getDollarQuoteTagName() + "$");
println();
}

if (x.getLabelName() != null) {
print0(x.getLabelName());
println();
}

if (!x.getParameters().isEmpty()) {
this.indentCount++;
if (x.getParent() instanceof SQLCreateProcedureStatement) {
Expand Down Expand Up @@ -634,7 +634,7 @@ public boolean visit(SQLBlockStatement x) {
print0(ucase ? "END;" : "end;");
}
println();

if (x.isDollarQuoted()) {
print(x.getDollarQuoteTagName() == null ? "$$" : "$" + x.getDollarQuoteTagName() + "$");
if (x.getLanguage() != null) {
Expand All @@ -648,7 +648,7 @@ public boolean visit(SQLBlockStatement x) {
}
return false;
}

@Override
public boolean visit(PGEndTransactionStatement x) {
print0(ucase ? "END" : "end");
Expand Down

0 comments on commit d4578cb

Please sign in to comment.