Skip to content
Permalink
Browse files

oracle provider: don't try to verify requested geometry type in estim…

…ated metadata mode
  • Loading branch information
jef-n committed Nov 21, 2016
1 parent c3852c0 commit 39ff97e3d8ab6db375c9a92cee2ca0cbdadd31c4
Showing with 8 additions and 3 deletions.
  1. +8 −3 src/providers/oracle/qgsoracleprovider.cpp
@@ -2353,9 +2353,14 @@ bool QgsOracleProvider::getGeometryDetails()
.arg( qry.lastQuery() ), tr( "Oracle" ) );
}

if ( exec( qry, QString( mUseEstimatedMetadata
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<100) WHERE rownum<=2"
: "SELECT DISTINCT t.%1.sdo_gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<=2" ).arg( quotedIdentifier( geomCol ) ).arg( mQuery ) ) )
if ( mUseEstimatedMetadata && mRequestedGeomType != QGis::WKBUnknown )
{
QgsDebugMsg( "Trusting requested geometry type" );
detectedType = mRequestedGeomType;
}
else if ( exec( qry, QString( mUseEstimatedMetadata
? "SELECT DISTINCT gtype FROM (SELECT t.%1.sdo_gtype AS gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<100) WHERE rownum<=2"
: "SELECT DISTINCT t.%1.sdo_gtype FROM %2 t WHERE t.%1 IS NOT NULL AND rownum<=2" ).arg( quotedIdentifier( geomCol ) ).arg( mQuery ) ) )
{
if ( qry.next() )
{

0 comments on commit 39ff97e

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