90 |
|
function GetName: AnsiString; override; |
91 |
|
function GetScale: integer; override; |
92 |
|
function GetSize: integer; |
93 |
+ |
function GetCharSetWidth: integer; override; |
94 |
|
function GetAsString: AnsiString; override; |
95 |
|
procedure SetAsLong(Value: Long); override; |
96 |
|
procedure SetAsShort(Value: Short); override; |
128 |
|
function GetScale: integer; |
129 |
|
function GetSize: cardinal; |
130 |
|
function GetCharSetID: cardinal; virtual; abstract; |
131 |
+ |
function GetCharSetWidth: integer; virtual; abstract; |
132 |
|
function GetTableName: AnsiString; |
133 |
|
function GetColumnName: AnsiString; |
134 |
|
function GetDimensions: integer; |
140 |
|
|
141 |
|
TFBArray = class(TActivityReporter,IArray) |
142 |
|
private |
143 |
+ |
FFirebirdClientAPI: TFBClientAPI; |
144 |
|
FMetaData: IArrayMetaData; |
145 |
|
FIsNew: boolean; |
146 |
|
FLoaded: boolean; |
163 |
|
FBufSize: ISC_LONG; |
164 |
|
FArrayID: TISC_QUAD; |
165 |
|
procedure AllocateBuffer; virtual; |
166 |
< |
procedure Changing; |
167 |
< |
procedure Changed; |
166 |
> |
procedure Changing; virtual; |
167 |
> |
procedure Changed; virtual; |
168 |
|
function GetArrayDesc: PISC_ARRAY_DESC; |
169 |
|
procedure InternalGetSlice; virtual; abstract; |
170 |
|
procedure InternalPutSlice(Force: boolean); virtual; abstract; |
184 |
|
function GetScale: integer; |
185 |
|
function GetSize: cardinal; |
186 |
|
function GetCharSetID: cardinal; |
187 |
+ |
function GetCharSetWidth: integer; |
188 |
|
function GetTableName: AnsiString; |
189 |
|
function GetColumnName: AnsiString; |
190 |
|
function GetDimensions: integer; |
278 |
|
|
279 |
|
constructor TFBArrayElement.Create(anArray: TFBArray; P: PByte); |
280 |
|
begin |
281 |
< |
inherited Create; |
281 |
> |
inherited Create(anArray.FFirebirdClientAPI); |
282 |
|
FArray := anArray; |
283 |
|
FBufPtr := P; |
284 |
|
end; |
303 |
|
Result := GetDataLength; |
304 |
|
end; |
305 |
|
|
306 |
+ |
function TFBArrayElement.GetCharSetWidth: integer; |
307 |
+ |
begin |
308 |
+ |
Result := FArray.FMetaData.GetCharSetWidth; |
309 |
+ |
end; |
310 |
+ |
|
311 |
|
function TFBArrayElement.GetAsString: AnsiString; |
312 |
|
var rs: RawByteString; |
313 |
|
begin |
665 |
|
end; |
666 |
|
FBufSize := FElementSize * l; |
667 |
|
|
668 |
< |
with FirebirdClientAPI do |
668 |
> |
with FFirebirdClientAPI do |
669 |
|
IBAlloc(FBuffer,0,FBufSize); |
670 |
|
|
671 |
|
Dims := GetDimensions; |
754 |
|
inherited Create(aTransaction); |
755 |
|
FMetaData := aField; |
756 |
|
FAttachment := aAttachment; |
757 |
+ |
FFirebirdClientAPI := aTransaction.FirebirdAPI; |
758 |
|
FTransactionIntf := aTransaction; |
759 |
|
FTransactionSeqNo := aTransaction.TransactionSeqNo; |
760 |
|
FIsNew := true; |
773 |
|
FMetaData := aField; |
774 |
|
FArrayID := ArrayID; |
775 |
|
FAttachment := aAttachment; |
776 |
+ |
FFirebirdClientAPI := aTransaction.FirebirdAPI; |
777 |
|
FTransactionIntf := aTransaction; |
778 |
|
FTransactionSeqNo := aTransaction.TransactionSeqNo; |
779 |
|
FIsNew := false; |
864 |
|
Result := FMetaData.GetCharSetID; |
865 |
|
end; |
866 |
|
|
867 |
+ |
function TFBArray.GetCharSetWidth: integer; |
868 |
+ |
begin |
869 |
+ |
Result := FMetaData.GetCharSetWidth; |
870 |
+ |
end; |
871 |
+ |
|
872 |
|
function TFBArray.GetTableName: AnsiString; |
873 |
|
begin |
874 |
|
Result := FMetaData.GetTableName; |