Skip to content

Commit

Permalink
fix oracle provider (followup 5be0ee7)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 30, 2015
1 parent 2887a4a commit fe50327
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions python/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ MACRO (PLUGIN_INSTALL plugin subdir )

ADD_DEPENDENCIES(staged-plugins zzz-${plugin}-stageinstall)
ADD_CUSTOM_TARGET(staged-${plugin} DEPENDS zzz-${plugin}-stageinstall)
FILE(WRITE ${_cmake} "")
ENDIF(NOT TARGET zzz-${plugin}-stageinstall)

ADD_CUSTOM_TARGET(zzz-${plugin}-${n}-depend DEPENDS ${ARGN})
Expand Down
14 changes: 9 additions & 5 deletions src/providers/oracle/qgsoraclefeatureiterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ QgsOracleFeatureIterator::QgsOracleFeatureIterator( QgsOracleFeatureSource* sour

QString whereClause;

if ( !mRequest.filterRect().isNull && !mSource->mGeometryColumn.isNull() && mSource->mHasSpatialIndex )
if ( !mRequest.filterRect().isNull() && !mSource->mGeometryColumn.isNull() && mSource->mHasSpatialIndex )
{
QgsRectangle rect( mRequest.filterRect() );
QString bbox = QString( "mdsys.sdo_geometry(2003,%1,NULL,"
Expand All @@ -72,14 +72,18 @@ QgsOracleFeatureIterator::QgsOracleFeatureIterator( QgsOracleFeatureSource* sour
switch ( request.filterType() )
{
case QgsFeatureRequest::FilterFid:
{
QString fidWhereClause = QgsOracleUtils::whereClause( request.filterFid(), mSource->mFields, mSource->mPrimaryKeyType, mSource->mPrimaryKeyAttrs, mSource->mShared );
whereClause = QgsPostgresUtils::andWhereClauses( whereClause, fidWhereClause );
break;
whereClause = QgsOracleUtils::andWhereClauses( whereClause, fidWhereClause );
}
break;

case QgsFeatureRequest::FilterFids:
{
QString fidsWhereClause = QgsOracleUtils::whereClause( request.filterFids(), mSource->mFields, mSource->mPrimaryKeyType, mSource->mPrimaryKeyAttrs, mSource->mShared );
whereClause = QgsPostgresUtils::andWhereClauses( whereClause, fidsWhereClause );
break;
whereClause = QgsOracleUtils::andWhereClauses( whereClause, fidsWhereClause );
}
break;

case QgsFeatureRequest::FilterNone:
break;
Expand Down

0 comments on commit fe50327

Please sign in to comment.