85 |
|
FAttachment: IAttachment; |
86 |
|
FTransaction: ITransaction; |
87 |
|
public |
88 |
< |
procedure Assign(src: Firebird.IExternalContext); |
88 |
> |
constructor Create(aController: TFBUDRController; context: Firebird.IExternalContext); |
89 |
|
function AsText: AnsiString; |
90 |
|
public |
91 |
|
{IFBUDRExternalContext} |
549 |
|
|
550 |
|
{ TFBUDRExternalContext } |
551 |
|
|
552 |
< |
procedure TFBUDRExternalContext.Assign(src: Firebird.IExternalContext); |
553 |
< |
|
554 |
< |
function SameTransaction: boolean; |
555 |
< |
var tr1, tr2: Firebird.ITransaction; |
556 |
< |
begin |
557 |
< |
Result := false; |
558 |
< |
if FContext = nil then Exit; |
559 |
< |
tr1 := src.getTransaction(FStatus); |
560 |
< |
CheckStatus; |
561 |
< |
tr2 := FContext.getTransaction(FStatus); |
562 |
< |
CheckStatus; |
563 |
< |
Result := tr1 = tr2; |
564 |
< |
end; |
565 |
< |
|
566 |
< |
function SameAttachment: boolean; |
567 |
< |
var at1, at2: Firebird.IAttachment; |
568 |
< |
begin |
569 |
< |
Result := false; |
570 |
< |
if FContext = nil then Exit; |
571 |
< |
at1 := src.getAttachment(FStatus); |
572 |
< |
CheckStatus; |
573 |
< |
at2 := FContext.getAttachment(FStatus); |
574 |
< |
CheckStatus; |
575 |
< |
Result := at1 = at2; |
576 |
< |
end; |
577 |
< |
|
552 |
> |
constructor TFBUDRExternalContext.Create(aController: TFBUDRController; |
553 |
> |
context: Firebird.IExternalContext); |
554 |
|
begin |
555 |
< |
if src = FContext then Exit; |
556 |
< |
|
557 |
< |
if src = nil then |
582 |
< |
begin |
583 |
< |
FirebirdAPI := nil; |
584 |
< |
FTransaction := nil; |
585 |
< |
FAttachment := nil; |
586 |
< |
FContext := nil; |
587 |
< |
end |
588 |
< |
else |
589 |
< |
begin |
590 |
< |
if (FContext = nil) or (src.getMaster() <> FContext.getMaster) then |
591 |
< |
FirebirdAPI := TFB30ClientAPI.Create(src.getMaster); |
592 |
< |
|
593 |
< |
if not SameTransaction then |
594 |
< |
FTransaction := nil; |
595 |
< |
|
596 |
< |
if not SameAttachment then |
597 |
< |
FAttachment := nil; |
598 |
< |
|
599 |
< |
FContext := src; |
600 |
< |
end; |
555 |
> |
inherited Create(aController); |
556 |
> |
FContext := context; |
557 |
> |
FirebirdAPI := TFB30ClientAPI.Create(context.getMaster); |
558 |
|
end; |
559 |
|
|
560 |
|
function TFBUDRExternalContext.AsText: AnsiString; |