mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Fixed SQL escaping.
This commit is contained in:
parent
89cd75a2ed
commit
9849a8ee58
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user