mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-20 18:59:36 +02:00
* TBlobField must bet TBinaryField descendent, but needs to allow size 0
This commit is contained in:
parent
8619a9f296
commit
b4fb0f45dd
@ -662,7 +662,7 @@ type
|
|||||||
TBlobStreamMode = (bmRead, bmWrite, bmReadWrite);
|
TBlobStreamMode = (bmRead, bmWrite, bmReadWrite);
|
||||||
// TBlobType = ftBlob..ftMemo;
|
// TBlobType = ftBlob..ftMemo;
|
||||||
|
|
||||||
TBlobField = class(TField)
|
TBlobField = class(TBinaryField)
|
||||||
private
|
private
|
||||||
FModified : Boolean;
|
FModified : Boolean;
|
||||||
// Wrapper that retrieves FDataType as a TBlobType
|
// Wrapper that retrieves FDataType as a TBlobType
|
||||||
@ -670,6 +670,7 @@ type
|
|||||||
// Wrapper that calls SetFieldType
|
// Wrapper that calls SetFieldType
|
||||||
// procedure SetBlobType(AValue: TBlobType);
|
// procedure SetBlobType(AValue: TBlobType);
|
||||||
protected
|
protected
|
||||||
|
class procedure CheckTypeSize(AValue: Longint); override;
|
||||||
function GetBlobSize: Longint; virtual;
|
function GetBlobSize: Longint; virtual;
|
||||||
function GetIsNull: Boolean; override;
|
function GetIsNull: Boolean; override;
|
||||||
procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;
|
procedure GetText(var AText: string; ADisplayText{%H-}: Boolean); override;
|
||||||
@ -7027,6 +7028,11 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class procedure TBlobField.CheckTypeSize(AValue: Longint);
|
||||||
|
begin
|
||||||
|
If AValue<0 then
|
||||||
|
DatabaseErrorFmt(SInvalidFieldSize,[AValue]);
|
||||||
|
end;
|
||||||
|
|
||||||
function TBlobField.GetBlobSize: Longint;
|
function TBlobField.GetBlobSize: Longint;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user