mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Fixed SQL escaping.
This commit is contained in:
@@ -45,9 +45,9 @@ TomahawkSqlQuery::TomahawkSqlQuery( const QSqlDatabase& db )
|
||||
|
||||
|
||||
QString
|
||||
TomahawkSqlQuery::escape( const QString& identifier, QSqlDriver::IdentifierType type )
|
||||
TomahawkSqlQuery::escape( QString identifier )
|
||||
{
|
||||
return Database::instance()->impl()->database().driver()->escapeIdentifier( identifier, type );
|
||||
return identifier.replace( "'", "''" );
|
||||
}
|
||||
|
||||
|
||||
|
@@ -33,7 +33,7 @@ public:
|
||||
TomahawkSqlQuery();
|
||||
TomahawkSqlQuery( const QSqlDatabase& db );
|
||||
|
||||
static QString escape( const QString& identifier, QSqlDriver::IdentifierType type = QSqlDriver::FieldName );
|
||||
static QString escape( QString identifier );
|
||||
|
||||
bool exec( const QString& query );
|
||||
bool exec();
|
||||
|
Reference in New Issue
Block a user