-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'a5204f63ccb1ea8d30de002b4fc40be39935c275' into AllowCom…
…plexParsingClean Conflicts: src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt src/test/java/net/sf/jsqlparser/statement/select/NestedBracketsPerformanceTest.java src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java
- Loading branch information
Showing
23 changed files
with
371 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
src/main/java/net/sf/jsqlparser/expression/TimezoneExpression.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/*- | ||
* #%L | ||
* JSQLParser library | ||
* %% | ||
* Copyright (C) 2004 - 2019 JSQLParser | ||
* %% | ||
* Dual licensed under GNU LGPL 2.1 or Apache License 2.0 | ||
* #L% | ||
*/ | ||
package net.sf.jsqlparser.expression; | ||
|
||
import net.sf.jsqlparser.parser.ASTNodeAccessImpl; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class TimezoneExpression extends ASTNodeAccessImpl implements Expression { | ||
|
||
private Expression leftExpression; | ||
private ArrayList<String> timezoneExpressions = new ArrayList<>(); | ||
|
||
public Expression getLeftExpression() { | ||
return leftExpression; | ||
} | ||
|
||
public void setLeftExpression(Expression expression) { | ||
leftExpression = expression; | ||
} | ||
|
||
@Override | ||
public void accept(ExpressionVisitor expressionVisitor) { | ||
expressionVisitor.visit(this); | ||
} | ||
|
||
public List<String> getTimezoneExpressions() { | ||
return timezoneExpressions; | ||
} | ||
|
||
public void addTimezoneExpression(String timezoneExpr) { | ||
this.timezoneExpressions.add(timezoneExpr); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
String returnValue = getLeftExpression().toString(); | ||
for (String expr : timezoneExpressions) { | ||
returnValue += " AT TIME ZONE " + expr; | ||
} | ||
|
||
return returnValue; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.