Skip to content
Permalink
Browse files

[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 11, 2017
1 parent af64734 commit f64f41a392bfd13ca6762d9c135b890dace3ec17
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/providers/ogr/qgsogrprovider.cpp
@@ -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 ) ) );

0 comments on commit f64f41a

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