mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 22:14:25 +02:00
fcl-db: change var params to out in TParams.ParseSQL to reduce compiler hints about uninitialized variables.
git-svn-id: trunk@22960 -
This commit is contained in:
parent
4aa05f5133
commit
2a7c9f0848
@ -1231,8 +1231,8 @@ type
|
|||||||
Function ParamByName(const Value: string): TParam;
|
Function ParamByName(const Value: string): TParam;
|
||||||
Function ParseSQL(SQL: String; DoCreate: Boolean): String; overload;
|
Function ParseSQL(SQL: String; DoCreate: Boolean): String; overload;
|
||||||
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle): String; overload;
|
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle): String; overload;
|
||||||
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; var ParamBinding: TParambinding): String; overload;
|
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding): String; overload;
|
||||||
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; var ParamBinding: TParambinding; var ReplaceString : string): String; overload;
|
Function ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding; out ReplaceString : string): String; overload;
|
||||||
Procedure RemoveParam(Value: TParam);
|
Procedure RemoveParam(Value: TParam);
|
||||||
Procedure CopyParamValuesFromDataset(ADataset : TDataset; CopyBound : Boolean);
|
Procedure CopyParamValuesFromDataset(ADataset : TDataset; CopyBound : Boolean);
|
||||||
Property Dataset : TDataset Read GetDataset;
|
Property Dataset : TDataset Read GetDataset;
|
||||||
|
@ -181,7 +181,7 @@ begin
|
|||||||
Result := ParseSQL(SQL,DoCreate,EscapeSlash,EscapeRepeat,ParameterStyle,pb, rs);
|
Result := ParseSQL(SQL,DoCreate,EscapeSlash,EscapeRepeat,ParameterStyle,pb, rs);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; var ParamBinding: TParambinding): String;
|
Function TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat : Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding): String;
|
||||||
|
|
||||||
var rs : string;
|
var rs : string;
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ begin
|
|||||||
end; {case}
|
end; {case}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat: Boolean; ParameterStyle : TParamStyle; var ParamBinding: TParambinding; var ReplaceString : string): String;
|
Function TParams.ParseSQL(SQL: String; DoCreate, EscapeSlash, EscapeRepeat: Boolean; ParameterStyle : TParamStyle; out ParamBinding: TParambinding; out ReplaceString : string): String;
|
||||||
|
|
||||||
type
|
type
|
||||||
// used for ParamPart
|
// used for ParamPart
|
||||||
@ -268,7 +268,7 @@ begin
|
|||||||
ParamCount:=0;
|
ParamCount:=0;
|
||||||
NewQueryLength:=Length(SQL);
|
NewQueryLength:=Length(SQL);
|
||||||
SetLength(ParamPart,ParamAllocStepSize);
|
SetLength(ParamPart,ParamAllocStepSize);
|
||||||
SetLength(Parambinding,ParamAllocStepSize);
|
SetLength(ParamBinding,ParamAllocStepSize);
|
||||||
QuestionMarkParamCount:=0; // number of ? params found in query so far
|
QuestionMarkParamCount:=0; // number of ? params found in query so far
|
||||||
|
|
||||||
ReplaceString := '$';
|
ReplaceString := '$';
|
||||||
|
Loading…
Reference in New Issue
Block a user