From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp | 336 ++++++++++++++++++++++++ 1 file changed, 336 insertions(+) create mode 100644 SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp (limited to 'SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp') diff --git a/SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp b/SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp new file mode 100644 index 0000000..e4810a1 --- /dev/null +++ b/SQLiteStudio3/coreSQLiteStudio/db/invaliddb.cpp @@ -0,0 +1,336 @@ +#include "invaliddb.h" +#include "common/unused.h" +#include + +InvalidDb::InvalidDb(const QString& name, const QString& path, const QHash& connOptions) : + name(name), path(path), connOptions(connOptions) +{ +} + +bool InvalidDb::isOpen() +{ + return false; +} + +QString InvalidDb::getName() +{ + return name; +} + +QString InvalidDb::getPath() +{ + return path; +} + +quint8 InvalidDb::getVersion() +{ + return 0; +} + +Dialect InvalidDb::getDialect() +{ + return Dialect::Sqlite3; +} + +QString InvalidDb::getEncoding() +{ + return QString::null; +} + +QHash& InvalidDb::getConnectionOptions() +{ + return connOptions; +} + +void InvalidDb::setName(const QString& value) +{ + name = value; +} + +void InvalidDb::setPath(const QString& value) +{ + path = value; +} + +void InvalidDb::setConnectionOptions(const QHash& value) +{ + connOptions = value; +} + +void InvalidDb::setTimeout(int secs) +{ + timeout = secs; +} + +int InvalidDb::getTimeout() const +{ + return timeout; +} + +SqlQueryPtr InvalidDb::exec(const QString& query, const QList& args, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(flags); + return SqlQueryPtr(); +} + +SqlQueryPtr InvalidDb::exec(const QString& query, const QHash& args, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(flags); + return SqlQueryPtr(); +} + +SqlQueryPtr InvalidDb::exec(const QString& query, Db::Flags flags) +{ + UNUSED(query); + UNUSED(flags); + return SqlQueryPtr(); +} + +SqlQueryPtr InvalidDb::exec(const QString& query, const QVariant& arg) +{ + UNUSED(query); + UNUSED(arg); + return SqlQueryPtr(); +} + +SqlQueryPtr InvalidDb::exec(const QString& query, std::initializer_list argList) +{ + UNUSED(query); + UNUSED(argList); + return SqlQueryPtr(); +} + +SqlQueryPtr InvalidDb::exec(const QString& query, std::initializer_list > argMap) +{ + UNUSED(query); + UNUSED(argMap); + return SqlQueryPtr(); +} + +void InvalidDb::asyncExec(const QString& query, const QList& args, Db::QueryResultsHandler resultsHandler, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(resultsHandler); + UNUSED(flags); +} + +void InvalidDb::asyncExec(const QString& query, const QHash& args, Db::QueryResultsHandler resultsHandler, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(resultsHandler); + UNUSED(flags); +} + +void InvalidDb::asyncExec(const QString& query, Db::QueryResultsHandler resultsHandler, Db::Flags flags) +{ + UNUSED(query); + UNUSED(resultsHandler); + UNUSED(flags); +} + +quint32 InvalidDb::asyncExec(const QString& query, const QList& args, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(flags); + return 0; +} + +quint32 InvalidDb::asyncExec(const QString& query, const QHash& args, Db::Flags flags) +{ + UNUSED(query); + UNUSED(args); + UNUSED(flags); + return 0; +} + +quint32 InvalidDb::asyncExec(const QString& query, Db::Flags flags) +{ + UNUSED(query); + UNUSED(flags); + return 0; +} + +SqlQueryPtr InvalidDb::prepare(const QString& query) +{ + UNUSED(query); + return SqlQueryPtr(); +} + +bool InvalidDb::begin() +{ + return false; +} + +bool InvalidDb::commit() +{ + return false; +} + +bool InvalidDb::rollback() +{ + return false; +} + +void InvalidDb::asyncInterrupt() +{ +} + +bool InvalidDb::isReadable() +{ + return false; +} + +bool InvalidDb::isWritable() +{ + return false; +} + +QString InvalidDb::attach(Db* otherDb, bool silent) +{ + UNUSED(otherDb); + UNUSED(silent); + return QString::null; +} + +AttachGuard InvalidDb::guardedAttach(Db* otherDb, bool silent) +{ + UNUSED(silent); + return AttachGuard::create(this, otherDb, QString::null); +} + +void InvalidDb::detach(Db* otherDb) +{ + UNUSED(otherDb); +} + +void InvalidDb::detachAll() +{ +} + +const QHash& InvalidDb::getAttachedDatabases() +{ + return attachedDbs; +} + +QSet InvalidDb::getAllAttaches() +{ + return QSet(); +} + +QString InvalidDb::getUniqueNewObjectName(const QString& attachedDbName) +{ + UNUSED(attachedDbName); + return QString::null; +} + +QString InvalidDb::getErrorText() +{ + return QString::null; +} + +int InvalidDb::getErrorCode() +{ + return 0; +} + +QString InvalidDb::getTypeLabel() +{ + return QStringLiteral("INVALID"); +} + +bool InvalidDb::initAfterCreated() +{ + return false; +} + +bool InvalidDb::deregisterFunction(const QString& name, int argCount) +{ + UNUSED(name); + UNUSED(argCount); + return false; +} + +bool InvalidDb::registerScalarFunction(const QString& name, int argCount) +{ + UNUSED(name); + UNUSED(argCount); + return false; +} + +bool InvalidDb::registerAggregateFunction(const QString& name, int argCount) +{ + UNUSED(name); + UNUSED(argCount); + return false; +} + +bool InvalidDb::registerCollation(const QString& name) +{ + UNUSED(name); + return false; +} + +bool InvalidDb::deregisterCollation(const QString& name) +{ + UNUSED(name); + return false; +} + +bool InvalidDb::open() +{ + return false; +} + +bool InvalidDb::close() +{ + return false; +} + +bool InvalidDb::openQuiet() +{ + return false; +} + +bool InvalidDb::openForProbing() +{ + return false; +} + +bool InvalidDb::closeQuiet() +{ + return false; +} + +void InvalidDb::registerAllFunctions() +{ +} + +void InvalidDb::registerAllCollations() +{ +} +QString InvalidDb::getError() const +{ + return error; +} + +void InvalidDb::setError(const QString& value) +{ + error = value; +} + + +void InvalidDb::interrupt() +{ +} + +bool InvalidDb::isValid() const +{ + return false; +} -- cgit v1.2.3