mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 18:59:11 +02:00
fcl-db: base: change formal data type of AsInteger to Longint instead of Integer (in objpas mode it is same as Integer) to be Delphi compatible.
Change call chain GetAsInteger calls GetAsLongint to GetAsLongint calls GetAsInteger, because AsInteger is used often than GetAsLongint so we save one more call. git-svn-id: trunk@24632 -
This commit is contained in:
parent
2944fc8839
commit
eeabb9403e
@ -330,7 +330,7 @@ type
|
|||||||
function GetAsDateTime: TDateTime; virtual;
|
function GetAsDateTime: TDateTime; virtual;
|
||||||
function GetAsFloat: Double; virtual;
|
function GetAsFloat: Double; virtual;
|
||||||
function GetAsLongint: Longint; virtual;
|
function GetAsLongint: Longint; virtual;
|
||||||
function GetAsInteger: Integer; virtual;
|
function GetAsInteger: Longint; virtual;
|
||||||
function GetAsVariant: variant; virtual;
|
function GetAsVariant: variant; virtual;
|
||||||
function GetOldValue: variant; virtual;
|
function GetOldValue: variant; virtual;
|
||||||
function GetAsString: string; virtual;
|
function GetAsString: string; virtual;
|
||||||
@ -356,7 +356,7 @@ type
|
|||||||
procedure SetAsDateTime(AValue: TDateTime); virtual;
|
procedure SetAsDateTime(AValue: TDateTime); virtual;
|
||||||
procedure SetAsFloat(AValue: Double); virtual;
|
procedure SetAsFloat(AValue: Double); virtual;
|
||||||
procedure SetAsLongint(AValue: Longint); virtual;
|
procedure SetAsLongint(AValue: Longint); virtual;
|
||||||
procedure SetAsInteger(AValue: Integer); virtual;
|
procedure SetAsInteger(AValue: Longint); virtual;
|
||||||
procedure SetAsLargeint(AValue: Largeint); virtual;
|
procedure SetAsLargeint(AValue: Largeint); virtual;
|
||||||
procedure SetAsVariant(const AValue: variant); virtual;
|
procedure SetAsVariant(const AValue: variant); virtual;
|
||||||
procedure SetAsString(const AValue: string); virtual;
|
procedure SetAsString(const AValue: string); virtual;
|
||||||
@ -392,7 +392,7 @@ type
|
|||||||
property AsFloat: Double read GetAsFloat write SetAsFloat;
|
property AsFloat: Double read GetAsFloat write SetAsFloat;
|
||||||
property AsLongint: Longint read GetAsLongint write SetAsLongint;
|
property AsLongint: Longint read GetAsLongint write SetAsLongint;
|
||||||
property AsLargeInt: LargeInt read GetAsLargeInt write SetAsLargeInt;
|
property AsLargeInt: LargeInt read GetAsLargeInt write SetAsLargeInt;
|
||||||
property AsInteger: Integer read GetAsInteger write SetAsInteger;
|
property AsInteger: Longint read GetAsInteger write SetAsInteger;
|
||||||
property AsString: string read GetAsString write SetAsString;
|
property AsString: string read GetAsString write SetAsString;
|
||||||
property AsWideString: WideString read GetAsWideString write SetAsWideString;
|
property AsWideString: WideString read GetAsWideString write SetAsWideString;
|
||||||
property AsVariant: variant read GetAsVariant write SetAsVariant;
|
property AsVariant: variant read GetAsVariant write SetAsVariant;
|
||||||
@ -458,7 +458,7 @@ type
|
|||||||
function GetAsBoolean: Boolean; override;
|
function GetAsBoolean: Boolean; override;
|
||||||
function GetAsDateTime: TDateTime; override;
|
function GetAsDateTime: TDateTime; override;
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
function GetDataSize: Integer; override;
|
function GetDataSize: Integer; override;
|
||||||
@ -468,7 +468,7 @@ type
|
|||||||
procedure SetAsBoolean(AValue: Boolean); override;
|
procedure SetAsBoolean(AValue: Boolean); override;
|
||||||
procedure SetAsDateTime(AValue: TDateTime); override;
|
procedure SetAsDateTime(AValue: TDateTime); override;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
public
|
public
|
||||||
@ -534,27 +534,27 @@ type
|
|||||||
FMinValue,
|
FMinValue,
|
||||||
FMaxValue,
|
FMaxValue,
|
||||||
FMinRange,
|
FMinRange,
|
||||||
FMAxRange : Longint;
|
FMaxRange : Longint;
|
||||||
Procedure SetMinValue (AValue : longint);
|
Procedure SetMinValue (AValue : longint);
|
||||||
Procedure SetMaxValue (AValue : longint);
|
Procedure SetMaxValue (AValue : longint);
|
||||||
protected
|
protected
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
function GetDataSize: Integer; override;
|
function GetDataSize: Integer; override;
|
||||||
procedure GetText(var AText: string; ADisplayText: Boolean); override;
|
procedure GetText(var AText: string; ADisplayText: Boolean); override;
|
||||||
function GetValue(var AValue: Longint): Boolean;
|
function GetValue(var AValue: Longint): Boolean;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
function GetAsLargeint: Largeint; override;
|
function GetAsLargeint: Largeint; override;
|
||||||
procedure SetAsLargeint(AValue: Largeint); override;
|
procedure SetAsLargeint(AValue: Largeint); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
Function CheckRange(AValue : longint) : Boolean;
|
Function CheckRange(AValue : Longint) : Boolean;
|
||||||
property Value: Longint read GetAsLongint write SetAsLongint;
|
property Value: Longint read GetAsInteger write SetAsInteger;
|
||||||
published
|
published
|
||||||
property MaxValue: Longint read FMaxValue write SetMaxValue default 0;
|
property MaxValue: Longint read FMaxValue write SetMaxValue default 0;
|
||||||
property MinValue: Longint read FMinValue write SetMinValue default 0;
|
property MinValue: Longint read FMinValue write SetMinValue default 0;
|
||||||
@ -573,7 +573,7 @@ type
|
|||||||
Procedure SetMaxValue (AValue : Largeint);
|
Procedure SetMaxValue (AValue : Largeint);
|
||||||
protected
|
protected
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsLargeint: Largeint; override;
|
function GetAsLargeint: Largeint; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
@ -581,7 +581,7 @@ type
|
|||||||
procedure GetText(var AText: string; ADisplayText: Boolean); override;
|
procedure GetText(var AText: string; ADisplayText: Boolean); override;
|
||||||
function GetValue(var AValue: Largeint): Boolean;
|
function GetValue(var AValue: Largeint): Boolean;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsLargeint(AValue: Largeint); override;
|
procedure SetAsLargeint(AValue: Largeint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
@ -616,7 +616,7 @@ type
|
|||||||
|
|
||||||
TAutoIncField = class(TLongintField)
|
TAutoIncField = class(TLongintField)
|
||||||
Protected
|
Protected
|
||||||
Procedure SetAsLongInt(AValue : Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
end;
|
end;
|
||||||
@ -634,14 +634,14 @@ type
|
|||||||
protected
|
protected
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLargeInt: LargeInt; override;
|
function GetAsLargeInt: LargeInt; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetDataSize: Integer; override;
|
function GetDataSize: Integer; override;
|
||||||
procedure GetText(var theText: string; ADisplayText: Boolean); override;
|
procedure GetText(var theText: string; ADisplayText: Boolean); override;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLargeInt(AValue: LargeInt); override;
|
procedure SetAsLargeInt(AValue: LargeInt); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
public
|
public
|
||||||
@ -677,12 +677,12 @@ type
|
|||||||
function GetAsBoolean: Boolean; override;
|
function GetAsBoolean: Boolean; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetDataSize: Integer; override;
|
function GetDataSize: Integer; override;
|
||||||
function GetDefaultWidth: Longint; override;
|
function GetDefaultWidth: Longint; override;
|
||||||
procedure SetAsBoolean(AValue: Boolean); override;
|
procedure SetAsBoolean(AValue: Boolean); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
@ -783,7 +783,7 @@ type
|
|||||||
function GetAsBCD: TBCD; override;
|
function GetAsBCD: TBCD; override;
|
||||||
function GetAsCurrency: Currency; override;
|
function GetAsCurrency: Currency; override;
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetValue(var AValue: Currency): Boolean;
|
function GetValue(var AValue: Currency): Boolean;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
@ -792,7 +792,7 @@ type
|
|||||||
procedure GetText(var TheText: string; ADisplayText: Boolean); override;
|
procedure GetText(var TheText: string; ADisplayText: Boolean); override;
|
||||||
procedure SetAsBCD(const AValue: TBCD); override;
|
procedure SetAsBCD(const AValue: TBCD); override;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetAsCurrency(AValue: Currency); override;
|
procedure SetAsCurrency(AValue: Currency); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
@ -826,7 +826,7 @@ type
|
|||||||
function GetAsCurrency: Currency; override;
|
function GetAsCurrency: Currency; override;
|
||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
function GetAsLargeInt: LargeInt; override;
|
function GetAsLargeInt: LargeInt; override;
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
function GetAsVariant: variant; override;
|
function GetAsVariant: variant; override;
|
||||||
function GetDataSize: Integer; override;
|
function GetDataSize: Integer; override;
|
||||||
@ -835,7 +835,7 @@ type
|
|||||||
procedure SetAsBCD(const AValue: TBCD); override;
|
procedure SetAsBCD(const AValue: TBCD); override;
|
||||||
procedure SetAsFloat(AValue: Double); override;
|
procedure SetAsFloat(AValue: Double); override;
|
||||||
procedure SetAsLargeInt(AValue: LargeInt); override;
|
procedure SetAsLargeInt(AValue: LargeInt); override;
|
||||||
procedure SetAsLongint(AValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
procedure SetAsString(const AValue: string); override;
|
procedure SetAsString(const AValue: string); override;
|
||||||
procedure SetAsCurrency(AValue: Currency); override;
|
procedure SetAsCurrency(AValue: Currency); override;
|
||||||
procedure SetVarValue(const AValue: Variant); override;
|
procedure SetVarValue(const AValue: Variant); override;
|
||||||
@ -942,8 +942,8 @@ type
|
|||||||
function GetAsFloat: Double; override;
|
function GetAsFloat: Double; override;
|
||||||
procedure SetAsFloat(aValue: Double); override;
|
procedure SetAsFloat(aValue: Double); override;
|
||||||
|
|
||||||
function GetAsLongint: Longint; override;
|
function GetAsInteger: Longint; override;
|
||||||
procedure SetAsLongint(aValue: Longint); override;
|
procedure SetAsInteger(AValue: Longint); override;
|
||||||
|
|
||||||
function GetAsString: string; override;
|
function GetAsString: string; override;
|
||||||
procedure SetAsString(const aValue: string); override;
|
procedure SetAsString(const aValue: string); override;
|
||||||
|
@ -447,6 +447,12 @@ end;
|
|||||||
|
|
||||||
function TField.GetAsLongint: Longint;
|
function TField.GetAsLongint: Longint;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result:=GetAsInteger;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
raise AccessError(SInteger);
|
raise AccessError(SInteger);
|
||||||
end;
|
end;
|
||||||
@ -458,12 +464,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TField.GetAsInteger: Integer;
|
|
||||||
|
|
||||||
begin
|
|
||||||
Result:=GetAsLongint;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TField.GetAsString: string;
|
function TField.GetAsString: string;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -797,13 +797,13 @@ end;
|
|||||||
procedure TField.SetAsLongint(AValue: Longint);
|
procedure TField.SetAsLongint(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Raise AccessError(SInteger);
|
SetAsInteger(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TField.SetAsInteger(AValue: Integer);
|
procedure TField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsLongint(AValue);
|
raise AccessError(SInteger);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TField.SetAsLargeint(AValue: Largeint);
|
procedure TField.SetAsLargeint(AValue: Largeint);
|
||||||
@ -1055,7 +1055,7 @@ begin
|
|||||||
Result:=StrToFloat(GetAsString);
|
Result:=StrToFloat(GetAsString);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TStringField.GetAsLongint: Longint;
|
function TStringField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=StrToInt(GetAsString);
|
Result:=StrToInt(GetAsString);
|
||||||
@ -1159,7 +1159,7 @@ begin
|
|||||||
SetAsString(FloatToStr(AValue));
|
SetAsString(FloatToStr(AValue));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TStringField.SetAsLongint(AValue: Longint);
|
procedure TStringField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsString(intToStr(AValue));
|
SetAsString(intToStr(AValue));
|
||||||
@ -1354,7 +1354,7 @@ end;
|
|||||||
|
|
||||||
procedure TNumericField.SetAsBoolean(AValue: Boolean);
|
procedure TNumericField.SetAsBoolean(AValue: Boolean);
|
||||||
begin
|
begin
|
||||||
SetAsLongint(ord(AValue));
|
SetAsInteger(ord(AValue));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ ---------------------------------------------------------------------
|
{ ---------------------------------------------------------------------
|
||||||
@ -1375,15 +1375,15 @@ end;
|
|||||||
function TLongintField.GetAsFloat: Double;
|
function TLongintField.GetAsFloat: Double;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=GetAsLongint;
|
Result:=GetAsInteger;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLongintField.GetAsLargeint: Largeint;
|
function TLongintField.GetAsLargeint: Largeint;
|
||||||
begin
|
begin
|
||||||
Result:=GetAsLongint;
|
Result:=GetAsInteger;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLongintField.GetAsLongint: Longint;
|
function TLongintField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If Not GetValue(Result) then
|
If Not GetValue(Result) then
|
||||||
@ -1455,7 +1455,7 @@ end;
|
|||||||
procedure TLongintField.SetAsLargeint(AValue: Largeint);
|
procedure TLongintField.SetAsLargeint(AValue: Largeint);
|
||||||
begin
|
begin
|
||||||
if (AValue>=FMinRange) and (AValue<=FMaxRange) then
|
if (AValue>=FMinRange) and (AValue<=FMaxRange) then
|
||||||
SetAsLongint(AValue)
|
SetAsInteger(AValue)
|
||||||
else
|
else
|
||||||
RangeError(AValue,FMinRange,FMaxRange);
|
RangeError(AValue,FMinRange,FMaxRange);
|
||||||
end;
|
end;
|
||||||
@ -1463,10 +1463,10 @@ end;
|
|||||||
procedure TLongintField.SetAsFloat(AValue: Double);
|
procedure TLongintField.SetAsFloat(AValue: Double);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsLongint(Round(AValue));
|
SetAsInteger(Round(AValue));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLongintField.SetAsLongint(AValue: Longint);
|
procedure TLongintField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If CheckRange(AValue) then
|
If CheckRange(AValue) then
|
||||||
@ -1477,7 +1477,7 @@ end;
|
|||||||
|
|
||||||
procedure TLongintField.SetVarValue(const AValue: Variant);
|
procedure TLongintField.SetVarValue(const AValue: Variant);
|
||||||
begin
|
begin
|
||||||
SetAsLongint(AValue);
|
SetAsInteger(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLongintField.SetAsString(const AValue: string);
|
procedure TLongintField.SetAsString(const AValue: string);
|
||||||
@ -1491,7 +1491,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Val(AValue,L,Code);
|
Val(AValue,L,Code);
|
||||||
If Code=0 then
|
If Code=0 then
|
||||||
SetAsLongint(L)
|
SetAsInteger(L)
|
||||||
else
|
else
|
||||||
DatabaseErrorFMT(SNotAnInteger,[AValue]);
|
DatabaseErrorFMT(SNotAnInteger,[AValue]);
|
||||||
end;
|
end;
|
||||||
@ -1573,7 +1573,7 @@ begin
|
|||||||
Result:=Null;
|
Result:=Null;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLargeintField.GetAsLongint: Longint;
|
function TLargeintField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=GetAsLargeint;
|
Result:=GetAsLargeint;
|
||||||
@ -1641,7 +1641,7 @@ begin
|
|||||||
RangeError(AValue,FMinRange,FMaxRange);
|
RangeError(AValue,FMinRange,FMaxRange);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLargeintField.SetAsLongint(AValue: Longint);
|
procedure TLargeintField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsLargeint(AValue);
|
SetAsLargeint(AValue);
|
||||||
@ -1752,7 +1752,7 @@ begin
|
|||||||
SetDataType(ftAutoInc);
|
SetDataType(ftAutoInc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TAutoIncField.SetAsLongint(AValue : Longint);
|
Procedure TAutoIncField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
// Some databases allows insertion of explicit values into identity columns
|
// Some databases allows insertion of explicit values into identity columns
|
||||||
@ -1802,7 +1802,7 @@ begin
|
|||||||
Result:=Round(GetAsFloat);
|
Result:=Round(GetAsFloat);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFloatField.GetAsLongint: Longint;
|
function TFloatField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=Round(GetAsFloat);
|
Result:=Round(GetAsFloat);
|
||||||
@ -1874,7 +1874,7 @@ begin
|
|||||||
SetAsFloat(AValue);
|
SetAsFloat(AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFloatField.SetAsLongint(AValue: Longint);
|
procedure TFloatField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsFloat(AValue);
|
SetAsFloat(AValue);
|
||||||
@ -1978,12 +1978,12 @@ begin
|
|||||||
Result:=Length(FDisplays[false,True]);
|
Result:=Length(FDisplays[false,True]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBooleanField.GetAsLongint: Longint;
|
function TBooleanField.GetAsInteger: Longint;
|
||||||
begin
|
begin
|
||||||
Result := ord(GetAsBoolean);
|
Result := ord(GetAsBoolean);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBooleanField.SetAsLongint(AValue: Longint);
|
procedure TBooleanField.SetAsInteger(AValue: Longint);
|
||||||
begin
|
begin
|
||||||
SetAsBoolean(AValue<>0);
|
SetAsBoolean(AValue<>0);
|
||||||
end;
|
end;
|
||||||
@ -2425,7 +2425,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TBCDField.GetAsLongint: Longint;
|
function TBCDField.GetAsInteger: Longint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
result := round(GetAsCurrency);
|
result := round(GetAsCurrency);
|
||||||
@ -2523,7 +2523,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TBCDField.SetAsLongint(AValue: Longint);
|
procedure TBCDField.SetAsInteger(AValue: Longint);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SetAsCurrency(AValue);
|
SetAsCurrency(AValue);
|
||||||
@ -2626,7 +2626,7 @@ begin
|
|||||||
Result := 0;
|
Result := 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFMTBCDField.GetAsLongint: Longint;
|
function TFMTBCDField.GetAsInteger: Longint;
|
||||||
begin
|
begin
|
||||||
Result := round(GetAsFloat);
|
Result := round(GetAsFloat);
|
||||||
end;
|
end;
|
||||||
@ -2721,7 +2721,7 @@ begin
|
|||||||
SetAsBCD(IntegerToBCD(AValue));
|
SetAsBCD(IntegerToBCD(AValue));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFMTBCDField.SetAsLongint(AValue: Longint);
|
procedure TFMTBCDField.SetAsInteger(AValue: Longint);
|
||||||
begin
|
begin
|
||||||
SetAsBCD(IntegerToBCD(AValue));
|
SetAsBCD(IntegerToBCD(AValue));
|
||||||
end;
|
end;
|
||||||
@ -3102,7 +3102,7 @@ begin
|
|||||||
Result := GetAsVariant;
|
Result := GetAsVariant;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TVariantField.GetAsLongint: Longint;
|
function TVariantField.GetAsInteger: Longint;
|
||||||
begin
|
begin
|
||||||
Result := GetAsVariant;
|
Result := GetAsVariant;
|
||||||
end;
|
end;
|
||||||
@ -3138,7 +3138,7 @@ begin
|
|||||||
SetVarValue(aValue);
|
SetVarValue(aValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TVariantField.SetAsLongint(aValue: Longint);
|
procedure TVariantField.SetAsInteger(AValue: Longint);
|
||||||
begin
|
begin
|
||||||
SetVarValue(aValue);
|
SetVarValue(aValue);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user