Commit Graph

12 Commits

Author SHA1 Message Date
Martin Kleusberg
5a14e47419 Mark some more constructors as explicit 2017-10-31 12:11:03 +01:00
Martin Kleusberg
315019dd9c Improve foreign key editor when working on tables in non-main schemata
This improves commit 44eb2d4f99 by
allowing to choose tables from other schemata than "main" in the foreign
key editor in the Edit Table dialog. This still isn't perfect as only
tables from the schema of the current table should be shown but with
some care it should work for all use cases.
2017-09-04 10:20:43 +02:00
Martin Kleusberg
532fcd3f6b Add initial support for multiple database schemata
This adds initial basic support for handling different database schemata
at once to the backend code. This is still far from working properly but
shouldn't break much either - mostly because it's not really used yet in
the user interface code.
2017-09-03 13:22:21 +02:00
Martin Kleusberg
5cb308207c Fix typos in Edit Table dialog
See issue #1073.
2017-07-31 23:00:04 +02:00
Martin Kleusberg
304e179bcf Increase size of foreign key editor widgets
See issue #951.
2017-02-03 17:28:47 +01:00
Martin Kleusberg
38144bbcad Finish main part of the recent refactoring effort
This finally gets rid of the DBBrowserObject class entirely and moves
all its functionality to the newer classes in the sqlb namespace.

I'm still not entirely happy with this but at least things should be a
little more consistent now.
2017-01-23 20:59:12 +01:00
Martin Kleusberg
ebc3869627 Rename sqlb::Object::ObjectTypes enum to sqlb::Object::Types
The 'Object' parts seemed a little redundant before.
2017-01-23 13:44:36 +01:00
Martin Kleusberg
e5a79ec0fa Code refactoring
This changes the class structure in the sqlb namespace as well as the
DBBrowserObject class. The rest of the commit are changes that are
required by the modifications in sqlb and DBBrowserObject.

The idea behind this refactoring is this: we currently have the
DBBrowserObject class which holds some basic information about the
database object (name, type, SQL string, etc.). It also contains a
sqlb::Table and a sqlb::Index object. Those are used if the type of
the object is table or index and they contain a whole lot more
information on the object than the DBBrowserObject class, including the
name, the type, the SQL string, etc.

So we have a duplication here. There are two class structures for
storing the same information. This has historic reasons but other than
that there is no point in keeping it this way. With this commit I start
the work of consolidating the sqlb classes in order to get rid of the
DBBrowserObject class entirely.

This commit only starts this task, it doesn't finish it. This is why it
is a little messy here and there, but then again the old structure was a
little messy, too. We will need at least a very basic trigger and view
parser before finishing this is even possible. When this is done, I hope
the ode will be much easier to read and understand. But even in the
current state there already is some progress: we save a little bit of
memory, don't copy big objects all the time anymore, and replace a lot
of unnecessary string comparisons with integer comparisons.
2017-01-20 17:42:15 +01:00
Vladyslav Tronko
4ecb50277c Set adjustment rules for combobox within foreign key editor 2017-01-16 04:16:17 +02:00
Vladyslav Tronko
d3dde35f90 Use references for iterating through object map 2017-01-15 03:08:00 +02:00
Vladyslav
46a55bdc78 Support foreign key constraints referring to the same table (#933) 2017-01-13 20:12:02 +02:00
Vladislav Tronko
4f7473fbed Enhanced UI for creating and editing foreign keys 2017-01-13 12:59:31 +02:00