mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
fcl-db: base: cosmetic
git-svn-id: trunk@27113 -
This commit is contained in:
parent
0b56c2e237
commit
17ad74aba4
@ -955,8 +955,8 @@ procedure TDataSet.OpenCursor(InfoQuery: Boolean);
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
if InfoQuery then
|
if InfoQuery then
|
||||||
InternalInitfieldDefs
|
InternalInitFieldDefs
|
||||||
else if state <> dsOpening then
|
else if State <> dsOpening then
|
||||||
DoInternalOpen;
|
DoInternalOpen;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1065,6 +1065,16 @@ begin
|
|||||||
FIsUniDirectional := Value;
|
FIsUniDirectional := Value;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class function TDataSet.FieldDefsClass: TFieldDefsClass;
|
||||||
|
begin
|
||||||
|
Result:=TFieldDefs;
|
||||||
|
end;
|
||||||
|
|
||||||
|
class function TDataSet.FieldsClass: TFieldsClass;
|
||||||
|
begin
|
||||||
|
Result:=TFields;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TDataSet.SetActive(Value: Boolean);
|
procedure TDataSet.SetActive(Value: Boolean);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -1383,7 +1393,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDataSet.Tempbuffer: TRecordBuffer;
|
function TDataSet.TempBuffer: TRecordBuffer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result := FBuffers[FRecordCount];
|
Result := FBuffers[FRecordCount];
|
||||||
@ -2276,7 +2286,7 @@ begin
|
|||||||
FBuffers[0]:=TempBuf;
|
FBuffers[0]:=TempBuf;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TDataSet.GetFieldValues(const fieldname: string): Variant;
|
function TDataSet.GetFieldValues(const FieldName: string): Variant;
|
||||||
|
|
||||||
var i: Integer;
|
var i: Integer;
|
||||||
FieldList: TList;
|
FieldList: TList;
|
||||||
@ -2295,7 +2305,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDataSet.SetFieldValues(const fieldname: string; Value: Variant);
|
procedure TDataSet.SetFieldValues(const FieldName: string; Value: Variant);
|
||||||
|
|
||||||
var
|
var
|
||||||
i, l, h : Integer;
|
i, l, h : Integer;
|
||||||
@ -2463,16 +2473,6 @@ begin
|
|||||||
DatabaseError('Provider support not available', Self);
|
DatabaseError('Provider support not available', Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TDataSet.FieldDefsClass: TFieldDefsClass;
|
|
||||||
begin
|
|
||||||
Result:=TFieldDefs;
|
|
||||||
end;
|
|
||||||
|
|
||||||
class function TDataSet.FieldsClass: TFieldsClass;
|
|
||||||
begin
|
|
||||||
Result:=TFields;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TDataSet.PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet
|
function TDataSet.PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet
|
||||||
): Boolean;
|
): Boolean;
|
||||||
begin
|
begin
|
||||||
|
@ -133,7 +133,7 @@ type
|
|||||||
TFieldAttribute = (faHiddenCol, faReadonly, faRequired, faLink, faUnNamed, faFixed);
|
TFieldAttribute = (faHiddenCol, faReadonly, faRequired, faLink, faUnNamed, faFixed);
|
||||||
TFieldAttributes = set of TFieldAttribute;
|
TFieldAttributes = set of TFieldAttribute;
|
||||||
|
|
||||||
{ TNamedItem }
|
{ TNamedItem }
|
||||||
|
|
||||||
TNamedItem = class(TCollectionItem)
|
TNamedItem = class(TCollectionItem)
|
||||||
private
|
private
|
||||||
@ -147,7 +147,7 @@ type
|
|||||||
property Name : string read FName write SetDisplayName;
|
property Name : string read FName write SetDisplayName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TDefCollection }
|
{ TDefCollection }
|
||||||
|
|
||||||
TDefCollection = class(TOwnedCollection)
|
TDefCollection = class(TOwnedCollection)
|
||||||
private
|
private
|
||||||
@ -164,7 +164,7 @@ type
|
|||||||
property Updated: boolean read FUpdated write FUpdated;
|
property Updated: boolean read FUpdated write FUpdated;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TFieldDef }
|
{ TFieldDef }
|
||||||
|
|
||||||
TFieldDef = class(TNamedItem)
|
TFieldDef = class(TNamedItem)
|
||||||
Private
|
Private
|
||||||
@ -199,6 +199,7 @@ type
|
|||||||
property Size: Integer read FSize write SetSize;
|
property Size: Integer read FSize write SetSize;
|
||||||
end;
|
end;
|
||||||
TFieldDefClass = Class of TFieldDef;
|
TFieldDefClass = Class of TFieldDef;
|
||||||
|
|
||||||
{ TFieldDefs }
|
{ TFieldDefs }
|
||||||
|
|
||||||
TFieldDefs = class(TDefCollection)
|
TFieldDefs = class(TDefCollection)
|
||||||
@ -211,7 +212,7 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(ADataSet: TDataSet);
|
constructor Create(ADataSet: TDataSet);
|
||||||
// destructor Destroy; override;
|
// destructor Destroy; override;
|
||||||
Function Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNum : Integer) : TFieldDef; overload;
|
Function Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNo : Integer) : TFieldDef; overload;
|
||||||
procedure Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean); overload;
|
procedure Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean); overload;
|
||||||
procedure Add(const AName: string; ADataType: TFieldType; ASize: Word); overload;
|
procedure Add(const AName: string; ADataType: TFieldType; ASize: Word); overload;
|
||||||
procedure Add(const AName: string; ADataType: TFieldType); overload;
|
procedure Add(const AName: string; ADataType: TFieldType); overload;
|
||||||
@ -245,7 +246,7 @@ type
|
|||||||
Value: Variant;
|
Value: Variant;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TLookupList }
|
{ TLookupList }
|
||||||
|
|
||||||
TLookupList = class(TObject)
|
TLookupList = class(TObject)
|
||||||
private
|
private
|
||||||
@ -260,7 +261,7 @@ type
|
|||||||
procedure ValuesToStrings(AStrings: TStrings);
|
procedure ValuesToStrings(AStrings: TStrings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TField }
|
{ TField }
|
||||||
|
|
||||||
TField = class(TComponent)
|
TField = class(TComponent)
|
||||||
private
|
private
|
||||||
@ -512,8 +513,8 @@ type
|
|||||||
property Value: WideString read GetAsWideString write SetAsWideString;
|
property Value: WideString read GetAsWideString write SetAsWideString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TNumericField }
|
{ TNumericField }
|
||||||
|
|
||||||
TNumericField = class(TField)
|
TNumericField = class(TField)
|
||||||
Private
|
Private
|
||||||
FDisplayFormat : String;
|
FDisplayFormat : String;
|
||||||
@ -1116,7 +1117,7 @@ type
|
|||||||
end;
|
end;
|
||||||
TFieldsClass = Class of TFields;
|
TFieldsClass = Class of TFields;
|
||||||
|
|
||||||
{ TParam }
|
{ TParam }
|
||||||
|
|
||||||
TBlobData = AnsiString; // Delphi defines it as alias to TBytes
|
TBlobData = AnsiString; // Delphi defines it as alias to TBytes
|
||||||
|
|
||||||
@ -1223,7 +1224,7 @@ type
|
|||||||
end;
|
end;
|
||||||
TParamClass = Class of TParam;
|
TParamClass = Class of TParam;
|
||||||
|
|
||||||
{ TParams }
|
{ TParams }
|
||||||
|
|
||||||
TParams = class(TCollection)
|
TParams = class(TCollection)
|
||||||
private
|
private
|
||||||
@ -1478,7 +1479,7 @@ type
|
|||||||
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
procedure GetChildren(Proc: TGetChildProc; Root: TComponent); override;
|
||||||
function GetFieldClass(FieldType: TFieldType): TFieldClass; virtual;
|
function GetFieldClass(FieldType: TFieldType): TFieldClass; virtual;
|
||||||
Function GetfieldCount : Integer;
|
Function GetfieldCount : Integer;
|
||||||
function GetFieldValues(const fieldname : string) : Variant; virtual;
|
function GetFieldValues(const FieldName : string) : Variant; virtual;
|
||||||
function GetIsIndexField(Field: TField): Boolean; virtual;
|
function GetIsIndexField(Field: TField): Boolean; virtual;
|
||||||
function GetIndexDefs(IndexDefs : TIndexDefs; IndexTypes : TIndexOptions) : TIndexDefs;
|
function GetIndexDefs(IndexDefs : TIndexDefs; IndexTypes : TIndexOptions) : TIndexDefs;
|
||||||
function GetNextRecords: Longint; virtual;
|
function GetNextRecords: Longint; virtual;
|
||||||
@ -1507,7 +1508,7 @@ type
|
|||||||
procedure SetFiltered(Value: Boolean); virtual;
|
procedure SetFiltered(Value: Boolean); virtual;
|
||||||
procedure SetFilterOptions(Value: TFilterOptions); virtual;
|
procedure SetFilterOptions(Value: TFilterOptions); virtual;
|
||||||
procedure SetFilterText(const Value: string); virtual;
|
procedure SetFilterText(const Value: string); virtual;
|
||||||
procedure SetFieldValues(const fieldname: string; Value: Variant); virtual;
|
procedure SetFieldValues(const FieldName: string; Value: Variant); virtual;
|
||||||
procedure SetFound(const Value: Boolean); virtual;
|
procedure SetFound(const Value: Boolean); virtual;
|
||||||
procedure SetModified(Value: Boolean);
|
procedure SetModified(Value: Boolean);
|
||||||
procedure SetName(const Value: TComponentName); override;
|
procedure SetName(const Value: TComponentName); override;
|
||||||
@ -1515,7 +1516,7 @@ type
|
|||||||
procedure SetRecNo(Value: Longint); virtual;
|
procedure SetRecNo(Value: Longint); virtual;
|
||||||
procedure SetState(Value: TDataSetState);
|
procedure SetState(Value: TDataSetState);
|
||||||
function SetTempState(const Value: TDataSetState): TDataSetState;
|
function SetTempState(const Value: TDataSetState): TDataSetState;
|
||||||
Function Tempbuffer: TRecordBuffer;
|
Function TempBuffer: TRecordBuffer;
|
||||||
procedure UpdateIndexDefs; virtual;
|
procedure UpdateIndexDefs; virtual;
|
||||||
property ActiveRecord: Longint read FActiveRecord;
|
property ActiveRecord: Longint read FActiveRecord;
|
||||||
property CurrentRecord: Longint read FCurrentRecord;
|
property CurrentRecord: Longint read FCurrentRecord;
|
||||||
@ -1545,6 +1546,8 @@ type
|
|||||||
procedure SetBookmarkFlag(Buffer: TRecordBuffer; Value: TBookmarkFlag); virtual;
|
procedure SetBookmarkFlag(Buffer: TRecordBuffer; Value: TBookmarkFlag); virtual;
|
||||||
procedure SetBookmarkData(Buffer: TRecordBuffer; Data: Pointer); virtual;
|
procedure SetBookmarkData(Buffer: TRecordBuffer; Data: Pointer); virtual;
|
||||||
procedure SetUniDirectional(const Value: Boolean);
|
procedure SetUniDirectional(const Value: Boolean);
|
||||||
|
class function FieldDefsClass : TFieldDefsClass; virtual;
|
||||||
|
class function FieldsClass : TFieldsClass; virtual;
|
||||||
protected { abstract methods }
|
protected { abstract methods }
|
||||||
function GetRecord(Buffer: TRecordBuffer; GetMode: TGetMode; DoCheck: Boolean): TGetResult; virtual; abstract;
|
function GetRecord(Buffer: TRecordBuffer; GetMode: TGetMode; DoCheck: Boolean): TGetResult; virtual; abstract;
|
||||||
procedure InternalClose; virtual; abstract;
|
procedure InternalClose; virtual; abstract;
|
||||||
@ -1575,8 +1578,6 @@ type
|
|||||||
procedure PSSetCommandText(const CommandText: string); virtual;
|
procedure PSSetCommandText(const CommandText: string); virtual;
|
||||||
procedure PSSetParams(AParams: TParams); virtual;
|
procedure PSSetParams(AParams: TParams); virtual;
|
||||||
procedure PSStartTransaction; virtual;
|
procedure PSStartTransaction; virtual;
|
||||||
class function FieldDefsClass : TFieldDefsClass; virtual;
|
|
||||||
class function FieldsClass : TFieldsClass; virtual;
|
|
||||||
function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet)
|
function PSUpdateRecord(UpdateKind: TUpdateKind; Delta: TDataSet)
|
||||||
: Boolean; virtual;
|
: Boolean; virtual;
|
||||||
public
|
public
|
||||||
@ -1654,7 +1655,7 @@ type
|
|||||||
property RecordSize: Word read GetRecordSize;
|
property RecordSize: Word read GetRecordSize;
|
||||||
property State: TDataSetState read FState;
|
property State: TDataSetState read FState;
|
||||||
property Fields : TFields read FFieldList;
|
property Fields : TFields read FFieldList;
|
||||||
property FieldValues[fieldname : string] : Variant read GetFieldValues write SetFieldValues; default;
|
property FieldValues[FieldName : string] : Variant read GetFieldValues write SetFieldValues; default;
|
||||||
property Filter: string read FFilterText write SetFilterText;
|
property Filter: string read FFilterText write SetFilterText;
|
||||||
property Filtered: Boolean read FFiltered write SetFiltered default False;
|
property Filtered: Boolean read FFiltered write SetFiltered default False;
|
||||||
property FilterOptions: TFilterOptions read FFilterOptions write SetFilterOptions;
|
property FilterOptions: TFilterOptions read FFilterOptions write SetFilterOptions;
|
||||||
|
@ -225,9 +225,9 @@ begin
|
|||||||
Inherited Create(ADataset, Owner, FieldDefClass);
|
Inherited Create(ADataset, Owner, FieldDefClass);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNum: Integer): TFieldDef;
|
function TFieldDefs.Add(const AName: string; ADataType: TFieldType; ASize: Word; ARequired: Boolean; AFieldNo: Integer): TFieldDef;
|
||||||
begin
|
begin
|
||||||
Result:=FieldDefClass.create(Self,AName,ADataType,ASize,ARequired,AFieldNum);
|
Result:=FieldDefClass.create(Self,AName,ADataType,ASize,ARequired,AFieldNo);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFieldDefs.Assign(FieldDefs: TFieldDefs);
|
procedure TFieldDefs.Assign(FieldDefs: TFieldDefs);
|
||||||
|
Loading…
Reference in New Issue
Block a user