mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-21 12:13:12 +02:00
* fcl-db: PQConnection needs a lowercase port param
git-svn-id: trunk@47607 -
This commit is contained in:
parent
1a0ba60de6
commit
63a231a93d
@ -104,6 +104,8 @@ type
|
|||||||
// Release connection in pool.
|
// Release connection in pool.
|
||||||
procedure ReleaseConnection(Conn: PPGConn; DoClear : Boolean);
|
procedure ReleaseConnection(Conn: PPGConn; DoClear : Boolean);
|
||||||
|
|
||||||
|
function PortParamName: string; override;
|
||||||
|
|
||||||
procedure DoInternalConnect; override;
|
procedure DoInternalConnect; override;
|
||||||
procedure DoInternalDisconnect; override;
|
procedure DoInternalDisconnect; override;
|
||||||
function GetHandle : pointer; override;
|
function GetHandle : pointer; override;
|
||||||
@ -1419,6 +1421,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPQConnection.PortParamName: string;
|
||||||
|
begin
|
||||||
|
Result := 'port';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TPQConnection.UpdateIndexDefs(IndexDefs : TIndexDefs;TableName : string);
|
procedure TPQConnection.UpdateIndexDefs(IndexDefs : TIndexDefs;TableName : string);
|
||||||
|
|
||||||
var qry : TSQLQuery;
|
var qry : TSQLQuery;
|
||||||
|
@ -222,6 +222,7 @@ type
|
|||||||
procedure ApplyRecUpdate(Query : TCustomSQLQuery; UpdateKind : TUpdateKind); virtual;
|
procedure ApplyRecUpdate(Query : TCustomSQLQuery; UpdateKind : TUpdateKind); virtual;
|
||||||
function RefreshLastInsertID(Query : TCustomSQLQuery; Field : TField): Boolean; virtual;
|
function RefreshLastInsertID(Query : TCustomSQLQuery; Field : TField): Boolean; virtual;
|
||||||
procedure GetDBInfo(const ASchemaType : TSchemaType; const ASchemaObjectName, AReturnField : string; AList: TStrings);
|
procedure GetDBInfo(const ASchemaType : TSchemaType; const ASchemaObjectName, AReturnField : string; AList: TStrings);
|
||||||
|
function PortParamName: string; virtual;
|
||||||
function GetConnectionCharSet: string; virtual;
|
function GetConnectionCharSet: string; virtual;
|
||||||
procedure SetTransaction(Value : TSQLTransaction); virtual;
|
procedure SetTransaction(Value : TSQLTransaction); virtual;
|
||||||
procedure DoConnect; override;
|
procedure DoConnect; override;
|
||||||
@ -1519,7 +1520,7 @@ end;
|
|||||||
|
|
||||||
function TSQLConnection.GetPort: cardinal;
|
function TSQLConnection.GetPort: cardinal;
|
||||||
begin
|
begin
|
||||||
result := StrToIntDef(Params.Values['Port'],0);
|
result := StrToIntDef(Params.Values[PortParamName],0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSQLConnection.SetOptions(AValue: TSQLConnectionOptions);
|
procedure TSQLConnection.SetOptions(AValue: TSQLConnectionOptions);
|
||||||
@ -1532,9 +1533,9 @@ end;
|
|||||||
procedure TSQLConnection.SetPort(const AValue: cardinal);
|
procedure TSQLConnection.SetPort(const AValue: cardinal);
|
||||||
begin
|
begin
|
||||||
if AValue<>0 then
|
if AValue<>0 then
|
||||||
Params.Values['Port']:=IntToStr(AValue)
|
Params.Values[PortParamName]:=IntToStr(AValue)
|
||||||
else with params do if IndexOfName('Port') > -1 then
|
else with params do if IndexOfName(PortParamName) > -1 then
|
||||||
Delete(IndexOfName('Port'));
|
Delete(IndexOfName(PortParamName));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSQLConnection.AttemptCommit(trans: TSQLHandle): boolean;
|
function TSQLConnection.AttemptCommit(trans: TSQLHandle): boolean;
|
||||||
@ -2317,6 +2318,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TSQLConnection.PortParamName: string;
|
||||||
|
begin
|
||||||
|
Result := 'Port';
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TSQLConnection.CreateDB;
|
procedure TSQLConnection.CreateDB;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user