Add basic support for MySQL's new JSON data type. See http://www.heidisql.com/forum.php?t=19870

This commit is contained in:
Ansgar Becker
2015-11-19 19:23:11 +00:00
parent 468ddc9495
commit cbbfcb268f
2 changed files with 20 additions and 1 deletions

View File

@ -183,6 +183,7 @@ const
FIELD_TYPE_NEWDATE = 14; FIELD_TYPE_NEWDATE = 14;
FIELD_TYPE_VARCHAR = 15; FIELD_TYPE_VARCHAR = 15;
FIELD_TYPE_BIT = 16; FIELD_TYPE_BIT = 16;
FIELD_TYPE_JSON = 245;
FIELD_TYPE_NEWDECIMAL = 246; FIELD_TYPE_NEWDECIMAL = 246;
FIELD_TYPE_ENUM = 247; FIELD_TYPE_ENUM = 247;
FIELD_TYPE_SET = 248; FIELD_TYPE_SET = 248;

View File

@ -276,7 +276,7 @@ var
); );
// MySQL Data Type List and Properties // MySQL Data Type List and Properties
MySQLDatatypes: array [0..35] of TDBDatatype = MySQLDatatypes: array [0..36] of TDBDatatype =
( (
( (
Index: dtTinyint; Index: dtTinyint;
@ -599,6 +599,24 @@ var
LoadPart: True; LoadPart: True;
Category: dtcText; Category: dtcText;
), ),
(
Index: dtJson;
NativeType: FIELD_TYPE_JSON;
Name: 'JSON';
Description: 'JSON' + CRLF +
'Documents stored in JSON columns are converted to an internal format that '+
'permits quick read access to document elements. When the server later must '+
'read a JSON value stored in this binary format, the value need not be parsed '+
'from a text representation. The binary format is structured to enable the '+
'server to look up subobjects or nested values directly by key or array index '+
'without reading all values before or after them in the document.';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: False;
LoadPart: False;
Category: dtcText;
),
( (
Index: dtBinary; Index: dtBinary;
NativeType: FIELD_TYPE_STRING; NativeType: FIELD_TYPE_STRING;