77 |
|
function GetUnconfirmedCharacterSet: boolean; |
78 |
|
end; |
79 |
|
|
80 |
< |
TFBBlob = class(TActivityReporter) |
80 |
> |
TFBBlob = class(TActivityReporter,ITransactionUser) |
81 |
|
private |
82 |
|
FMetaData: IBlobMetaData; |
83 |
|
FAttachment: IAttachment; |
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} |
142 |
|
|
143 |
|
implementation |
144 |
|
|
142 |
– |
uses FBMessages; |
143 |
– |
|
145 |
|
{ TFBBlob } |
146 |
|
|
147 |
|
procedure TFBBlob.ClearStringCache; |
178 |
|
inherited Destroy; |
179 |
|
end; |
180 |
|
|
181 |
< |
procedure TFBBlob.TransactionEnding(aTransaction: TFBTransaction; |
181 |
< |
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) |
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, |
446 |
|
|
447 |
|
function TFBBlobMetaData.GetCharSetID: cardinal; |
448 |
|
begin |
449 |
< |
if CanFetchMetaData then |
450 |
< |
begin |
449 |
> |
if FUnconfirmedCharacterSet and CanFetchMetaData then |
450 |
|
NeedFullMetadata; |
451 |
< |
Result := FCharSetID; |
453 |
< |
end |
454 |
< |
else |
455 |
< |
if Attachment.HasDefaultCharSet then |
456 |
< |
Result := Attachment.GetDefaultCharSetID |
457 |
< |
else |
458 |
< |
Result := FCharSetID; |
451 |
> |
Result := FCharSetID; |
452 |
|
end; |
453 |
|
|
454 |
|
function TFBBlobMetaData.GetCodePage: TSystemCodePage; |