Commit Graph

369 Commits

Author SHA1 Message Date
Martin Kleusberg
d941073c25 Make syntax highlighting configurable
Add new options to the preferences dialog to change the colours and text
styles used in the SQL syntax highlighter.
2013-03-30 15:06:26 +01:00
Peinthor Rene
340af96deb fix additional space if we have no completionPrefix 2013-03-29 14:54:25 +01:00
Peinthor Rene
ed9941ac5e proper quote field names 2013-03-29 14:50:34 +01:00
Peinthor Rene
6b7361a6d6 Fix string hilighting and add better lexer rules 2013-03-29 14:50:20 +01:00
Peinthor Rene
7614f40146 forgot a ! after var rename 2013-03-28 21:16:00 +01:00
Peinthor Rene
b36800ea02 disable editing of table data if not a new table
we currently don't support it
2013-03-28 19:00:45 +01:00
Peinthor Rene
c5399932e2 no need to set the db into dirty state
we have rollbacked/committed anyway
2013-03-28 18:52:07 +01:00
Peinthor Rene
e46d3401df remove the *brrr* goto 2013-03-28 18:47:38 +01:00
Peinthor Rene
50b160227b only revert if the db wasn't dirty before
otherwise we might have reverted pre execute query transactions
2013-03-28 10:55:09 +01:00
Peinthor Rene
16a40ed349 it's now possible to specify the restore point name 2013-03-28 10:51:09 +01:00
Peinthor Rene
13eba0f5d4 improve the fix on the broken execute query transaction
should now do the same as before, but with working rollback and commit
2013-03-27 22:44:42 +01:00
Peinthor Rene
cea4afcd04 fix broken transaction logic if executing a query 2013-03-27 22:37:28 +01:00
Peinthor Rene
7644364130 partial selects and a hotkey for execute query
show the correct queryPart
also add some thoughts of me
2013-03-27 08:12:56 +01:00
Peinthor Rene
c6d5391672 don't insert nulls into columns with a default 2013-03-25 06:41:52 +01:00
Peinthor Rene
3d6b09ddb4 kill too long lines, no functional changes 2013-03-25 06:15:27 +01:00
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