mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #12: Detect more granular data types on SQLite, which we need for the table designer and other things
This commit is contained in:
@ -125,8 +125,7 @@ const
|
|||||||
SQLITE_PREPARE_NORMALIZE = $02; // no-op
|
SQLITE_PREPARE_NORMALIZE = $02; // no-op
|
||||||
SQLITE_PREPARE_NO_VTAB = $04; // return an error (error code SQLITE_ERROR) if the statement uses any virtual tables
|
SQLITE_PREPARE_NO_VTAB = $04; // return an error (error code SQLITE_ERROR) if the statement uses any virtual tables
|
||||||
|
|
||||||
|
|
||||||
type
|
|
||||||
type
|
type
|
||||||
PUSED_MEM=^USED_MEM;
|
PUSED_MEM=^USED_MEM;
|
||||||
USED_MEM = packed record
|
USED_MEM = packed record
|
||||||
@ -2054,7 +2053,7 @@ var
|
|||||||
Category: dtcText;
|
Category: dtcText;
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
SQLiteDatatypes: Array[0..6] of TDBDatatype =
|
|
||||||
SQLiteDatatypes: Array[0..16] of TDBDatatype =
|
SQLiteDatatypes: Array[0..16] of TDBDatatype =
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
@ -2069,22 +2068,75 @@ var
|
|||||||
LoadPart: False;
|
LoadPart: False;
|
||||||
Category: dtcOther;
|
Category: dtcOther;
|
||||||
),
|
),
|
||||||
Index: dtInt;
|
(
|
||||||
Name: 'INTEGER';
|
Index: dtTinyint;
|
||||||
Names: 'INTEGER|INT|TINYINT|SMALLINT|MEDIUMINT|BIGINT|UNSIGNED BIG INT|INT2|INT8|BOOLEAN';
|
NativeTypes: '1';
|
||||||
|
Name: 'TINYINT';
|
||||||
Names: 'INT2|BOOLEAN';
|
Names: 'INT2|BOOLEAN';
|
||||||
Description: '';
|
Description: '';
|
||||||
HasLength: False;
|
HasLength: False;
|
||||||
RequiresLength: False;
|
RequiresLength: False;
|
||||||
HasBinary: False;
|
HasBinary: False;
|
||||||
HasDefault: False;
|
HasDefault: False;
|
||||||
ValueMustMatch: '^\d{1,10}$';
|
|
||||||
LoadPart: False;
|
LoadPart: False;
|
||||||
Category: dtcInteger;
|
Category: dtcInteger;
|
||||||
),
|
),
|
||||||
Index: dtText;
|
(
|
||||||
Name: 'TEXT';
|
Index: dtSmallint;
|
||||||
Names: 'CHARACTER|VARCHAR|VARYING CHARACTER|NCHAR|NATIVE CHARACTER|NVARCHAR|TEXT|CLOB';
|
NativeTypes: '1';
|
||||||
|
Name: 'SMALLINT';
|
||||||
|
Names: '';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcInteger;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtMediumint;
|
||||||
|
NativeTypes: '1';
|
||||||
|
Name: 'INTEGER';
|
||||||
|
Names: 'MEDIUMINT|INT8';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcInteger;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtInt;
|
||||||
|
NativeTypes: '1';
|
||||||
|
Name: 'INTEGER';
|
||||||
|
Names: 'INT';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcInteger;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtBigint;
|
||||||
|
NativeTypes: '1';
|
||||||
|
Name: 'BIGINT';
|
||||||
|
Names: 'UNSIGNED BIG INT';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcInteger;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtChar;
|
||||||
|
NativeTypes: '3';
|
||||||
|
Name: 'CHARACTER';
|
||||||
Names: 'NCHAR|NATIVE CHARACTER';
|
Names: 'NCHAR|NATIVE CHARACTER';
|
||||||
Description: '';
|
Description: '';
|
||||||
HasLength: True;
|
HasLength: True;
|
||||||
@ -2094,8 +2146,50 @@ var
|
|||||||
LoadPart: True;
|
LoadPart: True;
|
||||||
DefLengthSet: '50';
|
DefLengthSet: '50';
|
||||||
Category: dtcText;
|
Category: dtcText;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtText;
|
||||||
|
NativeTypes: '3';
|
||||||
|
Name: 'VARCHAR';
|
||||||
|
Names: 'VARCHAR|VARYING CHARACTER';
|
||||||
|
Description: '';
|
||||||
|
HasLength: True;
|
||||||
|
RequiresLength: True;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: True;
|
||||||
|
DefLengthSet: '50';
|
||||||
|
Category: dtcText;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtText;
|
||||||
|
NativeTypes: '3';
|
||||||
|
Name: 'NVARCHAR';
|
||||||
|
Names: 'NVARCHAR';
|
||||||
|
Description: '';
|
||||||
|
HasLength: True;
|
||||||
|
RequiresLength: True;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: True;
|
||||||
|
DefLengthSet: '50';
|
||||||
|
Category: dtcText;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtText;
|
||||||
|
NativeTypes: '3';
|
||||||
|
Name: 'TEXT';
|
||||||
|
Names: 'CLOB';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: True;
|
||||||
|
Category: dtcText;
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
Index: dtBlob;
|
||||||
NativeTypes: '4';
|
NativeTypes: '4';
|
||||||
Name: 'BLOB';
|
Name: 'BLOB';
|
||||||
Description: '';
|
Description: '';
|
||||||
@ -2107,13 +2201,51 @@ var
|
|||||||
Category: dtcBinary;
|
Category: dtcBinary;
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
Index: dtReal;
|
||||||
NativeTypes: '2';
|
NativeTypes: '2';
|
||||||
Names: 'REAL|DOUBLE|DOUBLE PRECISION|FLOAT|NUMERIC|DECIMAL';
|
Name: 'REAL';
|
||||||
Names: 'REAL|NUMERIC';
|
Names: 'REAL|NUMERIC';
|
||||||
Description: '';
|
Description: '';
|
||||||
HasLength: False;
|
HasLength: False;
|
||||||
RequiresLength: False;
|
RequiresLength: False;
|
||||||
HasDefault: False;
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcReal;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtDouble;
|
||||||
|
NativeTypes: '2';
|
||||||
|
Name: 'DOUBLE';
|
||||||
|
Names: 'DOUBLE PRECISION';
|
||||||
|
Description: '';
|
||||||
|
HasLength: False;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcReal;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtFloat;
|
||||||
|
NativeTypes: '2';
|
||||||
|
Name: 'FLOAT';
|
||||||
|
Description: '';
|
||||||
|
HasLength: True;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
|
HasDefault: True;
|
||||||
|
LoadPart: False;
|
||||||
|
Category: dtcReal;
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Index: dtDecimal;
|
||||||
|
NativeTypes: '2';
|
||||||
|
Name: 'DECIMAL';
|
||||||
|
Description: '';
|
||||||
|
HasLength: True;
|
||||||
|
RequiresLength: False;
|
||||||
|
HasBinary: False;
|
||||||
HasDefault: True;
|
HasDefault: True;
|
||||||
LoadPart: False;
|
LoadPart: False;
|
||||||
Category: dtcReal;
|
Category: dtcReal;
|
||||||
@ -2135,7 +2267,7 @@ var
|
|||||||
Description: '';
|
Description: '';
|
||||||
HasLength: False;
|
HasLength: False;
|
||||||
RequiresLength: False;
|
RequiresLength: False;
|
||||||
HasDefault: False;
|
HasBinary: False;
|
||||||
HasDefault: True;
|
HasDefault: True;
|
||||||
LoadPart: False;
|
LoadPart: False;
|
||||||
Category: dtcTemporal;
|
Category: dtcTemporal;
|
||||||
|
Reference in New Issue
Block a user