ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/journaling/fbintf/client/FBBlob.pas
(Generate patch)

Comparing:
ibx/trunk/fbintf/client/FBBlob.pas (file contents), Revision 60 by tony, Mon Mar 27 15:21:02 2017 UTC vs.
ibx/branches/journaling/fbintf/client/FBBlob.pas (file contents), Revision 362 by tony, Tue Dec 7 13:27:39 2021 UTC

# Line 58 | Line 58 | type
58      FCharSetID: cardinal;
59      FSegmentSize: cardinal;
60      function Attachment: IAttachment; virtual; abstract;
61 +    function CanFetchMetaData: boolean;
62      procedure NeedFullMetadata; virtual; abstract;
63      procedure NeedSubType;
64    public
# Line 76 | Line 77 | type
77     function GetUnconfirmedCharacterSet: boolean;
78    end;
79  
80 <  TFBBlob = class(TActivityReporter)
80 >  TFBBlob = class(TActivityReporter,ITransactionUser)
81    private
82      FMetaData: IBlobMetaData;
83      FAttachment: IAttachment;
# Line 100 | Line 101 | type
101      constructor Create(Attachment: IAttachment; Transaction: TFBTransaction;
102                         MetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB); overload;
103      destructor Destroy; override;
104 <    procedure TransactionEnding(aTransaction: TFBTransaction; Force: boolean);
104 >
105 >  public
106 >    {ITransactionUser}
107 >    procedure TransactionEnding(aTransaction: ITransaction; Force: boolean);
108  
109    public
110      {IBlobMetaData}
# Line 138 | Line 142 | type
142  
143   implementation
144  
141 uses FBMessages;
142
145   { TFBBlob }
146  
147   procedure TFBBlob.ClearStringCache;
# Line 176 | Line 178 | begin
178    inherited Destroy;
179   end;
180  
181 < procedure TFBBlob.TransactionEnding(aTransaction: TFBTransaction;
180 <  Force: boolean);
181 > procedure TFBBlob.TransactionEnding(aTransaction: ITransaction; Force: boolean);
182   begin
183 <  if aTransaction  <> (FTransaction as TFBTransaction)  then
183 >  if (aTransaction as TObject) <> (FTransaction as TObject) then
184      Exit;
185    if FCreating then
186      InternalCancel(Force)
# Line 255 | Line 256 | begin
256    TotalSize := 0;
257    BlobType := btSegmented;
258  
259 <  BlobInfo := TBlobInfo.Create;
259 >  BlobInfo := TBlobInfo.Create(FAttachment.getFirebirdAPI as TFBClientAPI);
260    GetInfo([isc_info_blob_num_segments,
261             isc_info_blob_max_segment,
262             isc_info_blob_total_length,
# Line 404 | Line 405 | end;
405  
406   {TFBBlobMetaData}
407  
408 + function TFBBlobMetaData.CanFetchMetaData: boolean;
409 + begin
410 +  Result := (FRelationName <> '') and (FColumnName <> '');
411 + end;
412 +
413   procedure TFBBlobMetaData.NeedSubType;
414   begin
415    if not FHasSubType then
# Line 440 | Line 446 | end;
446  
447   function TFBBlobMetaData.GetCharSetID: cardinal;
448   begin
449 <  NeedFullMetadata;
449 >  if FUnconfirmedCharacterSet and CanFetchMetaData then
450 >    NeedFullMetadata;
451    Result := FCharSetID;
452   end;
453  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines