Revision ea6e88f6
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
src/expression.cpp | ||
---|---|---|
onlyColumn = value;
|
||
}
|
||
|
||
void Expression::appendParam(const QString &key, const QVariant &value) {
|
||
this->params.insert(key, value);
|
||
void Expression::appendParam(QString key, const QVariant &value) {
|
||
this->params.insert(key.replace('.','_'), value);
|
||
}
|
||
|
||
QHash<QString, QVariant> Expression::getParams() const {
|
src/expression.h | ||
---|---|---|
bool getOnlyColumn() const;
|
||
void setOnlyColumn(bool value);
|
||
|
||
void appendParam(const QString &key, const QVariant &value);
|
||
void appendParam(QString key, const QVariant &value);
|
||
QHash<QString, QVariant> getParams() const;
|
||
void setParams(const QHash<QString, QVariant> &value);
|
||
|
src/querybuilder.cpp | ||
---|---|---|
q.bindValue(this->placeHolder(key), value);
|
||
}
|
||
|
||
QString QueryBuilder::placeHolder(const QString &key) const {
|
||
return QString(":" + key);
|
||
QString QueryBuilder::placeHolder(QString key) const {
|
||
return QString(":" + key.replace('.', '_'));
|
||
}
|
||
|
||
QString QueryBuilder::where(const QHash<QString, QVariant> &m,
|
src/querybuilder.h | ||
---|---|---|
QString transformTypeToAbstractDbType(QString typeName) const;
|
||
QString transformAbstractTypeToRealDbType(QString typeName) const;
|
||
QString getColumnType(const QString &type) const;
|
||
virtual QString placeHolder(const QString &key) const;
|
||
virtual QString placeHolder(QString key) const;
|
||
void bindValues(const QHash<QString, QVariant> &h, QSqlQuery &q,
|
||
bool ignoreID = false, const QString &primaryKey = QStringLiteral("id")) const;
|
||
void bindValue(const QString &key, const QVariant &value, QSqlQuery &q) const;
|
Auch abrufbar als: Unified diff
fix