Issue #1964: support MariaDB's INET4 and INET6 data types

This commit is contained in:
Ansgar Becker
2024-06-14 13:59:40 +02:00
parent 753e4f6b1f
commit ce3d29a99c
2 changed files with 37 additions and 3 deletions

View File

@ -311,7 +311,7 @@ var
// MySQL Data Type List and Properties
MySQLDatatypes: array [0..38] of TDBDatatype =
MySQLDatatypes: array [0..40] of TDBDatatype =
(
(
Index: dbdtUnknown;
@ -690,6 +690,39 @@ var
LoadPart: False;
Category: dtcText;
),
(
Index: dbdtInet4;
NativeType: 255;
Name: 'INET4';
Description: 'INET4' + sLineBreak +
'INET4 is a data type to store IPv4 addresses, as 4-byte binary strings. '+
'It was added in MariaDB 10.10.0';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcText;
MinVersion: 10100;
),
(
Index: dbdtInet6;
NativeType: 255;
Name: 'INET6';
Description: 'INET6' + sLineBreak +
'The INET6 data type is intended for storage of IPv6 addresses, as well as ' +
'IPv4 addresses assuming conventional mapping of IPv4 addresses into IPv6 ' +
'addresses. ' + slineBreak +
'Both short and long IPv6 notation are permitted, according to RFC-5952. '+
'It was added in MariaDB 10.5.0';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcText;
MinVersion: 10050;
),
(
Index: dbdtBinary;
NativeType: 254;

View File

@ -6,7 +6,7 @@
interface
uses
gnugettext, Vcl.Graphics, Winapi.Windows, System.SysUtils;
gnugettext, Vcl.Graphics, Winapi.Windows, System.SysUtils, System.Classes;
type
@ -19,7 +19,7 @@ type
dbdtJson, dbdtJsonB, dbdtCidr, dbdtInet, dbdtMacaddr,
dbdtBinary, dbdtVarbinary, dbdtTinyblob, dbdtBlob, dbdtMediumblob, dbdtLongblob, dbdtImage,
dbdtEnum, dbdtSet, dbdtBit, dbdtVarBit, dbdtBool, dbdtRegClass, dbdtRegProc, dbdtUnknown,
dbdtCursor, dbdtSqlvariant, dbdtTable, dbdtUniqueidentifier, dbdtHierarchyid, dbdtXML,
dbdtCursor, dbdtSqlvariant, dbdtTable, dbdtUniqueidentifier, dbdtInet4, dbdtInet6, dbdtHierarchyid, dbdtXML,
dbdtPoint, dbdtLinestring, dbdtLineSegment, dbdtPolygon, dbdtGeometry, dbdtBox, dbdtPath, dbdtCircle, dbdtMultipoint, dbdtMultilinestring, dbdtMultipolygon, dbdtGeometrycollection
);
@ -45,6 +45,7 @@ type
Format: String; // Used for date/time values when displaying and generating queries
ValueMustMatch: String;
Category: TDBDatatypeCategoryIndex;
MinVersion: Integer;
end;
// Column type category structure