Skip to content
Permalink
Browse files

Issue #12: SQLite allows any column type declaration, even custom types.

* support those declarations which are commonly used in other database systems, and for which Heidi has a fitting grid editor
* move UNIQUEIDENTIFIER from text group to binary group
* remove useless native type ids and empty descriptions
  • Loading branch information
ansgarbecker committed Jan 19, 2020
1 parent c994e43 commit 3b84ccc69683132649dd69bd505217df1e38329a
Showing with 32 additions and 108 deletions.
  1. +32 −108 source/dbstructures.pas
@@ -2078,11 +2078,10 @@ TSQLiteLib = class(TDbLib)
)
);

SQLiteDatatypes: Array[0..17] of TDBDatatype =
SQLiteDatatypes: Array[0..13] of TDBDatatype =
(
(
Index: dtUnknown;
NativeTypes: '99999';
Name: 'UNKNOWN';
Description: 'Unknown data type';
HasLength: False;
@@ -2094,49 +2093,19 @@ TSQLiteLib = class(TDbLib)
),
(
Index: dtTinyint;
NativeTypes: '1';
Name: 'TINYINT';
Names: 'INT2|BOOLEAN|BOOL';
Description: '';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: False;
LoadPart: False;
Category: dtcInteger;
),
(
Index: dtSmallint;
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: '';
Names: 'INT|MEDIUMINT|INT8';
HasLength: False;
RequiresLength: False;
HasBinary: False;
@@ -2146,10 +2115,8 @@ TSQLiteLib = class(TDbLib)
),
(
Index: dtBigint;
NativeTypes: '1';
Name: 'BIGINT';
Names: 'UNSIGNED BIG INT';
Description: '';
HasLength: False;
RequiresLength: False;
HasBinary: False;
@@ -2158,39 +2125,9 @@ TSQLiteLib = class(TDbLib)
Category: dtcInteger;
),
(
Index: dtChar;
NativeTypes: '3';
Name: 'CHARACTER';
Names: 'CHAR|NCHAR|NATIVE CHARACTER';
Description: '';
HasLength: True;
RequiresLength: True;
HasBinary: False;
HasDefault: True;
LoadPart: True;
DefLengthSet: '50';
Category: dtcText;
),
(
Index: dtText;
NativeTypes: '3';
Index: dtVarchar;
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: '';
Names: 'VARCHAR|VARYING CHARACTER|NVARCHAR|CHARACTER|CHAR|NCHAR|NATIVE CHARACTER';
HasLength: True;
RequiresLength: True;
HasBinary: False;
@@ -2201,10 +2138,8 @@ TSQLiteLib = class(TDbLib)
),
(
Index: dtText;
NativeTypes: '3';
Name: 'TEXT';
Names: 'CLOB';
Description: '';
HasLength: False;
RequiresLength: False;
HasBinary: False;
@@ -2214,21 +2149,17 @@ TSQLiteLib = class(TDbLib)
),
(
Index: dtUniqueidentifier;
NativeTypes: '3';
Name: 'UNIQUEIDENTIFIER';
Description: '';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: True;
Category: dtcText;
LoadPart: False;
Category: dtcBinary;
),
(
Index: dtBlob;
NativeTypes: '4';
Name: 'BLOB';
Description: '';
HasLength: False;
RequiresLength: False;
HasBinary: False;
@@ -2238,10 +2169,8 @@ TSQLiteLib = class(TDbLib)
),
(
Index: dtReal;
NativeTypes: '2';
Name: 'REAL';
Names: 'REAL|NUMERIC';
Description: '';
Names: 'REAL|NUMERIC|DOUBLE|DOUBLE PRECISION|FLOAT|DECIMAL';
HasLength: False;
RequiresLength: False;
HasBinary: False;
@@ -2250,63 +2179,58 @@ TSQLiteLib = class(TDbLib)
Category: dtcReal;
),
(
Index: dtDouble;
NativeTypes: '2';
Name: 'DOUBLE';
Names: 'DOUBLE PRECISION';
Description: '';
Index: dtDate;
Name: 'DATE';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcReal;
Category: dtcTemporal;
),
(
Index: dtFloat;
NativeTypes: '2';
Name: 'FLOAT';
Description: '';
HasLength: True;
Index: dtTime;
Name: 'TIME';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcReal;
Category: dtcTemporal;
),
(
Index: dtDecimal;
NativeTypes: '2';
Name: 'DECIMAL';
Description: '';
HasLength: True;
Index: dtDatetime;
Name: 'DATETIME';
HasLength: False;
RequiresLength: False;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcReal;
Category: dtcTemporal;
),
(
Index: dtDate;
Name: 'DATE';
Description: '';
HasLength: False;
RequiresLength: False;
Index: dtEnum;
NativeType: mytEnum;
Name: 'ENUM';
HasLength: True;
RequiresLength: True;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcTemporal;
DefLengthSet: '''Y'',''N''';
Category: dtcOther;
),
(
Index: dtDatetime;
Name: 'DATETIME';
Description: '';
HasLength: False;
RequiresLength: False;
Index: dtSet;
NativeType: mytSet;
Name: 'SET';
HasLength: True;
RequiresLength: True;
HasBinary: False;
HasDefault: True;
LoadPart: False;
Category: dtcTemporal;
DefLengthSet: '''Value A'',''Value B''';
Category: dtcOther;
)
);

0 comments on commit 3b84ccc

Please sign in to comment.
You can’t perform that action at this time.