Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[ogr] Advertise boolean field support for GPKG layers
Likely other drivers also support this, so the list should be
extended for these
  • Loading branch information
nyalldawson committed Dec 12, 2017
1 parent af64734 commit f64f41a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -466,6 +466,14 @@ QgsOgrProvider::QgsOgrProvider( QString const &uri )
<< QgsVectorDataProvider::NativeType( tr( "Date & Time" ), QStringLiteral( "datetime" ), QVariant::DateTime );
}

if ( mGDALDriverName == QLatin1String( "GPKG" ) )
{
// boolean data type - likely other drivers also support this
nativeTypes
<< QgsVectorDataProvider::NativeType( tr( "Boolean" ), QStringLiteral( "bool" ), QVariant::Bool, -1, -1, -1, -1 );
}


setNativeTypes( nativeTypes );

QgsOgrConnPool::instance()->ref( QgsOgrProviderUtils::connectionPoolId( dataSourceUri( true ) ) );
Expand Down

0 comments on commit f64f41a

Please sign in to comment.