FireDAC.Stan.Option.TFDMapRule.TypeMask
Delphi
property TypeMask: String read FTypeMask write FTypeMask;
C++
__property System::UnicodeString TypeMask = {read=FTypeMask, write=FTypeMask};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDMapRule |
Description
Specifies the column data type mask.
Use the TypeMask property to specify a mask to match column data type. The mask uses the LIKE
operator format, where:
- '%' - many symbols
- '_' - a single symbol
If a column name matches the mask, the column matches the map rule and will get the TargetDataType type. Other properties may be used to make the rule strict.
The TypeMask property is useful for the databases that support domain based types, such as InterBase, Firebird and PostgreSQL.
DBMS Support
TypeMask is supported by the following DBMS:
DBMS | Considerations |
---|---|
Firebird | Only supports data type names of domain-based columns. |
InterBase | |
ODBC | Supports data type names only if the specific ODBC driver that you use exposes data type names. |
PostgreSQL |
Supports data type names of all columns. |
SQLite |
Example
To use the TypeMask property in your application, add a new TFDMapRule:
var
oRule: TFDMapRule;
...
FDTable1.Disconnect;
FDTable1.FormatOptions.OwnMapRules := True;
oRule := FDTable1.FormatOptions.MapRules.Add;
oRule.TypeMask := 'domain type name';
oRule.SourceDataType := dtYyy; // source data type
oRule.TargetDataType := dtXxx; // target data type
FDTable1.Open;