mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Improved Sqids in not-nullable types
This commit is contained in:
parent
4b0d872cd5
commit
1a10545794
@ -3013,12 +3013,20 @@ begin
|
||||
lValueTypeInfo, AValue)
|
||||
end;
|
||||
end
|
||||
else if (lValueTypeInfo.Kind = tkInteger) and (TryStrToInt(AStringValue, lOutInteger)) then
|
||||
else if lValueTypeInfo.Kind = tkInteger then
|
||||
begin
|
||||
if TMVCSerializerHelper.AttributeExists<MVCSerializeAsSqidsAttribute>(AAttributes) then
|
||||
lOutInteger := TMVCSqids.SqidToInt(AStringValue)
|
||||
else
|
||||
lOutInteger := StrToInt(AStringValue);
|
||||
AValue := lOutInteger;
|
||||
end
|
||||
else if (lValueTypeInfo.Kind = tkInt64) and (TryStrToInt64(AStringValue, lOutInteger64)) then
|
||||
else if lValueTypeInfo.Kind = tkInt64 then
|
||||
begin
|
||||
if TMVCSerializerHelper.AttributeExists<MVCSerializeAsSqidsAttribute>(AAttributes) then
|
||||
lOutInteger64 := TMVCSqids.SqidToInt(AStringValue)
|
||||
else
|
||||
lOutInteger64 := StrToInt64(AStringValue);
|
||||
AValue := lOutInteger64;
|
||||
end
|
||||
else if lValueTypeInfo.Kind = tkSet then
|
||||
|
Loading…
Reference in New Issue
Block a user