Skip to content

Commit 67bfae6

Browse files
feat: Syntax sugar
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
1 parent 8461e8a commit 67bfae6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/net/sf/jsqlparser/expression/CastExpression.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public CastExpression(String keyword, Expression leftExpression, String dataType
4343
}
4444

4545
// Implicit Cast
46+
public CastExpression(String dataType, String value) {
47+
this.keyword = null;
48+
this.isImplicitCast = true;
49+
this.colDataType = new ColDataType(dataType);
50+
this.leftExpression = new StringValue(value);
51+
}
52+
4653
public CastExpression(ColDataType colDataType, String value) {
4754
this.keyword = null;
4855
this.isImplicitCast = true;

0 commit comments

Comments
 (0)