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.Expression;
|
|||
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 class CockroachLegacySqlAstTranslator<T extends JdbcOperation> extends Ab
|
|||
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.Expression;
|
|||
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 class CockroachSqlAstTranslator<T extends JdbcOperation> extends Abstract
|
|||
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitInArrayPredicate(InArrayPredicate inArrayPredicate) {
|
||||
inArrayPredicate.getTestExpression().accept( this );
|
||||
appendSql( " = ANY(" );
|
||||
inArrayPredicate.getArrayParameter().accept( this );
|
||||
appendSql( ')' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue