122 Commits

Author SHA1 Message Date
f411f36f32 Force repainting columns list after modifying some index. Ensures key icons on column nodes are displayed immediately. 2010-03-16 18:20:38 +00:00
fc31018600 Display key icons in data grid column headers 2010-03-14 12:22:05 +00:00
d35815de77 Code cosmetic: rename showstatus to ShowStatusMsg 2010-03-08 23:21:34 +00:00
bc487d089c Avoid AVs when index lists are in editing mode and user clicks "Remove" or "Clear" button. Fixes issue #1733. 2010-03-02 23:23:02 +00:00
243b9bbe17 Item caption for "Add to index" > [Primary Key] should always be "PRIMARY", not a custom name. Fixes issue #1726. 2010-02-26 22:58:10 +00:00
14e03d9647 Also don't quote default values of a float type column, same as for integers. 2010-02-17 00:23:38 +00:00
e045cb3d76 Delphi 2010 has PNG + alpha channel support in TImageList, so we don't need PNGcomponents any longer. 2010-02-08 00:36:17 +00:00
17c27c8b58 Add pink icon for foreign key columns. Fixes issue #1669. 2010-02-07 12:31:09 +00:00
9192543d8c Auto create pretty foreign key name "FK_thistable_reftable" if it was not customized yet. Fixes issue #1671. 2010-02-07 12:14:22 +00:00
3195b25e8f Only display tables in reference table pulldown of foreign key editor. Stored procedures or triggers cannot be applied here. Fixes issue #1668. 2010-02-07 11:37:01 +00:00
64d3d1447e Foreign key editor needs to be repainted when selecting another table. Fixes issue #1667. 2010-02-07 10:45:43 +00:00
fc6d4c2a48 Try to fix most DPI related glitches. Especially TFrames need a ScaleBy() call, which is done automatically on TForms. Fixes issue #1656. 2010-02-04 23:50:47 +00:00
91d53bbbcc Replace default value in object editors by ghosted hint text 2010-02-03 22:18:28 +00:00
81a7596bc1 When foreign key tab is active with a MyISAM table, switching to a InnoDB table did not activate the controls. Fixes issue #1642. 2010-02-02 00:15:04 +00:00
97ce23ee1f Add support for indexes using BTREE/RTREE/HASH algorithm. Make that visible in a new, 3rd column in the index tree. Fixes issue #1576. 2010-01-22 10:21:27 +00:00
a0a1ed24c2 If the first column with the number of the column has too less width, sometimes it's not clear that the user can resize it to show its whole text. This change adds an auto-resize mechanism, which is fired after any node structure was changed. Fixes issue #1609. 2010-01-18 08:22:18 +00:00
1f39e59940 Disable non working column default values for given data type. Fixes issue #1519. 2010-01-17 16:12:35 +00:00
c85ed71ba0 If user disables "Allow NULL" for some column which has NULL as default value, silently change that default value to "No default", instead of "Custom text". Additionally, this fixes the default text "NULL" as literal in such cases. 2010-01-17 15:23:11 +00:00
8ba9fb7b77 Allow space bar to modify checkbox columns "Allow NULL" and "Unsigned". Fixes issue #1605 2010-01-17 10:20:08 +00:00
5c29403c7b Auto-fix user selected, non working default value/type when data type has changed. Fixes issue #1411. 2010-01-17 07:43:14 +00:00
9080ad7607 No need to use the Wide* version of string functions any longer. 2010-01-15 20:28:48 +00:00
d70ea85786 Ask user if in-memory modifications to table, view, trigger or routine should get saved, this time including a Cancel button, which cancels either
* focusing a different object in database tree and/or
* closing application
TODO: Internal switching to different connection probably needs that too?
2010-01-15 17:13:24 +00:00
52ea8f410a Use Unicode enabled TStringList instead of TWideStringList in all places. Should have no visible effect, apart from a very minor performance optimization, as String reference pointers are handled by Delphi, WideString by Windows. 2010-01-14 19:41:58 +00:00
25ac096554 Make more use of Generics, this time for columns, keys and foreigne keys lists, used by main unit and table editor. Frees code from annoying casting and makes it more type safe. 2010-01-08 00:30:51 +00:00
c2883e0f3d Don't display quotes around default values for numeric columns, so it's more clear what the server will insert by default. 2010-01-07 23:04:55 +00:00
a4652d39a4 * Fix compiler warnings due to implicit AnsiString to (Unicode)String or vice versa
* Remove workaround for Unicode text to and from clipboard
* Fix writing/reading wrong encoded text into/from registry - no need to use Utf8Encode() any longer
* Implement TMySQLQuery.ColAsAnsi() for cases in which we read binary data.
2010-01-07 00:00:56 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
eb9915d5be Invalidate columns and keys of an edited table when pressing the "Save" button, to avoid SQL errors when switching to "Data" tab. Fixes issue #1556 2009-12-22 23:38:38 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
d92a7d4394 Indicate ON UPDATE clause in table editor's column list. Fixes issue #1545. 2009-12-21 12:42:16 +00:00
35e8bbb304 Do not fetch database objects from information_schema, which has gotten extremely slow on servers with many databases and triggers, since we support triggers.
* Instead, use separate SHOW commands for tables, functions, procedures and triggers
* Catch this chance to move these methods from main unit to mysql_connection, so they're accessible in a more generic way
* Additionally, introduce new classes TDBObject and TDBObjectList which provide a more generic way than TMySQLQuery to access these database objects.
Fixes issue #1529
2009-12-19 11:40:28 +00:00
27ebadce95 Work around unassigned menu variable. Fixes issue #1536. 2009-12-15 23:02:46 +00:00
d100a9f029 Add <Select All> and <Copy> menu items to SQL code memos. Fixes issue #1530. 2009-12-15 00:37:54 +00:00
03d7052d78 Fix ALTER code for modified index names, and added + deleted indexes. Fixes issue #1533. 2009-12-15 00:25:46 +00:00
0d81ddde51 Invalidate CREATE and ALTER code in table editor one more time. Fixes issue #1532. 2009-12-15 00:07:12 +00:00
dd398bb101 * Factor more code out of each database object editors into parent TDBObjectEditor.
* Use this chance to add a confirmation dialog when leaving the editors, to ask the user if he wants to save modifications. Fixes issue #1524.
* Also, enhance Mainform.RefreshTreeDB in a way that it does not trigger the OnFocusChange event. Important for the editors when saving changes.
2009-12-14 23:55:36 +00:00
cbedf0d163 Fix enabled save button in table editor before anything was changed. 2009-12-13 15:01:22 +00:00
8520f97fff Hack editor class descendants so that Delphi sees them as TFrame subclasses instead of TDBObjectEditor. Works around Delphi bug 73397 - see http://qc.embarcadero.com/wc/qcmain.aspx?d=73397 2009-12-13 14:29:18 +00:00
8670cdba97 Consistently use "Enter xyz name" as default text for new database objects 2009-12-13 07:44:01 +00:00
3aef5bb5e5 Unify Init() method of database object editors. 2009-12-13 07:32:46 +00:00
2dcf02feb3 Implement a parent class for all database object editors (table, view, routine, trigger) and let these editors derive from this class. Could simplify code in the future. 2009-12-11 18:20:16 +00:00
1de8e6344b Fix SQL error in table editor on MySQL below 4.0.18: Use TYPE instead of ENGINE in these cases. Fixes issue #1517 2009-12-09 18:12:45 +00:00
7a8477c57f VirtualStringTree.InsertNode internally calls .DoCancelEdit, which is not what we want when the user clicks the "Add column" button while editing another column. Instead, explicitly call .EndEditNode before .InsertNode. Fixes issue #1508. 2009-12-07 20:00:35 +00:00
400f4dd040 Indicate "No default" for a column in table editor. Fixes issue #1510. 2009-12-06 20:12:21 +00:00
43fe695bc1 Make SHOW KEYS FROM <selected-table> and SHOW COLUMNS FROM <selected-table> superfluous. To achieve that, move parser for SHOW CREATE TABLE string from table editor to helpers unit, where it can be called by everyone. For consistency reasons the index list in table editor is converted from a TWideStringList to a TObjectList, like both table and foreign key list. However, that results in a large diff here. 2009-12-04 21:20:06 +00:00
8ac6fbd15c There is no 64 bit unsigned integer type in Delphi, but MySQL has it: bigint unsigned. Handle these as strings in the table editor. Fixes issue #1489. 2009-11-29 00:18:20 +00:00
92bd620309 Introduce caching of collation table and table engines list in connection layer. Remove that stuff from main unit and automatically clear cached stuff on disconnection. 2009-11-22 23:42:39 +00:00
45fa64fe81 Wrap most queries in a try..except block which may fail with a SQL privilege error. So these places do not raise an exception at user level. Exceptions should only raise in unpredictable error situations. Important for reactivating the MadExcept dialog. 2009-11-22 18:07:53 +00:00
e1a9bb0281 Add support for sql_mode=ANSI_QUOTES in table editor. 2009-11-06 21:59:33 +00:00
c560d5a37e Do not clone collation when adding a new column. Better use the table's default collation. Fixes issue #1429. 2009-11-03 19:38:28 +00:00