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; |
161 |
|
FBufSize: ISC_LONG; |
162 |
|
FArrayID: TISC_QUAD; |
163 |
|
procedure AllocateBuffer; virtual; |
164 |
< |
procedure Changing; |
165 |
< |
procedure Changed; |
164 |
> |
procedure Changing; virtual; |
165 |
> |
procedure Changed; virtual; |
166 |
|
function GetArrayDesc: PISC_ARRAY_DESC; |
167 |
|
procedure InternalGetSlice; virtual; abstract; |
168 |
|
procedure InternalPutSlice(Force: boolean); virtual; abstract; |
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; |
400 |
|
if trim(Value) = '' then |
401 |
|
SetAsInt64(0) |
402 |
|
else |
403 |
< |
SetAsInt64(StrToInt(Value)); |
403 |
> |
SetAsInt64(AdjustScaleFromCurrency(StrToCurr(Value),GetScale)); |
404 |
|
|
405 |
|
SQL_D_FLOAT, |
406 |
|
SQL_DOUBLE, |
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; |
765 |
|
FMetaData := aField; |
766 |
|
FArrayID := ArrayID; |
767 |
|
FAttachment := aAttachment; |
768 |
+ |
FFirebirdClientAPI := aTransaction.FirebirdAPI; |
769 |
|
FTransactionIntf := aTransaction; |
770 |
|
FTransactionSeqNo := aTransaction.TransactionSeqNo; |
771 |
|
FIsNew := false; |