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

Comparing ibx/trunk/fbintf/client/2.5/FB25Statement.pas (file contents):
Revision 309 by tony, Tue Jul 21 08:00:42 2020 UTC vs.
Revision 349 by tony, Mon Oct 18 08:39:40 2021 UTC

# Line 128 | Line 128 | type
128      FOwnsSQLData: boolean;
129      FBlobMetaData: IBlobMetaData;
130      FArrayMetaData: IArrayMetaData;
131 +    FMetadataSize: short; {size of field from metadata}
132      FXSQLVAR: PXSQLVAR;       { Points to the PXSQLVAR in the owner object }
133    protected
134      function GetSQLType: cardinal; override;
# Line 144 | Line 145 | type
145      function GetIsNullable: boolean; override;
146      function GetSQLData: PByte;  override;
147      function GetDataLength: cardinal; override;
148 +    function GetSize: cardinal; override;
149 +    function GetAttachment: IAttachment; override;
150 +    function GetDefaultTextSQLType: cardinal; override;
151      procedure SetIsNull(Value: Boolean); override;
152      procedure SetIsNullable(Value: Boolean);  override;
153      procedure SetSQLData(AValue: PByte; len: cardinal); override;
# Line 163 | Line 167 | type
167      procedure Initialize; override;
168  
169      property Statement: TFB25Statement read FStatement;
170 +    property SQLType: cardinal read GetSQLType write SetSQLType;
171    end;
172  
173    TIBXINPUTSQLDA = class;
# Line 383 | Line 388 | begin
388    Result := FXSQLVAR^.sqllen;
389   end;
390  
391 + function TIBXSQLVAR.GetSize: cardinal;
392 + begin
393 +  Result := FMetadataSize;
394 + end;
395 +
396 + function TIBXSQLVAR.GetAttachment: IAttachment;
397 + begin
398 +  Result := FStatement.GetAttachment;
399 + end;
400 +
401   function TIBXSQLVAR.GetArrayMetaData: IArrayMetaData;
402   begin
403    if GetSQLType <> SQL_ARRAY then
# Line 456 | Line 471 | begin
471    FOwnsSQLData := true;
472    with FFirebird25ClientAPI, FXSQLVar^ do
473    begin
474 +    FMetadataSize := sqllen;
475      case sqltype and (not 1) of
476        SQL_TEXT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TIMESTAMP,
477        SQL_BLOB, SQL_ARRAY, SQL_QUAD, SQL_SHORT, SQL_BOOLEAN,
# Line 481 | Line 497 | begin
497      else
498        sqlInd :=  nil;
499    end;
500 +  SaveMetaData;
501   end;
502  
503   procedure TIBXSQLVAR.SetIsNull(Value: Boolean);
# Line 567 | Line 584 | begin
584    end;
585   end;
586  
587 + function TIBXSQLVAR.GetDefaultTextSQLType: cardinal;
588 + begin
589 +  Result := SQL_TEXT;
590 + end;
591 +
592   constructor TIBXSQLVAR.Create(aParent: TIBXSQLDA; aIndex: integer);
593   begin
594    inherited Create(aParent,aIndex);
# Line 980 | Line 1002 | begin
1002        if (FHandle <> nil) then
1003          FreeHandle;
1004        if E is EIBInterBaseError then
1005 <        raise EIBInterBaseError.Create(EIBInterBaseError(E).SQLCode,
1006 <                                       EIBInterBaseError(E).IBErrorCode,
985 <                                       EIBInterBaseError(E).Message +
986 <                                       sSQLErrorSeparator + FSQL)
987 <      else
988 <        raise;
1005 >        E.Message := E.Message + sSQLErrorSeparator + FSQL;
1006 >      raise;
1007      end;
1008    end;
1009    FPrepared := true;
# Line 1017 | Line 1035 | begin
1035    CheckHandle;
1036    if aTransaction <> FTransactionIntf then
1037      AddMonitor(aTransaction as TFB25Transaction);
1038 <  if (FSQLParams.FTransactionSeqNo < (FTransactionIntf as TFB25transaction).TransactionSeqNo) then
1038 >  if FStaleReferenceChecks and (FSQLParams.FTransactionSeqNo < (FTransactionIntf as TFB25transaction).TransactionSeqNo) then
1039      IBError(ibxeInterfaceOutofDate,[nil]);
1040  
1041    try
# Line 1080 | Line 1098 | begin
1098    CheckHandle;
1099    if aTransaction <> FTransactionIntf then
1100      AddMonitor(aTransaction as TFB25Transaction);
1101 <  if (FSQLParams.FTransactionSeqNo < (FTransactionIntf as TFB25transaction).TransactionSeqNo) then
1101 >  if FStaleReferenceChecks and (FSQLParams.FTransactionSeqNo < (FTransactionIntf as TFB25transaction).TransactionSeqNo) then
1102      IBError(ibxeInterfaceOutofDate,[nil]);
1103  
1104   with FFirebird25ClientAPI do

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines