Affected issues: rfe #618, rfe #464, bug #324, bug #635 (maybe more)
Breaks: Unicode grid editing (due to yet unsolved bug #620), enum pulldowns, MEMO editing
Major changes:
- editor tab at bottom completely removed, SQL log is always visible now.
- memo, blob and enum editors don't have a replacement yet. This is left for later commits.
- grid cells are colorized to signalize their datatypes
- UPDATEs, DELETEs and INSERTs are composed by own code, no longer by Zeos internal mechanisms. Should make debugging easier.
- UPDATEs + DELETEs on tables without unique key are blocked now.
- editing in the query grid is always blocked. Would need some extensive parser to allow that.
- Open the file in "read and leave" mode, don't lock it for write operations. This fixes opening a file which is opened and write locked in another application
- Handle exceptions for ReadTextfile in QueryLoad which was malfunctioning yet, lead to an AV.
- Enhance inline documentation
- OpenTextfile
- ReadTextfileChunk
- ReadTextfile
Enables us to use the unicode detection in places where we need to read a file chunkwise. (e.g. the runsqlfile unit)
TODO: Fix UTF-8 detection, misdetected as ANSI currently.
- Give them their own icon in dbtree and ListTables
- Disable pure table actions (like "Alter table", "Optimize" etc.) in context menus when a view is selected
- Add new column in ListTables: "Type" which is filled either with "Base table" or "View"
- Introduce new property "NodeType" in TVTreeData record, used currently to store NODETYPE_VIEW or NODETYPE_TABLE. This new property is meant to be used for various purposes in other VirtualTrees in the future.
- Introduce Childwin.SelectedTableType, corresponding to Childwin.SelectedTable
- Make DropTable action fit for also dropping views (and surely a list with a mixture of views and tables)
- Don't fetch rowcount from views in DisplayRowCountStats to fix bug #1844952
TODO: find some sleep command for the batch file, as we sometimes get "access denied" while trying to overwrite the just terminated exe. Seems like taskkill doesn't close all handles itself.
* TNTGrid is not capable of displaying a sort arrow in column titles. So, signalize sort direction of columns in grids and listviews by lightgrey (= ascending) and mediumgrey (= descending)
* Remove special color for NULL cells in grids because it can conflict with the new sorting colors. Instead, place a grey (NULL) text in these cells. Less gaudy colors now.
* Also remove grey background in primary key columns for the benefit of sorting colors. PK cells have bold font anyway, should be noticable enough.
- Implement an alternative solution for handling sorted columns without usage of SMDBGrid's sortcolumns. Move relevant structures and functions from data_sorting.pas to childwin.pas and use them in both units.
- Upgrade some code parts to use WideStrings instead of Strings so they don't break with the new grid.
- Use Grid.OnDrawDataCell as an alternative to Grid.OnGetCellParams as the latter one is a feature of SMDBGrid
- Cosmetic: enhance screen real estate in viewdata()
- Introduce helper "MakeFloat" which does exactly the same as MakeInt except from truncating floats
- Use MakeFloat instead of MakeInt in vstCompareNodes to fix the above mentioned bug
* Add helpful (hopefully) delimiter syntax checking.
* Protect the backslash-in-string-literal parsing a bit more by only activating it inside string literals. Also move it towards the string literal handler to improve readability.
* Fix regression: choose characters for secchar and thdchar that are really unused by the parser logic.
* When shortcutting and snipping whitespace early, the start pointer must be adjusted whenever a comment "whitespace" is accounted for.
* When handling end-of-string inside loop, shortcutting via continue must not be performed if at the last character of the string, otherwise an entire sentence might be skipped.
* Processing sentence contents must happen after processing comments (as before the delimiter changes).
* Trying to handle the conditional markers with a state variable inside the end-of-sentence block did not work, sometimes too much sql got included in the conditional.