This doesn't really solve the problem, but reduces the chance
to have a nameclash with rowid, until we come up with something better
we can't fully support tables with a column name _rowid_ but that should
be very seldom
Change the window title of the toolbar to the same name it has in the
View menu as the window title actually is visible in the UI when right
clicking on the toolbar or menu.
When running a SQL statement the column widths of the result table view
are set to fit their contents automatically. However, for very long
values this makes the table hard to navigate. This is why this commit
introduces a maximum column width while still trying to fit each column
to its contents.
See issue #79, point 2.
This flag should indicate if we can fully handle this table definition
in our edit table dialog. if not we should do one of these things:
* disable the edit table dialog to modify the table
* display a warning message that modifying this table may remove constraints
* ??
All the editing in the EditTableDialog, that is the DBBrowserDB class to
be specific, messes up the current representation of the DB schema. This
is fine when the changes are actually committed by clicking the OK
button but causes confusion when the dialog is cancelled. None of the
changes are actually written to the database but the UI looks like they
are.
This closes issue #74.
Use a common format for all include guards, make sure each header file
has one and make sure it's named after the file name.
And as a random extra in this commit: Make sure the gen_version.h file
generated by cmake ends with a line break.
Closes#59.
Remove all \r characters from a table defintion when reading it. This
makes sure it doesn't appear as a invalid character in the UI.
This commit improves the displaying of EoD's database from issue #63.
Fix table definitions like this...
CREATE TABLE [player_tech_branches]
(
[from_id] INTEGER NOT NULL REFERENCES [techs](id),
[to_id] INTEGER NOT NULL REFERENCES [techs](id),
UNIQUE ([from_id], [to_id]) PRIMARY KEY ([from_id], [to_id])
)
...where there are multiple keys which are not separated by commas.
This partially fixed EoD's database in issue #63.
Fix handling of multiple primary keys followed by a conflict clause like
in thix table definition:
CREATE TABLE [explore_records]
(
[system_id] INTEGER NOT NULL REFERENCES [star_systems](id),
[player_id] INTEGER NOT NULL REFERENCES [players](id),
PRIMARY KEY ([player_id], [system_id]) ON CONFLICT ABORT
)
This partially fixes EoD's problem in issue #63.
Allow ON INSERT in foreign key clauses like this:
CREATE TABLE x
(
y INTEGER REFERENCES ref(id) ON INSERT CASCADE
)
Note that ON INSERT is allowed by SQLite but missing in the SQLite
documentation.
This partially fixes EoD's problem in issue #63.
When importing a CSV file without no quote characters no spaces were
imported. So this...
a,b b,c
...would become...
a,bb,c
Fix this by not checking for being in quote mode when not having
configured a quote char anyway.