mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-04-26 14:39:01 -05:00
Add better handling of multiple schemata in the Database Structure tab
Commit 532fcd3f6b added support for
multiple database schemata to the backend code. While doing this, it
removed support for showing temporary database objects in the user
interface.
This functionally is partially reimplemented by this commit. With this
commit temporary database objects are shown in the Database Structure
tab and in the Db Structure dock. Unlike before however, they are
visually separated from 'normal' database objects. Also this commit
tries to make use of the new schema handling code wherever possible to
also separate temporary objects programatically from the normal ones.
This wasn't done in earlier versions and effectively was a source of
all sorts of errors.
This commit still lacks support for temporary tables in the foreign key
editor and in the Browse Data tab. Also a substantial amount of testing
is still required.
This commit is contained in:
+11
-1
@@ -29,11 +29,21 @@ public:
|
||||
QMimeData* mimeData(const QModelIndexList& indices) const;
|
||||
bool dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent);
|
||||
|
||||
enum Columns
|
||||
{
|
||||
ColumnName,
|
||||
ColumnObjectType,
|
||||
ColumnDataType,
|
||||
ColumnSQL,
|
||||
ColumnSchema,
|
||||
};
|
||||
|
||||
private:
|
||||
QTreeWidgetItem* rootItem;
|
||||
DBBrowserDB& m_db;
|
||||
|
||||
QTreeWidgetItem* addNode(QTreeWidgetItem* parent, const sqlb::ObjectPtr& object);
|
||||
void buildTree(QTreeWidgetItem* parent, QTreeWidgetItem* browsables, const QString& schema);
|
||||
QTreeWidgetItem* addNode(QTreeWidgetItem* parent, const sqlb::ObjectPtr& object, const QString& schema);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user