mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-30 13:32:00 +01:00
* Patch from Ladislav Karrach to use a field's type-affinity to determine the fieldtype. (Fixes aggregate test)
git-svn-id: trunk@16857 -
This commit is contained in:
parent
9604ae2908
commit
d6adcdfe81
@ -364,9 +364,16 @@ begin
|
|||||||
ft1:=FieldMap[fi].t;
|
ft1:=FieldMap[fi].t;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
// Empty field types are allowed and used in calculated columns (aggregates)
|
// In case of an empty fieldtype (FD='', which is allowed and used in calculated
|
||||||
// and by pragma-statements
|
// columns (aggregates) and by pragma-statements) or an unknown fieldtype,
|
||||||
if FD='' then ft1 := ftString;
|
// use the field's affinity:
|
||||||
|
if ft1=ftUnknown then
|
||||||
|
case TStorageType(sqlite3_column_type(st,i)) of
|
||||||
|
stInteger: ft1:=ftLargeInt;
|
||||||
|
stFloat: ft1:=ftFloat;
|
||||||
|
stBlob: ft1:=ftBlob;
|
||||||
|
else ft1:=ftString;
|
||||||
|
end;
|
||||||
// handle some specials.
|
// handle some specials.
|
||||||
size1:=0;
|
size1:=0;
|
||||||
case ft1 of
|
case ft1 of
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user