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 e858c9f commit 6544cfd1bd30849172fda810c39a25229af23de8
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/spatialite/qgsspatialitefeatureiterator.cpp
@@ -455,7 +455,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 );
}
@@ -464,7 +464,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 6544cfd

Please sign in to comment.