mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 09:29:07 +02:00
fcl-db: mysql: formatting (remove unused variables)
git-svn-id: trunk@25026 -
This commit is contained in:
parent
029eb92bd0
commit
f2464fbf3d
@ -4,7 +4,7 @@
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,bufdataset,sqldb,db,dynlibs,ctypes,
|
Classes, SysUtils,bufdataset,sqldb,db,ctypes,
|
||||||
{$IFDEF mysql55}
|
{$IFDEF mysql55}
|
||||||
mysql55dyn;
|
mysql55dyn;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -348,24 +348,24 @@ end;
|
|||||||
|
|
||||||
function TConnectionName.GetAsSQLText(Field : TField) : string;
|
function TConnectionName.GetAsSQLText(Field : TField) : string;
|
||||||
|
|
||||||
var esc_str : pchar;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (not assigned(field)) or field.IsNull then Result := 'Null'
|
if (not assigned(Field)) or Field.IsNull then
|
||||||
else if field.DataType = ftString then
|
Result := 'Null'
|
||||||
Result := '''' + EscapeString(field.AsString) + ''''
|
else if Field.DataType = ftString then
|
||||||
else Result := inherited GetAsSqlText(field);
|
Result := '''' + EscapeString(Field.AsString) + ''''
|
||||||
|
else
|
||||||
|
Result := inherited GetAsSqlText(Field);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TConnectionName.GetAsSQLText(Param: TParam) : string;
|
function TConnectionName.GetAsSQLText(Param: TParam) : string;
|
||||||
|
|
||||||
var esc_str : pchar;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if (not assigned(param)) or param.IsNull then Result := 'Null'
|
if (not assigned(Param)) or Param.IsNull then
|
||||||
else if param.DataType in [ftString,ftFixedChar,ftBlob,ftMemo,ftBytes,ftVarBytes] then
|
Result := 'Null'
|
||||||
|
else if Param.DataType in [ftString,ftFixedChar,ftBlob,ftMemo,ftBytes,ftVarBytes] then
|
||||||
Result := '''' + EscapeString(Param.AsString) + ''''
|
Result := '''' + EscapeString(Param.AsString) + ''''
|
||||||
else Result := inherited GetAsSqlText(Param);
|
else
|
||||||
|
Result := inherited GetAsSqlText(Param);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -825,7 +825,7 @@ begin
|
|||||||
for I := 1 to Length(S) do
|
for I := 1 to Length(S) do
|
||||||
begin
|
begin
|
||||||
if not (S[I] in ['0'..'9', '+', '-', 'E', 'e']) then
|
if not (S[I] in ['0'..'9', '+', '-', 'E', 'e']) then
|
||||||
Tmp := Tmp + DecimalSeparator
|
Tmp := Tmp + FormatSettings.DecimalSeparator
|
||||||
else
|
else
|
||||||
Tmp := Tmp + S[I];
|
Tmp := Tmp + S[I];
|
||||||
end;
|
end;
|
||||||
@ -843,7 +843,7 @@ begin
|
|||||||
for I := 1 to Length(S) do
|
for I := 1 to Length(S) do
|
||||||
begin
|
begin
|
||||||
if not (S[I] in ['0'..'9', '+', '-', 'E', 'e']) then
|
if not (S[I] in ['0'..'9', '+', '-', 'E', 'e']) then
|
||||||
Tmp := Tmp + DecimalSeparator
|
Tmp := Tmp + FormatSettings.DecimalSeparator
|
||||||
else
|
else
|
||||||
Tmp := Tmp + S[I];
|
Tmp := Tmp + S[I];
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user