Update of /cvsroot/instantobjects/Source/Brokers/IBX
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9844/Brokers/IBX
Modified Files:
InstantIBX.pas
Log Message:
support for IB/Fb database evolution; redundant Register procedure removed.
Index: InstantIBX.pas
===================================================================
RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/InstantIBX.pas,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** InstantIBX.pas 22 Feb 2005 10:56:08 -0000 1.8
--- InstantIBX.pas 17 Jun 2005 19:58:55 -0000 1.9
***************
*** 115,118 ****
--- 115,119 ----
function DelimitedIdentsEnabled: Boolean;
protected
+ function CreateCatalog(const AScheme: TInstantScheme): TInstantCatalog; override;
function CreateResolver(Map: TInstantAttributeMap): TInstantSQLResolver; override;
function GetDatabaseName: string; override;
***************
*** 123,126 ****
--- 124,129 ----
procedure AssignDataSetParams(DataSet : TDataSet; AParams: TParams); override;
public
+ function CreateDBBuildCommand(
+ const CommandType: TInstantDBBuildCommandType): TInstantDBBuildCommand; override;
function CreateDataSet(const AStatement: string; AParams: TParams = nil): TDataSet; override;
function DataTypeToColumnType(DataType: TInstantDataType; Size: Integer): string; override;
***************
*** 145,160 ****
end;
- procedure Register;
-
implementation
uses
Controls, InstantConsts, InstantIBXConnectionDefEdit, InstantUtils,
! IB, IBHeader, IBIntf;
!
! procedure Register;
! begin
! RegisterComponents('InstantObjects', [TInstantIBXConnector]);
! end;
{ TInstantIBXConnectionDef }
--- 148,156 ----
end;
implementation
uses
Controls, InstantConsts, InstantIBXConnectionDefEdit, InstantUtils,
! IB, IBHeader, IBIntf, InstantIBFbCatalog, InstantDBBuild;
{ TInstantIBXConnectionDef }
***************
*** 397,400 ****
--- 393,402 ----
end;
+ function TInstantIBXBroker.CreateCatalog(
+ const AScheme: TInstantScheme): TInstantCatalog;
+ begin
+ Result := TInstantIBFbCatalog.Create(AScheme, Self);
+ end;
+
function TInstantIBXBroker.CreateDataSet(const AStatement: string;
AParams: TParams): TDataSet;
***************
*** 414,417 ****
--- 416,440 ----
end;
+ function TInstantIBXBroker.CreateDBBuildCommand(
+ const CommandType: TInstantDBBuildCommandType): TInstantDBBuildCommand;
+ begin
+ if CommandType = ctAddTable then
+ Result := TInstantDBBuildAddTableSQLCommand.Create(CommandType)
+ else if CommandType = ctDropTable then
+ Result := TInstantDBBuildDropTableSQLCommand.Create(CommandType)
+ else if CommandType = ctAddField then
+ Result := TInstantDBBuildAddFieldSQLCommand.Create(CommandType)
+ else if CommandType = ctAlterField then
+ Result := TInstantDBBuildAlterFieldSQLCommand.Create(CommandType)
+ else if CommandType = ctDropField then
+ Result := TInstantDBBuildDropFieldSQLCommand.Create(CommandType)
+ else if CommandType = ctAddIndex then
+ Result := TInstantDBBuildAddIndexSQLCommand.Create(CommandType)
+ else if CommandType = ctDropIndex then
+ Result := TInstantDBBuildDropIndexSQLCommand.Create(CommandType)
+ else
+ Result := inherited CreateDBBuildCommand(CommandType);
+ end;
+
function TInstantIBXBroker.CreateResolver(
Map: TInstantAttributeMap): TInstantSQLResolver;
|