mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Fixed SQL escaping.
This commit is contained in:
@@ -45,9 +45,9 @@ TomahawkSqlQuery::TomahawkSqlQuery( const QSqlDatabase& db )
|
|||||||
|
|
||||||
|
|
||||||
QString
|
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();
|
||||||
TomahawkSqlQuery( const QSqlDatabase& db );
|
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( const QString& query );
|
||||||
bool exec();
|
bool exec();
|
||||||
|
Reference in New Issue
Block a user