File indexing completed on 2025-01-05 04:26:49

0001 /*
0002  * Replacement fot QT Bindings that were removed from QT5
0003  * Copyright (C) 2020  Pedro de Carvalho Gomes <pedrogomes81@gmail.com>
0004  *
0005  * This program is free software: you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation, either version 3 of the License, or
0008  * (at your option) any later version.
0009  *
0010  * This program is distributed in the hope that it will be useful,
0011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0013  * GNU General Public License for more details.
0014  *
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0017  */
0018 
0019 #include "SqlSqlQuery.h"
0020 
0021 #include <QVariant>
0022 
0023 using namespace QtBindings::Sql;
0024 
0025 SqlQuery::SqlQuery(QSqlResult *r) : QSqlQuery(r)
0026 {
0027 }
0028 
0029 SqlQuery::SqlQuery(const QString &query, QSqlDatabase db) : QSqlQuery(query, db)
0030 {
0031 }
0032 
0033 SqlQuery::SqlQuery(QSqlDatabase db) : QSqlQuery(db)
0034 {
0035 }
0036 
0037 SqlQuery::SqlQuery(const QSqlQuery &other) : QSqlQuery(other)
0038 {
0039 }
0040 
0041 SqlQuery::SqlQuery(const SqlQuery &other) : QObject(), QSqlQuery(other)
0042 {
0043 }
0044 
0045 void SqlQuery::addBindValue(const QVariant &val, QSql::ParamType type)
0046 {
0047     QSqlQuery::addBindValue(val, type);
0048 }
0049 
0050 int SqlQuery::at() const
0051 {
0052     return QSqlQuery::at();
0053 }
0054 
0055 void
0056 SqlQuery::bindValue(const QString &placeholder, const QVariant &val, QSql::ParamType type)
0057 {
0058     QSqlQuery::bindValue(placeholder, val, type);
0059 }
0060 
0061 void SqlQuery::bindValue(int pos, const QVariant &val, QSql::ParamType type)
0062 {
0063     QSqlQuery::bindValue(pos, val, type);
0064 }
0065 
0066 QVariant SqlQuery::boundValue(const QString &placeholder) const
0067 {
0068     return QSqlQuery::boundValue(placeholder);
0069 }
0070 
0071 QVariant SqlQuery::boundValue(int pos) const
0072 {
0073     return QSqlQuery::boundValue(pos);
0074 }
0075 
0076 void SqlQuery::clear()
0077 {
0078     QSqlQuery::clear();
0079 }
0080 
0081 const QSqlDriver *SqlQuery::driver() const
0082 {
0083     return QSqlQuery::driver();
0084 }
0085 
0086 bool SqlQuery::exec()
0087 {
0088     return QSqlQuery::exec();
0089 }
0090 
0091 bool SqlQuery::execBatch(QSqlQuery::BatchExecutionMode mode)
0092 {
0093     return QSqlQuery::execBatch(mode);
0094 }
0095 
0096 bool SqlQuery::exec(const QString &query)
0097 {
0098     return QSqlQuery::exec(query);
0099 }
0100 
0101 QString SqlQuery::executedQuery() const
0102 {
0103     return QSqlQuery::executedQuery();
0104 }
0105 
0106 void SqlQuery::finish()
0107 {
0108     QSqlQuery::finish();
0109 }
0110 
0111 bool SqlQuery::first()
0112 {
0113     return QSqlQuery::first();
0114 }
0115 
0116 bool SqlQuery::isActive() const
0117 {
0118     return QSqlQuery::isActive();
0119 }
0120 
0121 bool SqlQuery::isForwardOnly() const
0122 {
0123     return QSqlQuery::isForwardOnly();
0124 }
0125 
0126 bool SqlQuery::isNull(const QString &name) const
0127 {
0128     return QSqlQuery::isNull(name);
0129 }
0130 
0131 bool SqlQuery::isNull(int field) const
0132 {
0133     return QSqlQuery::isNull(field);
0134 }
0135 
0136 bool SqlQuery::isSelect() const
0137 {
0138     return QSqlQuery::isSelect();
0139 }
0140 
0141 bool SqlQuery::isValid() const
0142 {
0143     return QSqlQuery::isValid();
0144 }
0145 
0146 bool SqlQuery::last()
0147 {
0148     return QSqlQuery::last();
0149 }
0150 
0151 QSqlError SqlQuery::lastError() const
0152 {
0153     return QSqlQuery::lastError();
0154 }
0155 
0156 QVariant SqlQuery::lastInsertId() const
0157 {
0158     return QSqlQuery::lastInsertId();
0159 }
0160 
0161 QString SqlQuery::lastQuery() const
0162 {
0163     return QSqlQuery::lastQuery();
0164 }
0165 
0166 bool SqlQuery::next()
0167 {
0168     return QSqlQuery::next();
0169 }
0170 
0171 bool SqlQuery::nextResult()
0172 {
0173     return QSqlQuery::nextResult();
0174 }
0175 
0176 QSql::NumericalPrecisionPolicy SqlQuery::numericalPrecisionPolicy() const
0177 {
0178     return QSqlQuery::numericalPrecisionPolicy();
0179 }
0180 
0181 int SqlQuery::numRowsAffected() const
0182 {
0183     return QSqlQuery::numRowsAffected();
0184 }
0185 
0186 bool SqlQuery::prepare(const QString &query)
0187 {
0188     return QSqlQuery::prepare(query);
0189 }
0190 
0191 bool SqlQuery::previous()
0192 {
0193     return QSqlQuery::previous();
0194 }
0195 
0196 QMap<QString, QVariant> SqlQuery::boundValues() const
0197 {
0198     return QSqlQuery::boundValues();
0199 }
0200 
0201 QSqlRecord SqlQuery::record() const
0202 {
0203     return QSqlQuery::record();
0204 }
0205 
0206 const QSqlResult *SqlQuery::result() const
0207 {
0208     return QSqlQuery::result();
0209 }
0210 
0211 bool SqlQuery::seek(int i, bool relative)
0212 {
0213     return QSqlQuery::seek(i, relative);
0214 }
0215 
0216 void SqlQuery::setForwardOnly(bool forward)
0217 {
0218     QSqlQuery::setForwardOnly(forward);
0219 }
0220 
0221 void SqlQuery::setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy)
0222 {
0223     QSqlQuery::setNumericalPrecisionPolicy(precisionPolicy);
0224 }
0225 
0226 int SqlQuery::size() const
0227 {
0228     return QSqlQuery::size();
0229 }
0230 
0231 QVariant SqlQuery::value(const QString &name) const
0232 {
0233     return QSqlQuery::value(name);
0234 }
0235 
0236 QVariant SqlQuery::value(int i) const
0237 {
0238     return QSqlQuery::value(i);
0239 }
0240 
0241 SqlQuery &SqlQuery::operator=(const SqlQuery &other)
0242 {
0243     if (this != &other) {
0244         this->QSqlQuery::operator=( other );
0245     }
0246     return *this;
0247 }