Skip to content

Commit 2cb3e58

Browse files
feat: syntax sugar
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
1 parent b2eed1e commit 2cb3e58

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/net/sf/jsqlparser/expression/operators/relational/IsNullExpression.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import net.sf.jsqlparser.expression.Expression;
1313
import net.sf.jsqlparser.expression.ExpressionVisitor;
1414
import net.sf.jsqlparser.parser.ASTNodeAccessImpl;
15+
import net.sf.jsqlparser.schema.Column;
1516

1617
public class IsNullExpression extends ASTNodeAccessImpl implements Expression {
1718

@@ -26,6 +27,11 @@ public IsNullExpression(Expression leftExpression) {
2627
this.leftExpression = leftExpression;
2728
}
2829

30+
public IsNullExpression(String columnName, boolean useNotNull) {
31+
this.leftExpression = new Column(columnName);
32+
this.useNotNull = useNotNull;
33+
}
34+
2935
public Expression getLeftExpression() {
3036
return leftExpression;
3137
}

0 commit comments

Comments
 (0)