78 Commits

Author SHA1 Message Date
8c3775fe0f Add "Save as textfile" action, and include that in routine editor > "CREATE code" tab > context menu. Fixes issue #3486. 2014-05-08 04:50:59 +00:00
25b471be0e Auto-uppercase data types of routine parameters. Fixes issue #3497. 2014-03-10 04:01:30 +00:00
fc015e61bd Let ParseRoutineStructure() cache values from IS.ROUTINES into TDBObject members. Fixes issue #3108. 2013-02-21 11:19:44 +00:00
95ab784008 Finally fix ramshackle detection of routine body. Fixes issue #3103, #3104. 2013-02-08 11:25:12 +00:00
28409cf78b Work around empty body detected in ParseRoutineBody, and get it from information_schema.ROUTINES in that case. See http://www.heidisql.com/forum.php?t=12075 . 2013-02-07 21:09:21 +00:00
39926ac729 Remove properties FFullDatatype, Connection and Datatype from TBaseGridEditorLink, for the benefit of a new property "TableColumn", which has everything we need. Using this TableColumn property, the data grid editors can now read the LengthSet attribute of the source column, which we need to read + write the microseconds part of DateTime values. Add some additional code to make editing microseconds peachy. Fixes the second part of issue #3003. 2012-12-24 13:12:25 +00:00
0dd802d13f Do not use translated words for CREATE/DROP code in routine editor:ApplyModifications. Fixes issue #3053. 2012-12-09 12:45:48 +00:00
fcc6ffee5b Follow up to r4266, issue #3051: Fix selection of the right routine type, based on the itemindex, not the combo box text. 2012-12-09 09:42:19 +00:00
3ef3092b42 Do not use translated combo box text for CREATE code, in routine editor. Fixes issue #3051. 2012-12-08 21:17:05 +00:00
f96288fce9 Translate string variables and literals in .pas files. TODO: translate constants. 2012-11-26 05:44:01 +00:00
ca1d94c87b Issue #557: Include gnugettext.pas from https://dxgettext.svn.sourceforge.net/svnroot/dxgettext/trunk/dxgettext/sample/ . And add basic code to all FormCreate events to translate their components in the future. 2012-11-10 14:28:44 +00:00
a9ce7eb5b9 Autofit first '#' column in routine editor, which has not enough width in some cases. Fixes issue #2993. 2012-10-19 06:14:13 +00:00
39d16d283c Focus new node in parameters list after clicking "Add". Also, add new parameters at the focused tree position. See http://www.heidisql.com/forum.php?t=11132. 2012-09-02 08:23:36 +00:00
90ab0b6cf1 Refactor logic for reading and writing application and session settings:
* Introduce TAppSettings, created in dpr file
* Implement read and write methods, and replace callers of GetRegValue and MainReg.WriteInt/... with these
* Optimize read and write methods for avoiding redundant accesses to registry
* Auto-remove stored default settings from registry to avoid registry spam
* Replace synced MainForm.pref* variables with TAppSettings.Read* calls
* Move SetLocales call to dpr file
* Move MainForm.FDirname* variables to appropriate methods in helpers.pas
* Implement TQueryHistory.Create(SessionPath), reading its items within constructor
2012-08-19 10:55:08 +00:00
5e8bf8306a Remove unused unit inclusions, detected by CNPack/Uses cleaner 2012-05-01 08:34:12 +00:00
0d0fad6745 SelectNode triggers a potentially set OnFocusChanged event, benefit from that logic in some places where I used to assign Focusnode := xyz. 2012-03-13 22:21:53 +00:00
f36f54b0b8 Disable editing routines if user has no privilege to select from mysql.proc or if he's not the owner of that routine. See http://www.heidisql.com/forum.php?t=10231 2012-03-07 20:57:46 +00:00
0b49dfc4b8 Accidentally forgotten files for r3849 2011-05-28 21:25:56 +00:00
2d548b5ef6 Introduce some wrapper functions for message and error dialogs in order to have less code and to avoid hidden titles on Windows XP. Fixes issue #2425. 2011-05-27 04:48:21 +00:00
478c0306c7 Use modern TaskMessageDlg as a replacement for MessageDlg where appropriate. 2011-05-26 06:08:19 +00:00
17a62c020c We have TDBConnection.DequoteIdent. No need to include WideStrUtils unit for that purpose. 2011-04-09 05:52:21 +00:00
4fbf2c23dd Introduce experimental MS SQL support 2011-03-29 23:20:21 +00:00
49a97584e6 Code preparation for non-MySQL connections: Extract abstract stuff into a new TDBConnection class, and let TMySQLConnection derive from that. Same with TDBQuery / TMySQLQuery. See issue #1008. 2011-03-17 23:03:54 +00:00
b50659135c Again, move code for loading libmysql.dll - the right place is now the connection object itself, which loads the library on demand, in SetActive(). This enables the application to start independently of an existent library, raising an error when pressing the connect button. Also, this is a first step towards multi-dbms. 2011-02-17 00:26:53 +00:00
6f95a796e1 Modify identifier quoting logic:
- Move QuoteIdent() and DeQuoteIdent() out of TMySQLConnection, make them classless
- Remove TMainForm.mask(), instead always use QuoteIdent()
- Introduce a third parameter to QuoteIdent(): "AlwaysQuote" - setting this to false will quote only if required
- Set AlwaysQuote to false for all stuff which drops some code into the query editor, see http://www.heidisql.com/forum.php?t=6986
2010-11-24 23:12:13 +00:00
0de7a50216 Add buttons for moving routine parameters up and down, on routine editor 2010-10-26 19:08:16 +00:00
6c2a100945 Implement combo box for definer in routine + view + trigger editor. Fixes issue #2189. Some related changes here:
- Remove ensureValidIdentifier() and its partly uncatched exceptions. Instead, disable "OK" buttons for empty table/view/proc name.
- QuoteIdent and DeQuoteIdent now take the glue char instead of a "HasMultiSegments" boolean param, so they're more exact when "user@host" or "db.name" come in.
2010-10-12 22:13:08 +00:00
5d13d0677b The 3 procedures Parse(Table|View|Routine)Structure() already do some connection specific stuff, and now even more, so they're moved to TMySQLConnection now. In order to display the right collation even if only the character set was found in a CREATE TABLE code, the default collation per charset is detected via CollationTable. See http://www.heidisql.com/forum.php?t=6348 . 2010-10-08 20:16:53 +00:00
0fa6c15c9d Implement multiple connections per window. DBtree and friends now have their nodes bound to TDBObject instances. Fixes issue #2144. 2010-10-05 23:06:29 +00:00
f323420ef1 Enable TDBObject instances to return and cache their own CREATE code, and replace various manual SHOW CREATE xyz occurrences with this new function call. Additionally, modify ParseViewStructure so it takes the CREATE code instead of just the VIEWs name, so it works similar to ParseTableStructure and ParseRoutineStructure. Finally, take this CREATE code to detect all settings for a VIEW, instead of taking them from information_schema.VIEWS. Fixes issue #2131. 2010-09-07 20:58:48 +00:00
b3b1710c35 Introduce EDatabaseError exception class, so we're able to handle only those and let others raise the exception up to MadExcept. Helps finding non-database related AVs as users are able to get the callstack now. Similar to r3292 but more consistent all over the code now. 2010-04-24 13:56:57 +00:00
604672f3d8 Attempt to slightly simplify logic for refreshing database tree node after adding/renaming a db object. 2010-04-18 23:15:20 +00:00
5f9129bef2 Implement event editor for MySQL 5.1+ servers. Also, simplify some code around database objects and their editors. Fixes issue #1527 2010-04-08 23:16:40 +00:00
45ba97b13f Add button and global action for executing selected functions and/or procedures by click. Fixes issue #1818. This requires some parsing code to be moved to helpers unit so it's also available in ListTables' context menu. Also, to avoid new AVs, any db object editor now focuses the edited object in the tree, which is important for creating new ones which were neither existant nor focused. 2010-04-04 22:33:12 +00:00
d35815de77 Code cosmetic: rename showstatus to ShowStatusMsg 2010-03-08 23:21:34 +00:00
9f02608e62 Strip "CHARSET xyz" from routine body. Fixes issue #1744. 2010-03-08 21:05:21 +00:00
8a00d312fa Routine comments can have single quotes escaped by single quotes. Fixes issue #1728. 2010-02-26 16:53:51 +00:00
25be03a4b0 Parse result of SHOW CREATE PROCEDURE, instead of querying information_schema.ROUTINES, which seems broken as escaped quotes appear non-escaped here, on a 5.1.22 server. Fixes issue #1713. 2010-02-23 21:25:48 +00:00
a9cf0fd3b2 Organize controls on routine editor into 3 tabs (options, parameters, create code). Fixes issue #1708. 2010-02-20 18:44:36 +00:00
5de3fc1d57 Display parameters of stored routines in "Cols" tab of query helpers when a procedure or function is selected. Fixes issue #1702. 2010-02-17 23:16:26 +00:00
aadb5c42d1 Save and restore layout of procedure parameter tree. 2010-02-17 08:42:48 +00:00
526a4c5424 Add default length/set in parentheses when user selects a datatype for a procedure parameter. Fixes issue #1698. 2010-02-17 08:36:59 +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
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
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
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