Skip to content
Permalink
Browse files
[spatialite] Fix broken extent filter feature request against a spati…
…alite view
  • Loading branch information
nirvn authored and github-actions committed Nov 5, 2021
1 parent a8618a9 commit 90337097b019831c0e698bccc3822e061861f3f7
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/spatialite/qgsspatialitefeatureiterator.cpp
@@ -441,7 +441,7 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
mbrFilter += QStringLiteral( "ymax >= %1" ).arg( qgsDoubleToString( mFilterRect.yMinimum() ) );
QString idxName = QStringLiteral( "idx_%1_%2" ).arg( mSource->mIndexTable, mSource->mIndexGeometry );
whereClause += QStringLiteral( "%1 IN (SELECT pkid FROM %2 WHERE %3)" )
.arg( QStringLiteral( "ROWID" ),
.arg( mSource->mViewBased ? quotedPrimaryKey() : QStringLiteral( "ROWID" ),
QgsSqliteUtils::quotedIdentifier( idxName ),
mbrFilter );
}
@@ -450,7 +450,7 @@ QString QgsSpatiaLiteFeatureIterator::whereClauseRect()
// using the MbrCache spatial index
QString idxName = QStringLiteral( "cache_%1_%2" ).arg( mSource->mIndexTable, mSource->mIndexGeometry );
whereClause += QStringLiteral( "%1 IN (SELECT rowid FROM %2 WHERE mbr = FilterMbrIntersects(%3))" )
.arg( QStringLiteral( "ROWID" ),
.arg( mSource->mViewBased ? quotedPrimaryKey() : QStringLiteral( "ROWID" ),
QgsSqliteUtils::quotedIdentifier( idxName ),
mbr( mFilterRect ) );
}

0 comments on commit 9033709

Please sign in to comment.