Support schemata other than main in the Browse Data tab

Similar to commit 44eb2d4f99 this commit
makes use of the backend code improvements introduced in commit
532fcd3f6b.

It adds support for database schemata other than "main" to the Browse
Data tab. With this it's possible again to browse and edit data of
temporary tables using the Browse Data tab. This time, however, they are
separated logically from "main" tables. So handling temporary tables
should be a lot less error prone now, plus it's easier to tell for the
user what tables goes in what schema.

This commit changes the project file format. There is some code included
which allows loading of project files in the old format. However,
project files generated using versions after this commit can't be loaded
by older versions of DB4S.
This commit is contained in:
Martin Kleusberg
2017-09-04 12:27:52 +02:00
parent 1a3e3d3c40
commit ea1659e1d0
10 changed files with 107 additions and 58 deletions

View File

@@ -433,7 +433,9 @@ void ExtendedTableWidget::cellClicked(const QModelIndex& index)
sqlb::ForeignKeyClause fk = m->getForeignKeyClause(index.column()-1);
if(fk.isSet())
emit foreignKeyClicked(fk.table(), fk.columns().size() ? fk.columns().at(0) : "", m->data(index, Qt::EditRole).toByteArray());
emit foreignKeyClicked(sqlb::ObjectIdentifier(m->currentTableName().schema(), fk.table()),
fk.columns().size() ? fk.columns().at(0) : "",
m->data(index, Qt::EditRole).toByteArray());
}
}