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

Comparing ibx/trunk/fbintf/client/FBAttachment.pas (file contents):
Revision 270 by tony, Fri Jan 18 11:10:37 2019 UTC vs.
Revision 291 by tony, Fri Apr 17 10:26:08 2020 UTC

# Line 123 | Line 123 | type
123      function GetEventHandler(Event: AnsiString): IEvents; overload;
124  
125      function GetSQLDialect: integer;
126 +    function CreateBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BPB: IBPB=nil): IBlob; overload;
127 +    function CreateBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BPB: IBPB=nil): IBlob; overload; virtual; abstract;
128      function OpenBlob(transaction: ITransaction; BlobMetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload; virtual; abstract;
129 +    function OpenBlob(transaction: ITransaction; RelationName, ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB=nil): IBlob; overload;
130      function OpenBlob(transaction: ITransaction; Field: ISQLData; BPB: IBPB=nil): IBlob; overload;
131 +    function CreateArray(transaction: ITransaction; RelationName, ColumnName: AnsiString
132 +      ): IArray; overload;
133 +    function CreateArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData): IArray; overload; virtual; abstract;
134 +    function OpenArray(transaction: ITransaction; RelationName, ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray; overload;
135 +    function OpenArray(transaction: ITransaction; ArrayMetaData: IArrayMetaData; ArrayID: TISC_QUAD): IArray; overload; virtual; abstract;
136      property SQLDialect: integer read FSQLDialect;
137      property DPB: IDPB read FDPB;
138   public
# Line 147 | Line 155 | public
155    function CharSetWidth(CharSetID: integer; var Width: integer): boolean;
156    procedure RegisterCharSet(CharSetName: AnsiString; CodePage: TSystemCodePage;
157      AllowReverseLookup:boolean; out CharSetID: integer);
158 +  function GetBlobMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IBlobMetaData; virtual; abstract;
159 +  function GetArrayMetaData(Transaction: ITransaction; tableName, columnName: AnsiString): IArrayMetaData; virtual; abstract;
160    property CharSetID: integer read FCharSetID;
161    property CodePage: TSystemCodePage read FCodePage;
162    end;
# Line 615 | Line 625 | begin
625    Result := FSQLDialect;
626   end;
627  
628 + function TFBAttachment.CreateBlob(transaction: ITransaction; RelationName,
629 +  ColumnName: AnsiString; BPB: IBPB): IBlob;
630 + begin
631 +  Result := CreateBlob(transaction,GetBlobMetaData(Transaction,RelationName,ColumnName),BPB);
632 + end;
633 +
634 + function TFBAttachment.OpenBlob(transaction: ITransaction; RelationName,
635 +  ColumnName: AnsiString; BlobID: TISC_QUAD; BPB: IBPB): IBlob;
636 + begin
637 +  Result := OpenBlob(Transaction,
638 +                GetBlobMetaData(Transaction,RelationName,ColumnName),
639 +                BlobID,BPB);
640 + end;
641 +
642   function TFBAttachment.OpenBlob(transaction: ITransaction; Field: ISQLData;
643    BPB: IBPB): IBlob;
644   begin
645    Result := OpenBlob(Transaction,Field.GetBlobMetadata, Field.AsQuad,BPB);
646   end;
647  
648 + function TFBAttachment.CreateArray(transaction: ITransaction; RelationName,
649 +  ColumnName: AnsiString): IArray;
650 + begin
651 +  Result := CreateArray(transaction,GetArrayMetaData(transaction,RelationName,ColumnName));
652 + end;
653 +
654 + function TFBAttachment.OpenArray(transaction: ITransaction; RelationName,
655 +  ColumnName: AnsiString; ArrayID: TISC_QUAD): IArray;
656 + begin
657 +  Result := OpenArray(transaction,
658 +    GetArrayMetaData(transaction,RelationName,ColumnName),ArrayID);
659 + end;
660 +
661   function TFBAttachment.GetDBInformation(Requests: array of byte
662    ): IDBInformation;
663   var ReqBuffer: PByte;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines