Simplified vertical query builder used in the Expression tabs in the Select and Transform panes joins available fields and SQL operators / functions into a single list to make better use of screen space.
The New Field button in the Options tab of the Style pane used to add a new field to store custom styles is changed to invoke the Schema dialog. Altering table schema keeps the Style pane in the Options tab (was switching to the tab with formatting).
The Schema dialog is reworked to show fields, indexes and constraints using a grid control with a toolbar on top. Grid row for a field displays field name, field type and an optional expression used to compute the field (computed fields only). Grid row for an index displays index name, index type and a list of used fields. Grid row for a constraint displays constraint name, constraint type (boolean) and an expression used to compute the constraint. To edit an existing field, index or constraint, double-click it.
The Schema dialog allows adding new fields, indexes or constraints using the Add toolbar command. The command displaus a drop-down menu with separate commands for adding a field, index or constraint. If the table schema is readonly, all commands are disabled. If the database does not support adding indexes or constraints, relevant commands are disabled. Shortcut: pressing Insert in the grid starts adding a new field.
The Schema dialog allows deleting selected fields, indexes or constraints using the Delete toolbar command. If the table schema is readonly, the command is disabled. (To select items, use Ctrl-click or Ctrl-Space or any other selection method available in the table window.) Shortcut: pressing Delete in the grid deletes selected items.
The Schema dialog allows reordering selected fields, indexes or constraints using the Move to Top / Move Up / Move Down / Move to Bottom toolbar commands. If the table schema is readonly, the commands are disabled. When editing the schema of an existing table, only new items about to be added to the schema can be reordered. (Reordering of schema items is important for fields and indexes. The order of fields determines which fields can be accessed by computed fields: a computed field can only reference fields that appear before it. The order of indexes determines which index is going to be used a primary key when creating a table on a database: if there are multiple candidates, the system uses the first one.)
The Field dialog displays expression and expression context for a computed field using two multiline edit controls. Expression text can be scrolled, selected and copied even if the expression cannot be edited. The Edit Expression button invokes the Expression dialog which edits expression and expression context using a separate query builder for each. The expression is only allowed to use fields that appear before the edited field in the schema. The expression context is not allowed to use any fields (statements in the expression context are evaluated once per field, not once per record). If the database does not support computed fields (only MAP files do), the Edit Expression button in the Field dialog is disabled.
The Field dialog allows specifying coordinate system for geom and tile fields.
The Field dialog allows specifying bounds for geom fields if requested by the database. (Some databases need to know bounds in advance to allow creating a spatial index.)
The Field dialog allows specifying Z values option for geom fields if requested by the database. (Some database need to know whether the geom field will have XY or XYZ values in advance.) If the database requests both Z values and bounds, bounds can (but don't have to) include Z range, specified as '[ xmin, ymin, zmin, xmax, ymax, zmax ]'.
The Field dialog allows specifying pixel type, tile dimensions and tile reduce mode for tile fields.
The Field dialog allows specifying autogenerated option for integer fields if supported by the database. (Most databases support that. MAP files don't, but tables in MAP files can always use MFD_ID field which is a hybrid - it will autoincrement for a new record if the inserted values do not include the value for MFD_ID, and if the value for MFD_ID is supplied, it will be accepted.) When creating a new table or adding new fields to an existing table, the option is treated as a request to the database. The database is free to ignore the request, eg, if it only allows having a single autogenerated field per table, it may only make a single field autogenerated and make all other fields regular.
The Constraint dialog displays expression and expression context for a computed field similarly to the Field dialog. The expression for a constraint is allowed to use all available fields. The expression context for a constraint is not allowed to use any fields.
The Constraint dialog for a database allows specifying a not-null constraint for a field, as long as the database supports not-null constraints (most databases do). (We only allow specifying constraints as arbitrary expressions for MAP files. However, not-null constraints are very common and very useful, so we started recognizing them separately.)
The Index dialog displays index type as one of three choices: 'regular index (btree)' (supported in MAP files and on all databases), 'spatial index for geometry (rtree)' (supported in MAP files and on most databases), 'spatial index for tiles (rtree)' (MAP files only). Creating a btree index includes explicit options to allow duplicate values and nulls, and allows specifying up to four fields (all used fields have to be different, the order of fields matters, but specifying fields 2 and 3 while leaving field 1 blank works). Creating a btree index on text fields allows specifying the collation for each. Creating an rtree index for geometry allows specifying the geometry field. Creating an rtree index for tiles allows specifying the X and Y fields and the tile field, plus options for the tile field (pixel type, tile dimensions, tile reduce mode). Selecting the tile field automatically loads options specified for that field in metadata, including any changes to it made in the context of the Schema dialog that have not yet been saved.
Editing the collation for a text field in the Index dialog lists collations available on the database in a separate tab. (There are two tabs added: the Database tab lists collations exposed in the MFD_COLLATE table, and the Custom tab allows copy / pasting collation definition as plain text.)
The Schema dialog highlights changed fields, indexes and constraints using bluish background. New fields, indexes and constraints also display an 'added' icon in the row header.
The Schema dialog includes the Edit Query button which shows changes about to be made as a query.
The Schema dialog strips properties with caching directives for fields and indexes (commonly produced by copy and paste from data sources that use .MAPCACHE) on first change to the schema.
Deleting fields in the Schema dialog automatically deletes indexes and not-null constraints referencing these fields, after a confirmation. (When deleting a selected field referenced by an index, if the index is also selected, the dialog silently deletes both. If the index is not selected, the dialog displays a confirmation regarding deleting the index. If the user confirms the deletion, the dialog deletes both the field and the index. If the users cancels the deletion, the dialog does not delete anything, and selects the index.)
The Schema dialog allows adding identity field and index using the Add Identity toolbar command. In a MAP file, the command adds the system MFD_ID field and the system MFD_ID_X index regardless of what other indexes the table already contains (system fields and indexes are 'free' in that they don't add to the space requirements, don't harm the performance in any way, etc). If the table already contains the field and / or the index, the command selects them. In a database, the command checks if the table contains a btree index (no duplicates, no nulls), and if so, selects that index and the field or fields it uses. If the table contains no btree index, the command add a new field and a new btree index on that field. If the database supports creating autogenerated fields, the field is made autogenerated.
The Create Drawing / Create Image / Create Labels / Create Table dialogs ran on a database create autogenerated identity fields if the database supports them.
The Schema dialog displays a coordinate system icon for geom and tile fields: red if the coordinate system is missing, black otherwise.
The Schema dialog displays an index icon for fields that participate in indexes: dark blue if there is an index where the field is the 'main' field (geom or tile in an rtree index, a single field in a btree index of any type), gray if the field is not the 'main' field in any index.
The Schema dialog displays a key icon for a primary key index in a database.
(Fix) Unchecking View - Filter - Filter Fetched Records Only on table with computed fields no longer results in no records.
(Fix) Right-clicking a blank space in the Project pane no longer sometimes (rarely) crashes if there are no selected items.
(Fix) Retrieving schema of a materialized view in PostgreSQL no longer sometimes fails.
(Fix) Exporting to SHP no longer writes incomplete bounding box into the file header (a regression).
(Fix) Exporting to DBF (including as part of SHP) no longer sometimes misplaces data for text fields (a regression).
Exporting to SHP autosizes text fields in DBF. (Previously, the autosizing was working only for exporting standalone DBF.)
Reading DBF interprets all-space text values as NULLs.
Pasting or importing drawings to GDB automatically splits geoms of different types into separate drawings, similarly to export.
Working with Oracle databases supports collations for text fields. Recognized collations are listed in the system MFD_COLLATE table.
Working with DB2 databases supports collations for text fields (can use them during reading, but cannot create indexes with them, due to current limitations of latest versions of DB2 - there is migration to doing everything in Unicode and it is not yet complete). Recognized collations are listed in the system MFD_COLLATE table.
Creating a spatial index on an Oracle database uses SPATIAL_INDEX_V2 (instead of SPATIAL_INDEX) if it is available.
Oracle, PostgreSQL, SQL Server and other database dataports use native names for indexes. (Previously, most index names were synthesized dynamically from field names and the dataport was mapping back and forth.) When creating a new index, if the desired index name is already in use (this happens frequently because index names in MAP files are unique within table and index names on regular databases are unique within database), the dataport synthesizes a new name using a GUID.
End of list.
Also, here are the latest versions of databases that we support: MySQL 8, Oracle 18, PostgreSQL 11. We have a number of small changes related to support for these newer versions, they didn't make the list above because they are too small and too technical. :-)