108 |
|
protected |
109 |
|
FArrayDesc: TISC_ARRAY_DESC; |
110 |
|
FCharSetID: integer; |
111 |
+ |
FAttachment: IAttachment; |
112 |
|
procedure LoadMetaData(aAttachment: IAttachment; aTransaction: ITransaction; |
113 |
|
relationName, columnName: AnsiString); virtual; abstract; |
114 |
|
function NumOfElements: integer; |
115 |
|
public |
116 |
|
constructor Create(aAttachment: IAttachment; aTransaction: ITransaction; |
117 |
|
relationName, columnName: AnsiString); overload; |
118 |
< |
constructor Create(SQLType: cardinal; tableName: AnsiString; columnName: AnsiString; |
118 |
> |
constructor Create(aAttachment: IAttachment;SQLType: cardinal; tableName: AnsiString; columnName: AnsiString; |
119 |
|
Scale: integer; size: cardinal; charSetID: cardinal; |
120 |
|
dimensions: cardinal; bounds: TArrayBounds); overload; |
121 |
|
function GetCodePage: TSystemCodePage; virtual; abstract; |
138 |
|
|
139 |
|
TFBArray = class(TActivityReporter,IArray) |
140 |
|
private |
141 |
+ |
FFirebirdClientAPI: TFBClientAPI; |
142 |
|
FMetaData: IArrayMetaData; |
143 |
|
FIsNew: boolean; |
144 |
|
FLoaded: boolean; |
275 |
|
|
276 |
|
constructor TFBArrayElement.Create(anArray: TFBArray; P: PByte); |
277 |
|
begin |
278 |
< |
inherited Create; |
278 |
> |
inherited Create(anArray.FFirebirdClientAPI); |
279 |
|
FArray := anArray; |
280 |
|
FBufPtr := P; |
281 |
|
end; |
488 |
|
aTransaction: ITransaction; relationName, columnName: AnsiString); |
489 |
|
begin |
490 |
|
inherited Create; |
491 |
+ |
FAttachment := aAttachment; |
492 |
|
LoadMetaData(aAttachment,aTransaction,relationName, columnName); |
493 |
|
end; |
494 |
|
|
495 |
< |
constructor TFBArrayMetaData.Create(SQLType: cardinal; tableName: AnsiString; |
496 |
< |
columnName: AnsiString; Scale: integer; size: cardinal; charSetID: cardinal; |
497 |
< |
dimensions: cardinal; bounds: TArrayBounds); |
495 |
> |
constructor TFBArrayMetaData.Create(aAttachment: IAttachment; |
496 |
> |
SQLType: cardinal; tableName: AnsiString; columnName: AnsiString; |
497 |
> |
Scale: integer; size: cardinal; charSetID: cardinal; dimensions: cardinal; |
498 |
> |
bounds: TArrayBounds); |
499 |
|
var i: integer; |
500 |
|
begin |
501 |
|
inherited Create; |
502 |
+ |
FAttachment := aAttachment; |
503 |
|
with FArrayDesc do |
504 |
|
begin |
505 |
|
array_desc_dtype := GetDType(SQLType); |
657 |
|
end; |
658 |
|
FBufSize := FElementSize * l; |
659 |
|
|
660 |
< |
with FirebirdClientAPI do |
660 |
> |
with FFirebirdClientAPI do |
661 |
|
IBAlloc(FBuffer,0,FBufSize); |
662 |
|
|
663 |
|
Dims := GetDimensions; |
746 |
|
inherited Create(aTransaction); |
747 |
|
FMetaData := aField; |
748 |
|
FAttachment := aAttachment; |
749 |
+ |
FFirebirdClientAPI := aTransaction.FirebirdAPI; |
750 |
|
FTransactionIntf := aTransaction; |
751 |
|
FTransactionSeqNo := aTransaction.TransactionSeqNo; |
752 |
|
FIsNew := true; |