mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Decide to return String instead of AnsiString in BinColAsHex(), to satisfy all callers without additional casting. Fixes some compiler warnings.
This commit is contained in:
@ -208,7 +208,7 @@ type
|
|||||||
function ColumnCount: Integer;
|
function ColumnCount: Integer;
|
||||||
function Col(Column: Integer; IgnoreErrors: Boolean=False): String; overload;
|
function Col(Column: Integer; IgnoreErrors: Boolean=False): String; overload;
|
||||||
function Col(ColumnName: String; IgnoreErrors: Boolean=False): String; overload;
|
function Col(ColumnName: String; IgnoreErrors: Boolean=False): String; overload;
|
||||||
function BinColAsHex(Column: Integer; IgnoreErrors: Boolean=False): AnsiString;
|
function BinColAsHex(Column: Integer; IgnoreErrors: Boolean=False): String;
|
||||||
function DataType(Column: Integer): TDataType;
|
function DataType(Column: Integer): TDataType;
|
||||||
function ColExists(Column: String): Boolean;
|
function ColExists(Column: String): Boolean;
|
||||||
function ColIsPrimaryKeyPart(Column: Integer): Boolean;
|
function ColIsPrimaryKeyPart(Column: Integer): Boolean;
|
||||||
@ -1269,7 +1269,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TMySQLQuery.BinColAsHex(Column: Integer; IgnoreErrors: Boolean=False): AnsiString;
|
function TMySQLQuery.BinColAsHex(Column: Integer; IgnoreErrors: Boolean=False): String;
|
||||||
var
|
var
|
||||||
LengthPointer: PLongInt;
|
LengthPointer: PLongInt;
|
||||||
BinLen: Integer;
|
BinLen: Integer;
|
||||||
@ -1280,7 +1280,7 @@ begin
|
|||||||
if LengthPointer <> nil then begin
|
if LengthPointer <> nil then begin
|
||||||
BinLen := PInteger(Integer(LengthPointer) + Column * SizeOf(Integer))^;
|
BinLen := PInteger(Integer(LengthPointer) + Column * SizeOf(Integer))^;
|
||||||
SetLength(Result, BinLen*2);
|
SetLength(Result, BinLen*2);
|
||||||
BinToHex(FCurrentRow[Column], PAnsiChar(Result), BinLen);
|
BinToHex(FCurrentRow[Column], PChar(Result), BinLen);
|
||||||
end;
|
end;
|
||||||
end else if not IgnoreErrors then
|
end else if not IgnoreErrors then
|
||||||
Raise Exception.CreateFmt('Column #%d not available. Query returned %d columns and %d rows.', [Column, ColumnCount, RecordCount]);
|
Raise Exception.CreateFmt('Column #%d not available. Query returned %d columns and %d rows.', [Column, ColumnCount, RecordCount]);
|
||||||
|
Reference in New Issue
Block a user