From d9aa870e5d509cc7309ab82dd102a937ab58613a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Thu, 9 Feb 2017 04:36:04 -0500 Subject: Imported Upstream version 3.1.1+dfsg1 --- SQLiteStudio3/coreSQLiteStudio/common/table.cpp | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'SQLiteStudio3/coreSQLiteStudio/common/table.cpp') diff --git a/SQLiteStudio3/coreSQLiteStudio/common/table.cpp b/SQLiteStudio3/coreSQLiteStudio/common/table.cpp index a9b0f16..20a9864 100644 --- a/SQLiteStudio3/coreSQLiteStudio/common/table.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/common/table.cpp @@ -90,3 +90,33 @@ int qHash(AliasedTable table) { return qHash(table.getDatabase() + "." + table.getTable() + " " + table.getTableAlias()); } + +DbAndTable::DbAndTable() : + Table() +{ +} + +DbAndTable::DbAndTable(Db *db, const QString &database, const QString &table) : + Table(database, table), db(db) +{ +} + +DbAndTable::DbAndTable(const DbAndTable &other) : + Table(other), db(other.db) +{ +} + +int DbAndTable::operator ==(const DbAndTable &other) const +{ + return other.database == this->database && other.table == this->table && other.db == this->db; +} + +Db *DbAndTable::getDb() const +{ + return db; +} + +void DbAndTable::setDb(Db *value) +{ + db = value; +} -- cgit v1.2.3