unknown
d2c0452e2c
fix the windows build
2013-03-24 23:40:13 +02:00
Peinthor Rene
be239d0f05
make the empty insert statement work in pk + not null situations
2013-03-24 21:53:01 +01:00
Peinthor Rene
ec650b0024
forgot to update the error message of add record
2013-03-24 21:44:22 +01:00
Peinthor Rene
fdb3e51827
show why we couldn't update the record
2013-03-24 21:36:51 +01:00
Peinthor Rene
7eb385b28d
remove the defaultnewdata setting
...
it is useless now
2013-03-24 21:27:36 +01:00
Peinthor Rene
d7d6a861b2
Rework the kinda broken add record button
...
Now it should always be possible to add a new record,
no matter how the table is defined or what the new data default is.
The default new data setting will be removed in the next commit.
2013-03-24 21:26:01 +01:00
Peinthor Rene
d08f57c772
add a bit of documentation sqlb::Table::sql()
2013-03-24 21:22:07 +01:00
Peinthor Rene
0d601c03f1
add emptyinsertstm function to table object
...
creates an empty insert statement for the table fields
2013-03-24 21:20:49 +01:00
Peinthor Rene
c4f09765b3
add columns if modifying tables
2013-03-24 13:02:27 +01:00
Peinthor Rene
efef0cc5ac
rename createColumn to addColumn
...
and make it work with the new sqltypes
2013-03-24 13:01:58 +01:00
Peinthor Rene
35449e7c1a
rework the dropcolumn function
...
it now uses the sqlb::Table object preserving:
not null, default value, check constraint
2013-03-22 15:56:07 +01:00
Peinthor Rene
f75b361581
add method to easily remove fields from table
2013-03-22 15:51:44 +01:00
Peinthor Rene
f4187521ee
improve the unittests for create table parsing
2013-03-22 15:50:26 +01:00
Peinthor Rene
ba6d51edf2
fix all warnings in the grammar and some bugs
...
literals were case sensitive so lower keywords broke parsing
2013-03-22 15:50:04 +01:00
Peinthor Rene
aa21dbdc39
add sizegrip to finddialog
2013-03-22 06:06:06 +01:00
Peinthor Rene
8f6d8213cb
replace sqlite3_prepare with _v2 calls
...
Should be ok for our usage
2013-03-22 06:06:06 +01:00
Peinthor Rene
1d23b2d5fb
Merge pull request #13 from MKleusberg/better-import
...
Better cvs import
2013-03-21 22:03:54 -07:00
Martin Kleusberg
a1e4f154dd
Allow CSV import into existing tables
...
Allow the import of CSV files into already existing tables if the number
of columns match.
2013-03-20 22:38:22 +01:00
Martin Kleusberg
0868f299af
Rewrite and simplify import SQL code
...
Rewrite the import SQL code using a similar method to the one used in
executeQuery(). This makes the code much easier to read and removes the
last remnants of that C code stolen from some demo application.
2013-03-20 22:17:36 +01:00
Peinthor Rene
0282533092
Merge pull request #12 from MKleusberg/master
...
Bugfix in executeQuery
2013-03-19 11:56:58 -07:00
Martin Kleusberg
1eaa112a27
MainWindow: Fix possible endless loop in executeQuery
...
Don't get into an endless loop when there is a syntax error in the SQL
statement to execute.
2013-03-19 19:46:56 +01:00
Peinthor Rene
e22bfb71e6
cleanup executeQuery and fix a few bugs
...
Didn't report constraint insert errors
nor any other constraint errors
2013-03-19 17:18:52 +01:00
Peinthor Rene
b47ef8f3f7
add PK and autoincrement click logic to edittabledialog
2013-03-19 17:18:52 +01:00
Peinthor Rene
51b31503fe
make the edittabledialog a bit wider so columns fit
2013-03-19 17:18:52 +01:00
Peinthor Rene
bf29ebb37c
add new field properties default value and check constraint
2013-03-19 17:18:52 +01:00
Peinthor Rene
c3e0d8782c
Fix broken table object/sqltext edit update
2013-03-19 17:18:52 +01:00
Peinthor Rene
8b8cc32c57
remove parenthesis from check constraint
2013-03-19 17:18:52 +01:00
Peinthor Rene
fc6ea39a61
don't put db in dirty mode for nested transactions
2013-03-19 17:18:52 +01:00
Peinthor Rene
5289adaab8
Remove the editfield dialog and the edit options outside of edittable dialog
2013-03-19 17:18:52 +01:00
Peinthor Rene
1b0d5a2ff9
Fix view updating after remove field in edittable dialog
...
rename the FieldList typedef to FieldVector
use a object instead of a table pointer in edittable dialog
2013-03-19 17:18:52 +01:00
Peinthor Rene
ade0914195
Merge pull request #11 from MKleusberg/master
...
Fix statement leak
2013-03-18 11:19:41 -07:00
Martin Kleusberg
5dcf08b590
Fix leak in DBBrowserDB::updateRecord()
...
Fix a possible leak of a SQLite statement object in case of an error in
the updateRecord() method. This also preserves the correct error message.
2013-03-18 19:02:11 +01:00
Peinthor Rene
efafe42177
Fix a transaction leak
2013-03-17 22:26:43 +01:00
Peinthor Rene
66368f8a9f
Merge pull request #10 from MKleusberg/master
...
Fix DBBrowserDB::updateRecord()
2013-03-17 13:53:28 -07:00
Martin Kleusberg
ab6fe65ec2
Merge branch 'master' of https://github.com/rp-/sqlitebrowser
2013-03-17 21:46:10 +01:00
Peinthor Rene
e128e36b3a
Merge pull request #9 from MKleusberg/improve-settings-dialog
...
Improve settings dialog
2013-03-17 12:38:41 -07:00
Martin Kleusberg
0d042045e0
Merge branch 'improve-settings-dialog'
2013-03-17 18:38:28 +01:00
Martin Kleusberg
725a14c21d
DBBrowserDB: Fix bug in updateRecord()
...
Fix a bug in the updateRecord() method that made it impossible to update
INT columns.
2013-03-17 18:35:08 +01:00
Martin Kleusberg
abb1c2af3e
Remove the defaulttext settings field
...
Remove the settings field for setting the default text. It's not used at
all and I honestly have no idea what it could be useful for.
2013-03-17 16:14:37 +01:00
Martin Kleusberg
2165e544a2
Move all settings logic to the preferences dialog
...
Read and write the settings only from the preferences dialog.
Remove all the copies of some settings which were stored in nearly every
dialog class individually.
Simplify the settings dialog code by removing all those not really
needed slots.
2013-03-17 16:09:28 +01:00
Peinthor Rene
066356e5eb
Merge pull request #8 from MKleusberg/add-blob-support
...
Add blob support
2013-03-17 05:17:42 -07:00
Martin Kleusberg
57f4d996ca
EditDialog: Don't update the DB when no changes were made
...
Even when clicking the OK button don't write to the database when no
changes were made.
2013-03-17 13:07:57 +01:00
Martin Kleusberg
66b1a62fa4
Better image file handling in EditDialog
...
Put the image editor into a scrollarea so the dialog doesn't screw up
when importing a large image file.
When importing a file add a filter to the file dialog to only show image
files.
2013-03-17 13:02:49 +01:00
Martin Kleusberg
67c141c192
Fix minor UI issues with blob editing
...
By default, use the overwrite mode in the hex edit widget. This way text
and hex editor start in the same mode, making it less confusing to press
the INS key to change the mode.
When editing the data using the hex editor also update the text editor.
2013-03-17 12:39:17 +01:00
Martin Kleusberg
a8af5a7c04
Use static linking for QHexEdit
...
Compile and link the QHexEdit as a static library.
2013-03-17 12:31:23 +01:00
Martin Kleusberg
42fdbd326c
Remove BLOB ToDo from the readme file
...
The most important commit in this branch...
2013-03-17 02:55:47 +01:00
Martin Kleusberg
b5bade6d52
Allow user to switch between text and hex editor
...
Allow the user to change between the text editor and the hex editor.
Allow the user to change between insert and overwrite mode in both
editors.
This makes it possible to enter any binary data into an empty cell.
2013-03-17 02:54:07 +01:00
Martin Kleusberg
15f685a1eb
Simplify EditDialog code and improve the new multiple editor feature
...
Remove quite a bit of old code from the EditDialog.
Fix various smaller issues with the multiple editors added in the last
commit.
2013-03-17 02:29:45 +01:00
Martin Kleusberg
b88fd9316e
Use different editors in EditDialog depending on the data type
...
Only show the old text edit widget when there is actually a text to be
edited. If the data is a image file show the image instead of some
random garbage. If it is some other binary data show the hex editor.
2013-03-17 02:11:12 +01:00
Martin Kleusberg
6c8712d804
Change the internal data type for cell contents to a binary type
...
Store the data of a DB cell in a QByteArray, i.e. a binary data type,
instead of putting it in a QString, thus converting it to a UTF8 string.
Rewrite the reading and writing of DB cells to correctly handle binary
data containing 0x00 bytes.
Change the edit dialog to actually do all the data checks etc. on a
currently invisible QHexEdit widget instead of a QTextEdit.
All these changes combined make it possible to actually store binary
data without it being corrupted. You can for example import pictures
now, export them and actually open the exported file. So this is an
improvement.
2013-03-17 01:38:48 +01:00