Skip to content

Commit f64f41a

Browse files
committed
[ogr] Advertise boolean field support for GPKG layers
Likely other drivers also support this, so the list should be extended for these
1 parent af64734 commit f64f41a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/providers/ogr/qgsogrprovider.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,14 @@ QgsOgrProvider::QgsOgrProvider( QString const &uri )
466466
<< QgsVectorDataProvider::NativeType( tr( "Date & Time" ), QStringLiteral( "datetime" ), QVariant::DateTime );
467467
}
468468

469+
if ( mGDALDriverName == QLatin1String( "GPKG" ) )
470+
{
471+
// boolean data type - likely other drivers also support this
472+
nativeTypes
473+
<< QgsVectorDataProvider::NativeType( tr( "Boolean" ), QStringLiteral( "bool" ), QVariant::Bool, -1, -1, -1, -1 );
474+
}
475+
476+
469477
setNativeTypes( nativeTypes );
470478

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

0 commit comments

Comments
 (0)