Also use this option in the AppImage workflow to make sure to actually
include the intended version of SQLite.
Note this probably only works fine on Unix-like systems.
Updated the required package list to build successfully on recent Ubuntu / Debian versions - `qt5-default` was removed in the `qtbase-opensource-src` source package in Debian's version `5.15.1+dfsg-2`.
This downloads and build SQLite from source, currently using version
3.38.5, for building the AppImage file. This way we can include a more
recent version of SQLite instead of shipping the version from Ubuntu
20.04.
See issue #3064.
If there is a record in the sqlite_sequence table for a table we want to
insert into, use that sequence value to generate the next primary key
instead of using the maximum value plus one.
See issue #3026.
This fixes indexed columns as e.g. used in primary key constraints which
are quoted using single quotes. Because you would never index a string
literal it is safe to assume that text in single quotes actually is a
column identifier.
See issue #3047.
This adds a enum of table constraint types to the Edit Table dialog
instead of reusing the enum provided by the sqlb::Constraint class. This
way changes to the sqlb namespace do not affect the Edit Table dialog as
much and in the long term I would like to get rid of the enum in the
sqlb::Constraint class anyway.
* Include CMAKE_CURRENT_BINARY_DIR for version.h file in winapp.rc.
Because version.h is now generated by cmake and put in build dir.
* Quote default BUILD_VERSION value, else windres shows syntax error.
This is a long overdue continuation of some previous refactoring effort.
Before this we used to store the columns a table constraint belongs to
within the constraint object itself. So for example, a foreign key
constraint object would store the referencing as well as the referenced
column names. While initially simple, this approach has the downside of
duplicating certain data, thus breaking ownership and complicating
matters later on. This becomes obvious when renaming the referencing
column. The column name clearly is a feature of the table but in the
previous approach it also needs to be changed in the foreign key object
as well as in any other constraint for this field even though the
constraint itself has not been touched. This illustrates how a
constraint is not only a property of a table but the field names (a
property of the table) are also a property of the constraint, creating a
circular ownership. This makes the code hard to maintain. It also
invalidates references to constraints in the program needlessly, e.g.
when only changing a column name.
With this commit the column names are removed from the constraint types.
Instead they are now solely a property of the table. This, however,
raised another issue. For unique constraints and primary keys it is
possible to use expressions and/or sorted keys whereas for foreign keys
this is not possible. Additionally check constraints have no columns at
all. So when not storing the used columns inside the constraint objects
we need to have different storage types for each of them. So in a second
step this commit moves the code from a single data structure for storing
all table constraints to three data structures, one for PK and unique,
one for foreign keys, and one for check constraints.
By doing all this, this commit also changes the interface for handling
quite a bit. The new interface tends to use more explicit types which
makes the usage code easier to read.
Please note that this is still far from finished. But future development
on this should be a lot easier now.
Clean some bad (deprecated) SVG properties, so Qt stop complaints
:/icons/foreground_color:1:1594: Could not parse node: radialGradient
:/icons/foreground_color:1:2684: Could not resolve property: #h
:/icons/background_color:61:31: Could not parse node: radialGradient
:/icons/background_color:86:6: Could not resolve property: #white
Now SqliteTableModel::finishedFetch is active only for row count.
SqlExecutionArea should display proper value for "row count", not
"Prefetch Block Size" when "actual row count" > "Prefetch Block Size"
This should fix#2595
Because the header of the rowid column would be "Field1,Field2" in the
case of a table with multiple foreign key columns and there is no field
with that name in the table, the application crashed when not checking
for unknown field names.
This restores the original state of each of the SQL "tabs". If the tab was
opened without a file, the content is saved in the project file itself
(unmodified); when the tab was opened from a file, the reference to the
file is stored in the project file and the contents are restored from
that disk file when loading the project.
See issues #2834, #2972, #2959
I think we tried this approach before and decided to always show the
numbers to give a hint to the user that it is possible to sort by
multiple columns. But it does look kind of odd this way because it makes
you look for another sorted column.
See issue #2913.
When performing certain actions like opening a database file the keyword
list for the auto completion of the SQL text editor gets updated. This
was not only done in a very inefficient manner however but also the list
of keywords was not cleared before adding them again. This wastes memory
and makes the editor even more inefficient.