mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-01 15:29:11 +00:00
Fix in-array predicate rendering for cockroachdb
This commit is contained in:
parent
db3c73f302
commit
0d381db8b8
@ -15,6 +15,7 @@
|
||||
import org.hibernate.sql.ast.tree.expression.Literal;
|
||||
import org.hibernate.sql.ast.tree.expression.Summarization;
|
||||
import org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate;
|
||||
import org.hibernate.sql.ast.tree.predicate.InArrayPredicate;
|
||||
import org.hibernate.sql.ast.tree.predicate.LikePredicate;
|
||||
import org.hibernate.sql.ast.tree.select.QueryGroup;
|
||||
import org.hibernate.sql.ast.tree.select.QueryPart;
|
||||
@ -183,4 +184,12 @@ public void visitLikePredicate(LikePredicate likePredicate) {
|
||||
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInArrayPredicate(InArrayPredicate inArrayPredicate) {
|
||||
inArrayPredicate.getTestExpression().accept( this );
|
||||
appendSql( " = ANY(" );
|
||||
inArrayPredicate.getArrayParameter().accept( this );
|
||||
appendSql( ')' );
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
import org.hibernate.sql.ast.tree.expression.Literal;
|
||||
import org.hibernate.sql.ast.tree.expression.Summarization;
|
||||
import org.hibernate.sql.ast.tree.predicate.BooleanExpressionPredicate;
|
||||
import org.hibernate.sql.ast.tree.predicate.InArrayPredicate;
|
||||
import org.hibernate.sql.ast.tree.predicate.LikePredicate;
|
||||
import org.hibernate.sql.ast.tree.select.QueryGroup;
|
||||
import org.hibernate.sql.ast.tree.select.QueryPart;
|
||||
@ -155,4 +156,12 @@ public void visitLikePredicate(LikePredicate likePredicate) {
|
||||
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInArrayPredicate(InArrayPredicate inArrayPredicate) {
|
||||
inArrayPredicate.getTestExpression().accept( this );
|
||||
appendSql( " = ANY(" );
|
||||
inArrayPredicate.getArrayParameter().accept( this );
|
||||
appendSql( ')' );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user