Skip to content
Permalink
Browse files

fix oracle provider (followup 5be0ee7)

  • Loading branch information
jef-n committed Jul 30, 2015
1 parent 2887a4a commit fe50327b282aee6dc28168f915bb695fa11020ee
Showing with 10 additions and 5 deletions.
  1. +1 −0 python/plugins/CMakeLists.txt
  2. +9 −5 src/providers/oracle/qgsoraclefeatureiterator.cpp
@@ -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})
@@ -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,"
@@ -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;

0 comments on commit fe50327

Please sign in to comment.
You can’t perform that action at this time.