mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 17:49:07 +02:00
fcl-db: sqldb: add PSGetTableName; addition to rev.27074
git-svn-id: trunk@27114 -
This commit is contained in:
parent
17ad74aba4
commit
607369f830
@ -144,8 +144,6 @@ type
|
|||||||
TSQLConnection = class (TDatabase)
|
TSQLConnection = class (TDatabase)
|
||||||
private
|
private
|
||||||
FFieldNameQuoteChars : TQuoteChars;
|
FFieldNameQuoteChars : TQuoteChars;
|
||||||
FLogEvents: TDBEventTypes;
|
|
||||||
FOnLog: TDBLogNotifyEvent;
|
|
||||||
FPassword : string;
|
FPassword : string;
|
||||||
FTransaction : TSQLTransaction;
|
FTransaction : TSQLTransaction;
|
||||||
FUserName : string;
|
FUserName : string;
|
||||||
@ -153,11 +151,13 @@ type
|
|||||||
FCharSet : string;
|
FCharSet : string;
|
||||||
FRole : String;
|
FRole : String;
|
||||||
FStatements : TFPList;
|
FStatements : TFPList;
|
||||||
|
FLogEvents: TDBEventTypes;
|
||||||
|
FOnLog: TDBLogNotifyEvent;
|
||||||
function GetPort: cardinal;
|
function GetPort: cardinal;
|
||||||
procedure SetPort(const AValue: cardinal);
|
procedure SetPort(const AValue: cardinal);
|
||||||
protected
|
protected
|
||||||
FConnOptions : TConnOptions;
|
FConnOptions : TConnOptions;
|
||||||
FSQLFormatSettings : TFormatSettings;
|
FSQLFormatSettings : TFormatSettings;
|
||||||
// Updating of DB records is moved out of TSQLQuery.
|
// Updating of DB records is moved out of TSQLQuery.
|
||||||
// It is done here, so descendents can override it and implement DB-specific.
|
// It is done here, so descendents can override it and implement DB-specific.
|
||||||
// One day, this may be factored out to a TSQLResolver class.
|
// One day, this may be factored out to a TSQLResolver class.
|
||||||
@ -432,7 +432,8 @@ type
|
|||||||
class function FieldDefsClass : TFieldDefsClass; override;
|
class function FieldDefsClass : TFieldDefsClass; override;
|
||||||
// IProviderSupport methods
|
// IProviderSupport methods
|
||||||
function PSGetUpdateException(E: Exception; Prev: EUpdateError): EUpdateError; override;
|
function PSGetUpdateException(E: Exception; Prev: EUpdateError): EUpdateError; override;
|
||||||
Property TableName : String Read FTableName Write FTableName;
|
function PSGetTableName: string; override;
|
||||||
|
Property TableName : String Read FTableName Write FTableName; // alternative: procedure DoGetTableName
|
||||||
public
|
public
|
||||||
constructor Create(AOwner : TComponent); override;
|
constructor Create(AOwner : TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
@ -2488,6 +2489,11 @@ begin
|
|||||||
Result := EUpdateError.Create(SOnUpdateError, E.Message, ErrorCode, PrevErrorCode, E);
|
Result := EUpdateError.Create(SOnUpdateError, E.Message, ErrorCode, PrevErrorCode, E);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TCustomSQLQuery.PSGetTableName: string;
|
||||||
|
begin
|
||||||
|
Result := FTableName;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TSQLScript }
|
{ TSQLScript }
|
||||||
|
|
||||||
procedure TSQLScript.ExecuteStatement(SQLStatement: TStrings;
|
procedure TSQLScript.ExecuteStatement(SQLStatement: TStrings;
|
||||||
|
Loading…
Reference in New Issue
Block a user