Skip to content
Permalink
Browse files

support strange mysql quoting

  • Loading branch information
jef-n committed Jan 30, 2012
1 parent cbef41c commit 93266acaf53fee9ac9a03c091a1ca7056d7912a0
Showing with 13 additions and 4 deletions.
  1. +13 −4 src/providers/ogr/qgsogrprovider.cpp
@@ -2241,10 +2241,19 @@ QVariant QgsOgrProvider::maximumValue( int index )

QString QgsOgrProvider::quotedIdentifier( QString field )
{
field.replace( '\\', "\\\\" );
field.replace( '"', "\\\"" );
field.replace( "'", "\\'" );
return field.prepend( "\"" ).append( "\"" );
if ( ogrDriverName == "MySQL" )
{
field.replace( '\\', "\\\\" );
field.replace( "`", "``" );
return field.prepend( "`" ).append( "`" );
}
else
{
field.replace( '\\', "\\\\" );
field.replace( '"', "\\\"" );
field.replace( "'", "\\'" );
return field.prepend( "\"" ).append( "\"" );
}
}

bool QgsOgrProvider::syncToDisc()

0 comments on commit 93266ac

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