@@ -1174,7 +1174,7 @@ const QgsFields & QgsOgrProvider::fields() const
1174
1174
}
1175
1175
1176
1176
1177
- // TODO - add sanity check for shape file layers, to include cheking to
1177
+ // TODO - add sanity check for shape file layers, to include checking to
1178
1178
// see if the .shp, .dbf, .shx files are all present and the layer
1179
1179
// actually has features
1180
1180
bool QgsOgrProvider::isValid ()
@@ -3449,7 +3449,7 @@ OGRLayerH QgsOgrProviderUtils::setSubsetString( OGRLayerH layer, OGRDataSourceH
3449
3449
QByteArray sql = encoding->fromUnicode ( subsetString );
3450
3450
3451
3451
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( encoding->toUnicode ( sql ) ) );
3452
- subsetLayer = GDALDatasetExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3452
+ subsetLayer = OGR_DS_ExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3453
3453
}
3454
3454
else
3455
3455
{
@@ -3468,22 +3468,22 @@ OGRLayerH QgsOgrProviderUtils::setSubsetString( OGRLayerH layer, OGRDataSourceH
3468
3468
3469
3469
QByteArray sql = sqlPart1 + " , " + fidColumn + " as orig_ogc_fid" + sqlPart3;
3470
3470
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( encoding->toUnicode ( sql ) ) );
3471
- subsetLayer = GDALDatasetExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3471
+ subsetLayer = OGR_DS_ExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3472
3472
3473
3473
// See https://lists.osgeo.org/pipermail/qgis-developer/2017-September/049802.html
3474
3474
// If execute SQL fails because it did not find the fidColumn, retry with hardcoded FID
3475
3475
if ( !subsetLayer )
3476
3476
{
3477
3477
QByteArray sql = sqlPart1 + " , " + " FID as orig_ogc_fid" + sqlPart3;
3478
3478
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( encoding->toUnicode ( sql ) ) );
3479
- subsetLayer = GDALDatasetExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3479
+ subsetLayer = OGR_DS_ExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3480
3480
}
3481
3481
// If that also fails, just continue without the orig_ogc_fid
3482
3482
if ( !subsetLayer )
3483
3483
{
3484
3484
QByteArray sql = sqlPart1 + sqlPart3;
3485
3485
QgsDebugMsg ( QString ( " SQL: %1" ).arg ( encoding->toUnicode ( sql ) ) );
3486
- subsetLayer = GDALDatasetExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3486
+ subsetLayer = OGR_DS_ExecuteSQL ( ds, sql.constData (), nullptr , nullptr );
3487
3487
origFidAddAttempted = false ;
3488
3488
}
3489
3489
}
0 commit comments