Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -597,15 +597,20 @@ protected boolean supportsRowValueConstructorSyntax() {
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInList() {
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
protected boolean supportsRowValueConstructorSyntaxInInList() {
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInSubQuery() {
return true;
}

@Override
protected void visitReturningColumns(List<ColumnReference> returningColumns) {
// For DB2 we use #renderReturningClause to render a wrapper around the DML statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,19 @@ else if ( expression instanceof Summarization ) {

@Override
protected boolean supportsRowValueConstructorSyntax() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInList() {
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
protected boolean supportsRowValueConstructorSyntaxInInList() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,15 +578,20 @@ protected boolean supportsRowValueConstructorSyntax() {
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInList() {
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
protected boolean supportsRowValueConstructorSyntaxInInList() {
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInSubQuery() {
return true;
}

@Override
protected void visitReturningColumns(List<ColumnReference> returningColumns) {
// For DB2 we use #renderReturningClause to render a wrapper around the DML statement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,19 @@ else if ( expression instanceof Summarization ) {

@Override
protected boolean supportsRowValueConstructorSyntax() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInInList() {
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

@Override
protected boolean supportsRowValueConstructorSyntaxInQuantifiedPredicates() {
protected boolean supportsRowValueConstructorSyntaxInInList() {
// It's supported but not usable due to a bug: https://sourceforge.net/p/hsqldb/bugs/1714/
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7753,7 +7753,24 @@ public void visitInListPredicate(InListPredicate inListPredicate) {
}
else if ( !supportsRowValueConstructorSyntaxInInList() ) {
// Some DBs like Oracle support tuples only for the IN subquery predicate
if ( supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsUnionAll() ) {
if ( supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsValuesList() ) {
inListPredicate.getTestExpression().accept( this );
if ( inListPredicate.isNegated() ) {
appendSql( " not" );
}
appendSql( " in (select * from (values" );
char separator = ' ';
for ( Expression expression : listExpressions ) {
appendSql( separator );
appendSql( OPEN_PARENTHESIS );
renderCommaSeparated( SqlTupleContainer.getSqlTuple( expression ).getExpressions() );
appendSql( CLOSE_PARENTHESIS );
separator = ',';
}
appendSql( CLOSE_PARENTHESIS );
appendSql( CLOSE_PARENTHESIS );
}
else if ( supportsRowValueConstructorSyntaxInInSubQuery() && dialect.supportsUnionAll() ) {
inListPredicate.getTestExpression().accept( this );
if ( inListPredicate.isNegated() ) {
appendSql( " not" );
Expand Down
Loading