27 Commits

Author SHA1 Message Date
b4cca2ea1f Implement handling of triggers as separate database objects, on the same level as tables, routines and views. Means we have a trigger editor frame, a new icon and various code extensions. Fixes issue #806. 2009-12-11 16:07:59 +00:00
0e29eda7ac Add preference option to use locale number format for CSV+XML+HTML exports. Mainly to work around an Excel bug, which expects float values to be formatted with locale decimal separator when pasting. Fixes issue #1459. 2009-12-08 09:14:42 +00:00
bd4dd71797 Remember state of "Stop on errors in batch mode" button/action. Fixes issue #1128. 2009-12-07 20:13:52 +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
a9ab1a1c6d Fix documentation 2009-12-01 00:32:49 +00:00
1e0f6444b8 Enhance readability of sorted columns in high contrast mode (white text on black background). Check brightness and decide for a brighter or darker background color as needed. See issue #1366. 2009-12-01 00:17:21 +00:00
0c83491ed5 Implement preference option to adjust tab width in SynMemos. Fixes issue #857. 2009-11-24 19:34:48 +00:00
ef5fbe225a Rewrite export to SQL dialog and code. Integrate that into the table tools dialog, let it use the nice checkbox tree and make exporting lighting fast.
* Fixes issue #886 (broken CREATE TABLE)
* Fixes issue #608 (full backup)
* Fixes issue #281 (export views)
* Fixes issue #307 (header in directory mode)
2009-11-16 01:24:49 +00:00
9aebe487dc Remove dead code 2009-10-30 18:51:45 +00:00
aaa02877a2 Cosmetic in project files:
* Move const.inc and compilers.inc back to main source directory
* Move remaining few lines of code from heidicomp.pas to helpers.pas
* Remove components/compilerdetection and components/heidisql
* Remove remainders of EDBImage component, unused since Aug 08.
2009-10-19 22:13:04 +00:00
22daed7044 Move include files to include directory. 2007-10-10 11:46:27 +00:00
94f1d6035f Fix compiler error in Delphi 10: Copy CSIDL_* constants from [delphi11]\source\win32\rtl\win\ShlObj.pas to const.inc to make them available also in Delphi 10. 2007-10-04 20:04:58 +00:00
ac8a9e4473 Add support for moving header columns in all 5 VirtualStringGrids and remembering their position between sessions. 2007-09-29 12:34:01 +00:00
6e9a08c12f Follow up to rev 870 and 958:
Implement an optimized and universal way to safe and restore the column visibibility of ListTables (and all other VirtualStringTrees) by merging that code with the code for the column-resizing feature.
- Drops global var ListTablesColumnNames and proc SetupListTablesHeader.
- Change + move "RestoreColumnWidths" to private "RestoreListSetup", add code from SetupListTablesHeader
- Change + move "SafeColumnWidths" to private "SafeListSetup", add code from MenuTablelistColumnsClick
- Default visible columns are (must be) set at design time now

Pro:
- RestoreListSetup is called once in FormShow, while SetupListTablesHeader was called each time in LoadDatabaseProperties.
- SafeListSetup is only called once in FormClose
- Just safes the column indexes, not the column names in registry. Makes it safe to rename columns in the future
- Less registry read/write access in general.
- Safe/RestoreListSetup open an easy way to implement further list features (column moving, etc.)
- Makes it a cakewalk to implement the same column un/hiding feature for the remaining 4 Lists.
Contra:
- people/developers who used a build from 870 to this one on will see their activated columns in ListTables reset to the default (7 first columns) because the registry key and value has changed. (but: better do that now than after an official relase)
2007-09-28 21:08:37 +00:00
4f0d2b9403 Spam registry with column widths of all 5 VirtualTrees on FormClose. Restore these values in ReadWindowOptions. Should make users happy which resize columns precisely to fit their needs. 2007-09-26 20:45:10 +00:00
a8809f4975 SQL Process: handling of DELIMITER to mimic mysql CLI 2007-09-25 02:05:38 +00:00
d69d81a4b1 Renovate "Advanced properties" dialog:
- Drop pagecontrol to access more than one selected table. Didn't seem helpful for any case, looked ugly and was a click hell to use.
- Implement changeable editors for table name, comment, engine, charset, collation and auto_increment value.
- Backward compatibility kept: A 3.23.58 server leads to disabling editors for engine, charset and collation while keeping the others working.

A table's charset and collation can now be provided at creation time and at altering time. Just as it's implemented for databases. Fullfills now most of the wishes in RFE #1693393.
2007-09-24 19:56:16 +00:00
d095fdb7cb Revamp "Advanced table properties" dialog:
- Synchronize height of all listviews after moving the splitter on one page.
- Drop maximum dimensions of form.
- Store/restore form and list dimensions via registry
- Documentation
- Simplify code
- Add useful popupmenu with items "Copy" + "Select all" to SynMemos which display the CREATE statements
- Rely on modalresult of form, drop OnClick handler of Close-button
- Format sum of table sizes using FormatByteNumber instead of always using KB as the unit of choice.
- Add a statusbar to the form to signalize that the form can be resized.
2007-09-03 13:59:29 +00:00
bab0a38fe4 MakeInt(): Correctly backconvert strings which were previously formatted by FormatByteNumber() . Fixes incorrect sorting of columns in VirtualTrees which contain some byte values. Also enables us to call FormatToByteNumber() in "Size" column of ListTables. 2007-09-02 10:05:09 +00:00
8ab0b95440 Implement a more effective solution for hiding and unhiding columns in ListColumns.
Pros:
- ShowDBProperties doesn't reset column layout
- Sort direction is remembered automatically
- Reading columnlist from registry is done once in a TMDIChild, not on each ShowDBProperties
- Hiding/unhiding columns doesn't call ShowDBProperties
- No more hassling with what is called a "default column" or not. popupDBGrid is usable like in Windows Explorer.
- Column layout is stored global, not per session.
Cons:
- Column layout from old settings logic needed to be discarded

Side effect:
- Fixes a potential AV in FormatNumber(str) with empty strings.
- Created an overloaded FormatByteNumber() which can take a string as input
2007-08-30 23:49:38 +00:00
c4f7ada3cb Paint background of sorted columns light grey. Imitates behaviour of the Windows XP Explorer and adds a clear signal to the user that the list is somehow sorted currently. 2007-08-27 20:58:33 +00:00
c436f8b905 New feature: Checkbox for sorting fieldlist alphabetically in column selection dialog. State of the checkbox is memorized in registry. 2007-08-17 23:10:11 +00:00
de5d74f295 Use new image index constants in all relevant places. 2007-08-03 17:44:57 +00:00
618d34ec3d Convert ComboboxKeys on the index-editor from a standard TCombobox to a TComboboxEx. Avoids/removes hackish code for drawing icons on items.
Also create some imageindexes constants to const.inc where they will be useful for other units.
2007-08-02 22:26:02 +00:00
6d8f8e1299 Implement a dialog/mechanism to run a SQL file directly without loading it into the query editor (= memory):
1. When user opens a file which is bigger than LOAD_SIZE (currently 5M), ask what to do
2. User can normally open the file, cancel, or use the new mechanism:
3. Load a chunk of LOAD_SIZE of SQL into memory
4. Split chunk with parseSQL into single queries
5. Run queries and go on with 3.

parseSQL is the bottleneck here, very CPU consuming, as it has to take care of different comment-styles and delimiters. So, the above strategy effected a good compromise regarding overall performance on different tests with worst case SQL files:
- "Wide" table exports with many big sized fields => long lines
- "Narrow" table exports with only one mini-sized field, extended INSERTs => short lines
Especially in the latter case it avoids to cause a hellfire of parseSQL-calls

Still seems to have some memory leaks somewhere.
2007-07-23 20:25:29 +00:00
86f01b4675 Attach server version to SQL functions and use that to hide unsupported functions in query helpers, popupQuery and SynCompletionProposal. 2007-07-06 22:07:05 +00:00
3c8f123a81 Move *.pas, *.dfm and *.inc files from root directory to a new "source" subdirectory. Leaving just the readme in the root to give all newbies a very clear and unique starting point. 2007-06-28 20:00:04 +00:00