Qt 4.8
Classes | Functions
qsqldriver.cpp File Reference
#include "qsqldriver.h"
#include "qdatetime.h"
#include "qsqlerror.h"
#include "qsqlfield.h"
#include "qsqlindex.h"
#include "private/qobject_p.h"

Go to the source code of this file.

Classes

class  QSqlDriverPrivate
 

Functions

static QString prepareIdentifier (const QString &identifier, QSqlDriver::IdentifierType type, const QSqlDriver *driver)
 

Function Documentation

◆ prepareIdentifier()

static QString prepareIdentifier ( const QString identifier,
QSqlDriver::IdentifierType  type,
const QSqlDriver driver 
)
static

Definition at line 52 of file qsqldriver.cpp.

Referenced by QSqlDriver::sqlStatement().

54 {
55  Q_ASSERT( driver != NULL );
56  QString ret = identifier;
57  if (!driver->isIdentifierEscaped(identifier, type)) {
58  ret = driver->escapeIdentifier(identifier, type);
59  }
60  return ret;
61 }
int type
Definition: qmetatype.cpp:239
virtual QString escapeIdentifier(const QString &identifier, IdentifierType type) const
Returns the identifier escaped according to the database rules.
Definition: qsqldriver.cpp:412
The QString class provides a Unicode character string.
Definition: qstring.h:83
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isIdentifierEscaped(const QString &identifier, IdentifierType type) const
Returns whether identifier is escaped according to the database rules.
Definition: qsqldriver.cpp:429