The v2.6.0 release of PostgresDAC will provide native support for PostgreSQL geometric types, so several TField descendants were created. Meet the TPSQLPointField which encapsulates point PostgreSQL type.
Since PostgreSQL point type uses floating-point numbers, we cannot use standard Delphi TPoint type, which uses integer numbers. Thus new TPSQLPoint type were introduced with constant representing origin:
TPSQLPoint = packed record X: Double; Y: Double; end; const OriginPoint: TPSQLPoint = (X: 0.0; Y: 0.0);
As the ancestor for the new class TNumericField were chosen, because of properties for formatting numeric data for display and editing purposes.
Let’s have a look on definition:
TPSQLPointField = class(TNumericField) public property AsTPoint: TPoint read GetAsTPoint write SetAsTPoint; property Value: TPSQLPoint read GetAsPoint write SetAsPoint; end;
First of all Value property is redeclared, now it is of TPSQLPoint type. This behaviour is common for all TField descendants and this is not a big surprise, I believe.
And the second AsTPoint property added to support standard Delphi TPoint type.
|Float numbers are rounded (not truncated) when accessing this value.|
You may test the new functionality by downloading Beta of PostgresDAC-2.6.0 directly from the MicroOLAP site. Please feel free to contact Support Team at your earliest convenience with the questions or proposals.