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

Comparing ibx/trunk/fbintf/client/FBAttachment.pas (file contents):
Revision 344 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
Revision 345 by tony, Mon Aug 23 14:22:29 2021 UTC

# Line 41 | Line 41 | uses
41    Classes, SysUtils, {$IFDEF WINDOWS} windows, {$ENDIF} IB,  FBParamBlock,
42    FBActivityMonitor, FBClientAPI;
43  
44 + const
45 +  DefaultMaxInlineBlobLimit = 8192;
46 +
47   type
48    TCharsetMap = record
49      CharsetID: integer;
# Line 60 | Line 63 | type
63      FODSMinorVersion: integer;
64      FUserCharSetMap: array of TCharSetMap;
65      FSecDatabase: AnsiString;
66 +    FInlineBlobLimit: integer;
67    protected
68      FDatabaseName: AnsiString;
69      FRaiseExceptionOnConnectError: boolean;
# Line 147 | Line 151 | type
151      function GetODSMajorVersion: integer;
152      function GetODSMinorVersion: integer;
153      function HasDecFloatSupport: boolean; virtual;
154 +    function GetInlineBlobLimit: integer;
155 +    procedure SetInlineBlobLimit(limit: integer);
156 +    function HasBatchMode: boolean; virtual;
157  
158    public
159      {Character Sets}
# Line 185 | Line 192 | type
192     function LookupItemType(ParamTypeName: AnsiString): byte; override;
193    public
194      constructor Create(api: TFBClientAPI);
195 +    function GetParamTypeName(ParamType: byte): Ansistring;
196 +    {$IFDEF FPC}
197 +    function IDPB.GetDPBParamTypeName = GetParamTypeName;
198 +    {$ELSE}
199      function GetDPBParamTypeName(ParamType: byte): Ansistring;
200 +    {$ENDIF}
201    end;
202  
203   implementation
# Line 451 | Line 463 | begin
463    FRaiseExceptionOnConnectError := RaiseExceptionOnConnectError;
464    FODSMajorVersion := 0;
465    FODSMinorVersion := 0;
466 +  FInlineBlobLimit := DefaultMaxInlineBlobLimit;
467   end;
468  
469   function TFBAttachment.GenerateCreateDatabaseSQL(DatabaseName: AnsiString;  aDPB: IDPB): AnsiString;
# Line 861 | Line 874 | begin
874    Result := false;
875   end;
876  
877 + function TFBAttachment.GetInlineBlobLimit: integer;
878 + begin
879 +  Result := FInlineBlobLimit;
880 + end;
881 +
882 + procedure TFBAttachment.SetInlineBlobLimit(limit: integer);
883 + begin
884 +  if limit > 32*1024 then
885 +     FInlineBlobLimit := 32*1024
886 +  else
887 +    FInlineBlobLimit := limit;
888 + end;
889 +
890 + function TFBAttachment.HasBatchMode: boolean;
891 + begin
892 +  Result := false;
893 + end;
894 +
895   function TFBAttachment.HasDefaultCharSet: boolean;
896   begin
897    Result := FHasDefaultCharSet
# Line 1031 | Line 1062 | begin
1062    FBuffer^ := isc_dpb_version1;
1063   end;
1064  
1065 < function TDPB.GetDPBParamTypeName(ParamType: byte): Ansistring;
1065 > function TDPB.GetParamTypeName(ParamType: byte): Ansistring;
1066   begin
1067    if ParamType <= isc_dpb_last_dpb_constant then
1068      Result := DPBConstantNames[ParamType]
# Line 1039 | Line 1070 | begin
1070      Result := '';
1071   end;
1072  
1073 + {$IFNDEF FPC}
1074 + function TDPB.GetDPBParamTypeName(ParamType: byte): Ansistring;
1075 + begin
1076 +  Result := GetParamTypeName(ParamType);
1077 + end;
1078 + {$ENDIF}
1079 +
1080   function TDPB.LookupItemType(ParamTypeName: AnsiString): byte;
1081   var i: byte;
1082   begin

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines