179 Commits

Author SHA1 Message Date
6b5c692d3b Fix formatted, signed floats with a thousands separator after the minus sign, e.g. "-,123,456.789" 2009-11-23 21:57:34 +00:00
cdb936b77d Consistently use FormatTimeNumber() also for formatting server uptime. Leave out the day portion if zero. 2009-11-23 21:24:25 +00:00
a1d0d0c0ec Prefer local formatting over raw numbers in grids:
* This time, also support formatted integers, not only floats.
* Do not quote both types in grid updates/deletes/inserts.
* Do no internal conversion from string to float and back to string (FloatToStr did that) to avoid silent data corruption. Just use strings in all places.
* Replace FloatStr() function with UnformatNumber(), which is also able to handle integers
Should fix issue #1012
2009-11-23 20:11:13 +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
f6a4748081 WinExec() is deprecated in Vista and Windows 7, even in WinXP it was only kept for compatibility to 16 bit applications. Replace these 3 calls with ShellExecute(). Fixes issue #1406. 2009-11-05 00:20:27 +00:00
9aebe487dc Remove dead code 2009-10-30 18:51:45 +00:00
12a8e2ebc5 Implement a more lightweight connection layer, consisting of 2 units in source directory. Breaks threading and window to window communication, which should be reimplemented later. 2009-10-28 00:08:49 +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
0790c125f4 Only check selected table node(s) in table tools tree, if table(s) were right clicked. Check db node if that db was right clicked. Fixes issue #1362. 2009-10-17 11:17:59 +00:00
c6be8dd575 Implement customizing of shortcuts for all available TActions and SynEditor commands. Fixes issue #536. 2009-09-21 23:12:21 +00:00
60beacc049 Implement a second tab on the table tools dialog: "Find text on server". Scans all tables with OR'd LIKE clauses for a given text. User can restrict that search to a data type category (integer, text, etc.). Fixes issue #529. 2009-09-17 23:00:29 +00:00
a7eedd3823 Table editor, "Add column" action: Pointer to added TColumn object was mixed up with an existing column. ALTER code also needs to follow the order of tree nodes. Fixes issue #1340 . 2009-09-05 09:30:49 +00:00
a2c327fd26 Find a more self-explanatory name for ResetVTNodes() 2009-09-03 22:26:40 +00:00
be2ec499f8 Refactor internal handling of columns in table editor. Replaces the multi TStringList workaround with a more readable, object oriented approach. One minor visible effect is lightning fast initializing on very huge tables with several 100 columns. Apart from that this change should not affect any visible stuff. 2009-09-03 22:18:29 +00:00
1d6ff80121 Code cosmetic:
* Move "const" + "type" fragments to a unified place.
* Use mixed case instead of all upper in a variable
* No need to format the "uses" list vertically
* Move helper InheritFont() to helpers.pas
2009-08-30 06:27:53 +00:00
6517a04eff Implement creation and editing of foreign key constraints in a separate new tab on the table editor. Fixes issue #400. 2009-08-16 20:32:37 +00:00
4cc0e67bf7 Show hints on all VirtualTree's, including table editor's columns list and index editor. 2009-08-14 18:08:27 +00:00
4ff1acf408 Refactor session manager:
* Replace the pulldown by a list to get a better overview
* Display last connected and created date in details
* Prompt user on form closing if modifications should be saved
* Remove moreorless useless image
* Remove options "timeout" and "sort database"
TODO: Display some help text on the right side when no session at all is existant to help new users.
2009-08-09 23:57:52 +00:00
7e9fcc6586 Implement multiple query tabs. Fixes issue #443. 2009-08-03 23:16:16 +00:00
4d9d5a1ff7 Enable multi row selection in table editor's column list. Relevant functions adjusted:
* Add to index
* Create index
* Remove Column(s) (=> makes the "Clear columns" button superfluous)
2009-07-26 19:45:02 +00:00
3ffeb708c1 Disable hottracking in non-Vista mode, looks ugly in XP but nice in Vista. Fixes issue #1263 . 2009-07-25 12:40:25 +00:00
cd1000c601 The popup text editor is only called within the InplaceEditor. So it doesn't seem to have some advantage any longer to have an abstract base class for the memo and binary editor. 2009-07-21 06:03:30 +00:00
d26d93aefa Sanitize MySQL structure unit:
* Remove old, unused code (TMysqlIndex, TMysqlField)
* Move relevant code from helpers to mysql_structures unit
* Rename various stuff to more compact names
* Use ordinal values instead of constants for datatypes and their categories
* Replace TGridColumn.IsXYZ boolean's by a new .DatatypeCat property
2009-06-14 19:45:48 +00:00
1b8301c64e Avoid AV in StrToFloat when strings with multiple commas are passed to MakeFloat. Fixes issue #1217: Trying to change sql_mode variable gives a floating point error 2009-06-11 06:41:47 +00:00
f01893d08a Experimental: Reintroduce table tab, this time by placing the existing editors for tables, views and routines as TFrames onto that tab. Unfortunately a whole bunch of GUI changes involved here which makes the diff unreadable. Should solve issue #1149 . 2009-06-04 12:56:55 +00:00
20e21f6cc4 Try to fix issue #1127 and issue #1131 (handling float numbers in grids). Do not convert them back and forth using MakeFloat + FormatFloat. Breaks rfe #1012 and r2320 . FloatField.AsString returns an exponent number in various cases which is compatible between MySQL and Delphi. Only those exponent numbers must not be quoted in an SQL sentence - which fixes this commit. 2009-05-16 18:13:56 +00:00
7f32b33505 Issue #436: Implement a new table editor dialog. Nukes both create + alter table dialogs. 2009-05-12 22:24:09 +00:00
eadeed1ae2 Use helper methods where possible, and leave GUI stuff in form units. 2009-04-28 22:35:00 +00:00
d25e271591 Detect and process NUL characters before giving loaded SQL to SynEdit. Works around issue #1093. 2009-04-28 21:16:18 +00:00
a827f68509 Work around for issue #1097: Text editor mangles text containing NUL. Pops up a warning if text contains one or more #0 chars and removes all of them for editing. 2009-04-25 18:08:31 +00:00
5687b8d7bf Extend detection of irregular linebreaks into a more informative method, now detecting various (non)consistent linebreaks. Related: issue #1095 and issue #1094 2009-04-21 17:06:42 +00:00
34520be50c * Update to WideString.
* Update to SynEdit (rather than MEMO) bugs.
2009-04-17 11:56:08 +00:00
51f8c54e91 Partial revert of r2369 to restore potentially useful functions. 2009-04-17 11:20:31 +00:00
c92994aa99 * Redo r2106 and r2283, fixing issue #916 and #1000.
Did not bother adding char5, char6 and char7, opted instead to run escChars() twice.  Haven't tested performance but adding the extra chars could be faster.

* Add comment explaining why these characters are escaped.
2009-04-17 01:03:53 +00:00
6ee468fb26 Revert r2106 and a similar change. Fixes issue #1092. 2009-04-16 14:33:06 +00:00
d3c505f032 Remove unused constants and code. 2009-04-05 11:54:02 +00:00
fc433bf38f Add background color feature to SQL highlighting via preferences 2009-03-31 22:57:08 +00:00
cafd2a8c16 Enhancement in preferences dialog, SQL styles:
* Use AttrCount and Attribute[x] in SynEditHighlighters to iterate through available attributes, instead of doing less with more code.
* Use integer registry values for highlighter colors (were strings) and also integers for bold, italic, underline, strikeout (was one boolean per attribute).
a) optimizes registry access b) normalizes registry names and c) simplifies code. Unfortunately this breaks everyone's customized highlighter style - hopefully ok to do this is in an interim build.
2009-03-31 22:24:00 +00:00
992e2a4236 Fix issue #953: Add checkbox to toggle bold font in SQL font preferences. Also adds italic option for all attributes. 2009-03-18 21:51:06 +00:00
dbb84e6df9 Integrate stored procedures and functions into the GUI flow, so they are visible like tables and editable from everywhere.
- FetchDbTableList now makes use of various tables in INFORMATION_SCHEMA if available - the only way of listing stored routines.
- If a routine is selected, Table + Data tab hide their grids and display a corresponding message instead. Seemed the only way to keep the normal flow of clicks, not changing too much click logic.
2009-03-02 21:40:44 +00:00
f20dad8adb Implement stored routine editor, see issue #420
Todo: make routines visible in the database tab so they can be edited.
2009-02-28 22:57:55 +00:00
edc2d538d3 Fix issue #1000: export tables - sql syntax error. Escape null characters so they don't cut a string somewhere after escChars was called. 2009-02-18 19:42:01 +00:00
0d6cada653 Finalize performance fix from r2278: Discard node data prior to calling EnsureChunkLoaded with FullWidth.
* makes it superflous to call EnsureFullWidth for any previously loaded nodes - significantly faster now
* no need to have a unique key in the selected table any longer
2009-02-16 23:15:49 +00:00
dcecedd5ba Fix poor performance in GridToXYZ actions on tables with lots of larger text columns: EnsureFullWidth called lots of mini SELECTs. Now, EnsureChunkLoaded is called with FullWidth=True in relevant places. Only already loaded data still has to be completed with EnsureFullWidth - which could be optimized by discarding all loaded data first, but then again this could result in a waste of SELECTs in taller tables. 2009-02-16 20:37:13 +00:00
26a5713c27 Performance fix: EnsureChunkLoaded should be called in a node, not cell context (which is way too often) 2009-02-16 19:51:33 +00:00
c726dddd4a Fix GridToXYZ actions for query grid - warned about a missing unique key although the query grid does no delayed loading. (Broken in r2236) 2009-02-16 19:22:46 +00:00
bfa3189188 Set focused node to the first selected one after a refresh action. Not doing this, the focused node somehow "jumps" randomly if the list was sorted. Plus: break early if the list doesn't have multiselection enabled. 2009-01-28 19:49:32 +00:00
d4368bc33b Fulfill rfe #637: Reintroduce filter history drop down. Integrated as submenu of the existing context menu in filter memo. 2009-01-25 10:35:51 +00:00
d7b49cdb1c Fix reselecting nodes after refreshing a virtualtree. Non selected nodes were selected afterwards if the list was non default sorted. Also the focused node "jumps" in these cases, which wants to be fixed somehow. 2009-01-20 22:47:38 +00:00
3a52febc38 Fix the part of bug #938 which causes an empty WHERE clause. If CheckUniqueKeyClause returns false, EnsureFullWidth can never succeed. This fix only makes sure that the user gets an informative error popup instead of the above mentioned SQL error. 2009-01-20 19:14:28 +00:00