You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(25) |
Oct
(10) |
Nov
(19) |
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(206) |
Mar
(43) |
Apr
(25) |
May
(20) |
Jun
(69) |
Jul
(121) |
Aug
(95) |
Sep
(122) |
Oct
(213) |
Nov
(46) |
Dec
(39) |
2006 |
Jan
(28) |
Feb
(57) |
Mar
(21) |
Apr
(7) |
May
(11) |
Jun
(2) |
Jul
(8) |
Aug
(13) |
Sep
(2) |
Oct
(2) |
Nov
(20) |
Dec
(16) |
2007 |
Jan
(9) |
Feb
(15) |
Mar
|
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
(9) |
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(8) |
Apr
(1) |
May
|
Jun
|
Jul
(11) |
Aug
(57) |
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(7) |
2010 |
Jan
(11) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(27) |
Oct
(3) |
Nov
(7) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(10) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(4) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(4) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(3) |
Oct
|
Nov
(4) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Nando D. <na...@us...> - 2005-06-18 09:50:02
|
Update of /cvsroot/instantobjects/Source/Core/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27325/Core/D7 Modified Files: IOCore.cfg IOCore.dof Log Message: harmonized compiler options Index: IOCore.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/D7/IOCore.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOCore.cfg 22 Feb 2005 07:58:17 -0000 1.2 --- IOCore.cfg 18 Jun 2005 09:49:53 -0000 1.3 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ Index: IOCore.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/D7/IOCore.dof,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IOCore.dof 22 Feb 2005 07:58:18 -0000 1.5 --- IOCore.dof 18 Jun 2005 09:49:53 -0000 1.6 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 |
From: Nando D. <na...@us...> - 2005-06-18 09:49:16
|
Update of /cvsroot/instantobjects/Source/Core/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27197/Core/D7 Modified Files: IOCore.dpk Log Message: Core support for database evolution; harmonized compiler options Index: IOCore.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/D7/IOCore.dpk,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IOCore.dpk 22 Feb 2005 14:25:18 -0000 1.4 --- IOCore.dpk 18 Jun 2005 09:49:08 -0000 1.5 *************** *** 20,24 **** {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 20,24 ---- {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} *************** *** 49,53 **** InstantConnectionManager in '..\InstantConnectionManager.pas', InstantImageUtils in '..\InstantImageUtils.pas', ! InstantPump in '..\InstantPump.pas'; end. --- 49,55 ---- InstantConnectionManager in '..\InstantConnectionManager.pas', InstantImageUtils in '..\InstantImageUtils.pas', ! InstantPump in '..\InstantPump.pas', ! InstantDBBuild in '..\InstantDBBuild.pas', ! InstantDBEvolution in '..\InstantDBEvolution.pas'; end. |
From: Nando D. <na...@us...> - 2005-06-18 09:48:23
|
Update of /cvsroot/instantobjects/Source/Core/D6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26581/Core/D6 Modified Files: IOCore.dpk Log Message: Core support for database evolution Index: IOCore.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/D6/IOCore.dpk,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** IOCore.dpk 22 Feb 2005 14:25:17 -0000 1.4 --- IOCore.dpk 18 Jun 2005 09:48:14 -0000 1.5 *************** *** 3,6 **** --- 3,7 ---- {$R *.res} {$R '..\InstantPump.dcr'} + {$R '..\InstantDBEvolution.dcr'} {$ALIGN 8} {$ASSERTIONS ON} *************** *** 50,54 **** InstantConnectionManager in '..\InstantConnectionManager.pas', InstantImageUtils in '..\InstantImageUtils.pas', ! InstantPump in '..\InstantPump.pas'; end. --- 51,57 ---- InstantConnectionManager in '..\InstantConnectionManager.pas', InstantImageUtils in '..\InstantImageUtils.pas', ! InstantPump in '..\InstantPump.pas', ! InstantDBEvolution in '..\InstantDBEvolution.pas', ! InstantDBBuild in '..\InstantDBBuild.pas'; end. |
From: Nando D. <na...@us...> - 2005-06-18 09:47:34
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25904/Core Added Files: InstantDBBuild.pas InstantDBEvolution.dcr InstantDBEvolution.pas Log Message: Core support for database evolution --- NEW FILE: InstantDBEvolution.dcr --- (This appears to be a binary file; contents omitted.) --- NEW FILE: InstantDBEvolution.pas --- (* * InstantObjects * Database evolution classes *) (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is: InstantObjects Database builder * * The Initial Developer of the Original Code is: Nando Dessena * * Portions created by the Initial Developer are Copyright (C) 2005 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * ***** END LICENSE BLOCK ***** *) unit InstantDBEvolution; interface uses Classes, InstantPersistence, InstantDBBuild; type // Builds a TInstantDBBuildCommandSequence that upgrades a database schema to // the current (or a given) model. TInstantDBEvolver = class(TInstantCustomDBEvolver) private // Adds to CommandSequence the steps needed to evolve the database. procedure GenerateSchemeDiff(const CommandSequence: TInstantDBBuildCommandSequence); protected // (Re)builds the database evolution sequence. After calling this method, // the EvolutionSequence property contains the sequence of steps needed to // evolve the database. procedure InternalBuildCommandSequence; override; published property AfterCommandSequenceExecute; property AfterCommandExecute; property BeforeCommandSequenceExecute; property BeforeCommandExecute; property OnCommandExecuteError; end; implementation uses SysUtils, DB; { TInstantDBEvolver } procedure TInstantDBEvolver.InternalBuildCommandSequence; begin CommandSequence.Clear; CommandSequence.SourceScheme := Connector.Broker.ReadDatabaseScheme; CommandSequence.TargetScheme := Connector.CreateScheme(TargetModel); GenerateSchemeDiff(CommandSequence); end; {for each table in the schema if the table exists in the db for each field in the schema.table if the field exists in the db if the datatype is different generate an AlterColumn command else generate an AddColumn command for each field in the db.table if the field does not exist in the schema generate a DropColumn command else generate an AddTable command for each table in the db if the table does not exist in the schema generate a DropTable command And a similar algo for the indices. When we have foreign keys, we'll have to sort the generated list according to references, or we could use a strategy of disabling/dropping all the constraints at the beginning and recreate them later.} procedure TInstantDBEvolver.GenerateSchemeDiff(const CommandSequence: TInstantDBBuildCommandSequence); var iTable, iField, iIndex: Integer; SourceTableMetadata, TargetTableMetadata: TInstantTableMetadata; SourceFieldMetadata, TargetFieldMetadata: TInstantFieldMetadata; SourceIndexMetadata, TargetIndexMetadata: TInstantIndexMetadata; procedure AppendAddFieldCommand(const FieldMetadata: TInstantFieldMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctAddField); Command.NewMetadata := FieldMetadata; CommandSequence.Append(Command); end; procedure AppendAlterFieldCommand(const SourceFieldMetadata, TargetFieldMetadata: TInstantFieldMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctAlterField); Command.OldMetadata := SourceFieldMetadata; Command.NewMetadata := TargetFieldMetadata; CommandSequence.Append(Command); end; procedure AppendDropFieldCommand(const FieldMetadata: TInstantFieldMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctDropField); Command.OldMetadata := FieldMetadata; CommandSequence.Append(Command); end; procedure AppendAddIndexCommand(const IndexMetadata: TInstantIndexMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctAddIndex); Command.NewMetadata := IndexMetadata; CommandSequence.Append(Command); end; procedure AppendAlterIndexCommand(const SourceIndexMetadata, TargetIndexMetadata: TInstantIndexMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctDropIndex); Command.OldMetadata := SourceIndexMetadata; // Enabled normally defaults to False for drop operations, but in this // particular case it is more convenient to have it set to True, since the // index is not really being dropped - it is being altered by recreating it. Command.Enabled := True; CommandSequence.Append(Command); Command := Connector.Broker.CreateDBBuildCommand(ctAddIndex); Command.NewMetadata := TargetIndexMetadata; CommandSequence.Append(Command); end; procedure AppendDropIndexCommand(const IndexMetadata: TInstantIndexMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctDropIndex); Command.OldMetadata := IndexMetadata; CommandSequence.Append(Command); end; procedure AppendAddTableCommand(const TableMetadata: TInstantTableMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctAddTable); Command.NewMetadata := TableMetadata; CommandSequence.Append(Command); end; procedure AppendDropTableCommand(const TableMetadata: TInstantTableMetadata); var Command: TInstantDBBuildCommand; begin Command := Connector.Broker.CreateDBBuildCommand(ctDropTable); Command.OldMetadata := TableMetadata; CommandSequence.Append(Command); end; begin // Upgrade tables. for iTable := 0 to CommandSequence.TargetScheme.TableMetadataCount - 1 do begin TargetTableMetadata := CommandSequence.TargetScheme.TableMetadatas[iTable]; { TODO : This only works for case-insensitive object names! } SourceTableMetadata := CommandSequence.SourceScheme.FindTableMetadata(AnsiUpperCase(TargetTableMetadata.Name)); if Assigned(SourceTableMetadata) then begin // Add missing fields and alter modified fields for iField := 0 to TargetTableMetadata.FieldMetadataCount - 1 do begin TargetFieldMetadata := TargetTableMetadata.FieldMetadatas[iField]; { TODO : This only works for case-insensitive object names! } SourceFieldMetadata := SourceTableMetadata.FindFieldMetadata(AnsiUpperCase(TargetFieldMetadata.Name)); if Assigned(SourceFieldMetadata) then begin if (TargetFieldMetadata.DataType <> SourceFieldMetadata.DataType) or (TargetFieldMetadata.Size > SourceFieldMetadata.Size) then AppendAlterFieldCommand(SourceFieldMetadata, TargetFieldMetadata); end else AppendAddFieldCommand(TargetFieldMetadata); end; // Add missing indexes and recreate modified indexes for iIndex := 0 to TargetTableMetadata.IndexMetadataCount - 1 do begin TargetIndexMetadata := TargetTableMetadata.IndexMetadatas[iIndex]; if not (ixPrimary in TargetIndexMetadata.Options) then begin { TODO : This only works for case-insensitive object names! } SourceIndexMetadata := SourceTableMetadata.FindIndexMetadata(AnsiUpperCase(TargetIndexMetadata.Name)); if Assigned(SourceIndexMetadata) then begin if not SourceIndexMetadata.Equals(TargetIndexMetadata) then AppendAlterIndexCommand(SourceIndexMetadata, TargetIndexMetadata); end else AppendAddIndexCommand(TargetIndexMetadata); end; end; // Drop deleted indexes for iIndex := 0 to SourceTableMetadata.IndexMetadataCount - 1 do begin SourceIndexMetadata := SourceTableMetadata.IndexMetadatas[iIndex]; if not (ixPrimary in SourceIndexMetadata.Options) then begin { TODO : This only works for case-insensitive object names! } TargetIndexMetadata := TargetTableMetadata.FindIndexMetadata(AnsiUpperCase(SourceIndexMetadata.Name)); if not Assigned(TargetIndexMetadata) then AppendDropIndexCommand(SourceIndexMetadata); end; end; // Drop deleted fields for iField := 0 to SourceTableMetadata.FieldMetadataCount - 1 do begin SourceFieldMetadata := SourceTableMetadata.FieldMetadatas[iField]; { TODO : This only works for case-insensitive object names! } TargetFieldMetadata := TargetTableMetadata.FindFieldMetadata(AnsiUpperCase(SourceFieldMetadata.Name)); if not Assigned(TargetFieldMetadata) then AppendDropFieldCommand(SourceFieldMetadata); end; end else AppendAddTableCommand(TargetTableMetadata); end; // Drop deleted tables. for iTable := 0 to CommandSequence.SourceScheme.TableMetadataCount - 1 do begin SourceTableMetadata := CommandSequence.SourceScheme.TableMetadatas[iTable]; TargetTableMetadata := CommandSequence.TargetScheme.FindTableMetadata(SourceTableMetadata.Name); if not Assigned(TargetTableMetadata) then AppendDropTableCommand(SourceTableMetadata); end; end; end. --- NEW FILE: InstantDBBuild.pas --- (* * InstantObjects * Database build classes *) (* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is: InstantObjects Database builder * * The Initial Developer of the Original Code is: Nando Dessena * * Portions created by the Initial Developer are Copyright (C) 2005 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * ***** END LICENSE BLOCK ***** *) unit InstantDBBuild; interface uses SysUtils, Classes, Contnrs, InstantClasses, InstantPersistence, InstantConsts; type TInstantDBBuildCommandSequence = class; TInstantDBBuildCommandNotifyEvent = procedure (const Sender: TObject; const ACommand: TInstantDBBuildCommand) of object; TInstantDBBuildCommandErrorEvent = procedure (const Sender: TObject; const ACommand: TInstantDBBuildCommand; const Error: Exception; var RaiseError: Boolean) of object; // Builds a TInstantDBBuildCommandSequence. Abstract. // Works closely with the connector and the broker. The command // sequence, once built, can be executed through the connector. TInstantCustomDBBuilder = class(TComponent) private FConnector: TInstantConnector; FCommandSequence: TInstantDBBuildCommandSequence; function GetAfterCommandExecute: TInstantDBBuildCommandNotifyEvent; function GetAfterCommandSequenceExecute: TNotifyEvent; function GetBeforeCommandExecute: TInstantDBBuildCommandNotifyEvent; function GetBeforeCommandSequenceExecute: TNotifyEvent; procedure SetAfterCommandExecute( const Value: TInstantDBBuildCommandNotifyEvent); procedure SetAfterCommandSequenceExecute(const Value: TNotifyEvent); procedure SetBeforeCommandExecute( const Value: TInstantDBBuildCommandNotifyEvent); procedure SetBeforeCommandSequenceExecute(const Value: TNotifyEvent); function GetCommandExecuteError: TInstantDBBuildCommandErrorEvent; procedure SetCommandExecuteError( const Value: TInstantDBBuildCommandErrorEvent); protected function GetConnector: TInstantConnector; virtual; procedure InternalBuildCommandSequence; virtual; abstract; procedure SetConnector(const Value: TInstantConnector); virtual; // Fired after a successful execution of the entire command sequence. property AfterCommandSequenceExecute: TNotifyEvent read GetAfterCommandSequenceExecute write SetAfterCommandSequenceExecute; // Fired after a successful execution of a command of the sequence. property AfterCommandExecute: TInstantDBBuildCommandNotifyEvent read GetAfterCommandExecute write SetAfterCommandExecute; // Fired when the Execute method of the command sequence is called. property BeforeCommandSequenceExecute: TNotifyEvent read GetBeforeCommandSequenceExecute write SetBeforeCommandSequenceExecute; // Fired before executing a command of the sequence. Can be used to // programmatically enable/disable the execution of the step. property BeforeCommandExecute: TInstantDBBuildCommandNotifyEvent read GetBeforeCommandExecute write SetBeforeCommandExecute; // Fired in case of an error during execution of a command. Can be used to // customize the error handling behaviour, which by default is to stop // the sequence execution, raise an exception and rollback the changes // (rollbacking only works if the database back-end supports transactional // data definition, not a very commonly available feature). property OnCommandExecuteError: TInstantDBBuildCommandErrorEvent read GetCommandExecuteError write SetCommandExecuteError; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; // A reference to the command sequence. // You should call BuildCommandSequence before accessing this property. property CommandSequence: TInstantDBBuildCommandSequence read FCommandSequence; // (Re)builds the command sequence. After calling this method, // the CommandSequence property contains the sequence of commands. procedure BuildCommandSequence; // Used for component reference notifications. procedure Notification(AComponent: TComponent; Operation: TOperation); override; published // Reference to a Connector that points to the target database for // evolution. Default is InstantDefaultConnector. property Connector: TInstantConnector read GetConnector write SetConnector; end; // Base class for database builders and evolvers. Abstract. TInstantCustomDBEvolver = class(TInstantCustomDBBuilder) private FTargetModel: TInstantModel; function GetTargetModel: TInstantModel; procedure SetTargetModel(const Value: TInstantModel); public // The reference Model. Default is InstantModel. property TargetModel: TInstantModel read GetTargetModel write SetTargetModel; end; // Builds a TInstantDBBuildCommandSequence that destroys a database structure // and recreates it according to a specified Model. It represents the // "classic" InstantObjects database building strategy. TInstantDBBuilder = class(TInstantCustomDBEvolver) protected procedure InternalBuildCommandSequence; override; published property AfterCommandSequenceExecute; property AfterCommandExecute; property BeforeCommandSequenceExecute; property BeforeCommandExecute; property OnCommandExecuteError; end; // A sequence of commands used to build a database. TInstantDBBuildCommandSequence = class(TComponent) private FCommands: TObjectList; FConnector: TInstantConnector; FAfterExecute: TNotifyEvent; FBeforeExecute: TNotifyEvent; FAfterCommandExecute: TInstantDBBuildCommandNotifyEvent; FBeforeCommandExecute: TInstantDBBuildCommandNotifyEvent; FTargetScheme: TInstantScheme; FSourceScheme: TInstantScheme; FCommandExecuteError: TInstantDBBuildCommandErrorEvent; function GetConnector: TInstantConnector; procedure SetConnector(const Value: TInstantConnector); procedure DoAfterCommandExecute(const ACommand: TInstantDBBuildCommand); procedure DoBeforeCommandExecute(const ACommand: TInstantDBBuildCommand); procedure DoAfterExecute; procedure DoBeforeExecute; procedure DoCommandExecuteError(const ACommand: TInstantDBBuildCommand; const Error: Exception; var RaiseError: Boolean); function GetCount: Integer; function GetItem(const Index: Integer): TInstantDBBuildCommand; procedure SetSourceScheme(const Value: TInstantScheme); procedure SetTargetScheme(const Value: TInstantScheme); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; // Fired after a successful execution of the entire sequence. property AfterExecute: TNotifyEvent read FAfterExecute write FAfterExecute; // Fired after a successful execution of a command of the sequence. property AfterCommandExecute: TInstantDBBuildCommandNotifyEvent read FAfterCommandExecute write FAfterCommandExecute; // Fired when the Execute method is called. property BeforeExecute: TNotifyEvent read FBeforeExecute write FBeforeExecute; // Fired before executing a command of the sequence. Can be used to // programmatically enable/disable the execution of the step. property BeforeCommandExecute: TInstantDBBuildCommandNotifyEvent read FBeforeCommandExecute write FBeforeCommandExecute; // Connector against which to execute the sequence of commands. Default is // InstantDefaultConnector. property Connector: TInstantConnector read GetConnector write SetConnector; // Number of commands in the sequence. property Count: Integer read GetCount; // Random access to the commands. property Items[const Index: Integer]: TInstantDBBuildCommand read GetItem; default; // Fired in case of an error during execution of a command. Can be used to // customize the error handling behaviour, which by default is to stop // the sequence execution, raise an exception and rollback the changes // (rollbacking only works if the database back-end supports transactional // data definition, not a very commonly available feature). property OnCommandExecuteError: TInstantDBBuildCommandErrorEvent read FCommandExecuteError write FCommandExecuteError; // The TInstantMetadata objects referenced by the commands reside in // SourceScheme (OldMetadata) and TargetScheme (NewMetadata). See // TInstantDBEvolver for a usage example of these properties. property SourceScheme: TInstantScheme read FSourceScheme write SetSourceScheme; property TargetScheme: TInstantScheme read FTargetScheme write SetTargetScheme; // Deletes all the commands in the sequence. procedure Clear; // Adds a command to the tail of the sequence. procedure Append(const ACommand: TInstantDBBuildCommand); // Executes all the commands in the sequence. procedure Execute; // Moves a command up or down in the sequence. Pass a positive value to // move the chosen item Extent positions down the sequence, and a negative // value to move it up. procedure MoveItem(const AItem: TInstantDBBuildCommand; const Extent: Integer); // Used for component reference notifications. procedure Notification(AComponent: TComponent; Operation: TOperation); override; end; // Base class for all steps that work by executing a SQL statement or script. TInstantDBBuildSQLCommand = class(TInstantDBBuildCommand) private function GetConnector: TInstantRelationalConnector; function GetBroker: TInstantSQLBroker; protected function GetDescription: string; override; function GetSQLStatement: string; virtual; abstract; procedure InternalExecute; override; public property Connector: TInstantRelationalConnector read GetConnector; property Broker: TInstantSQLBroker read GetBroker; end; // Adds a table using a SQL CREATE TABLE statement. TInstantDBBuildAddTableSQLCommand = class(TInstantDBBuildSQLCommand) private function GetTableMetadata: TInstantTableMetadata; protected function GetSQLStatement: string; override; public property TableMetadata: TInstantTableMetadata read GetTableMetadata; end; // Drops a table using a SQL DROP TABLE statement. TInstantDBBuildDropTableSQLCommand = class(TInstantDBBuildSQLCommand) private function GetTableMetadata: TInstantTableMetadata; protected function GetSQLStatement: string; override; public property TableMetadata: TInstantTableMetadata read GetTableMetadata; end; // Adds a field using a SQL ALTER TABLE ADD statement. TInstantDBBuildAddFieldSQLCommand = class(TInstantDBBuildSQLCommand) private function GetFieldMetadata: TInstantFieldMetadata; protected function GetSQLStatement: string; override; public property FieldMetadata: TInstantFieldMetadata read GetFieldMetadata; end; // Drops a field using a SQL ALTER TABLE DROP statement. TInstantDBBuildDropFieldSQLCommand = class(TInstantDBBuildSQLCommand) private function GetFieldMetadata: TInstantFieldMetadata; protected function GetSQLStatement: string; override; public property FieldMetadata: TInstantFieldMetadata read GetFieldMetadata; end; // Alters a field using a SQL ALTER TABLE ALTER COLUMN statement. TInstantDBBuildAlterFieldSQLCommand = class(TInstantDBBuildSQLCommand) private function GetNewFieldMetadata: TInstantFieldMetadata; function GetOldFieldMetadata: TInstantFieldMetadata; protected function GetSQLStatement: string; override; public property OldFieldMetadata: TInstantFieldMetadata read GetOldFieldMetadata; property NewFieldMetadata: TInstantFieldMetadata read GetNewFieldMetadata; end; // Adds an index using a SQL CREATE INDEX statement. TInstantDBBuildAddIndexSQLCommand = class(TInstantDBBuildSQLCommand) private function GetIndexMetadata: TInstantIndexMetadata; protected function GetSQLStatement: string; override; public property IndexMetadata: TInstantIndexMetadata read GetIndexMetadata; end; // Drops an index using a SQL DROP INDEX statement. TInstantDBBuildDropIndexSQLCommand = class(TInstantDBBuildSQLCommand) private function GetIndexMetadata: TInstantIndexMetadata; protected function GetSQLStatement: string; override; public property IndexMetadata: TInstantIndexMetadata read GetIndexMetadata; end; implementation { TInstantCustomDBBuilder } procedure TInstantCustomDBBuilder.BuildCommandSequence; begin InternalBuildCommandSequence; end; constructor TInstantCustomDBBuilder.Create(AOwner: TComponent); begin inherited; FCommandSequence := TInstantDBBuildCommandSequence.Create(Self); end; destructor TInstantCustomDBBuilder.Destroy; begin Connector := nil; FreeAndNil(FCommandSequence); inherited; end; function TInstantCustomDBBuilder.GetAfterCommandExecute: TInstantDBBuildCommandNotifyEvent; begin Result := FCommandSequence.AfterCommandExecute; end; function TInstantCustomDBBuilder.GetAfterCommandSequenceExecute: TNotifyEvent; begin Result := FCommandSequence.AfterExecute; end; function TInstantCustomDBBuilder.GetBeforeCommandExecute: TInstantDBBuildCommandNotifyEvent; begin Result := FCommandSequence.BeforeCommandExecute; end; function TInstantCustomDBBuilder.GetBeforeCommandSequenceExecute: TNotifyEvent; begin Result := FCommandSequence.BeforeExecute; end; function TInstantCustomDBBuilder.GetCommandExecuteError: TInstantDBBuildCommandErrorEvent; begin Result := FCommandSequence.OnCommandExecuteError; end; function TInstantCustomDBBuilder.GetConnector: TInstantConnector; begin if not Assigned(FConnector) then Result := InstantDefaultConnector else Result := FConnector; end; procedure TInstantCustomDBBuilder.Notification(AComponent: TComponent; Operation: TOperation); begin inherited; if Operation = opRemove then if AComponent = FConnector then FConnector := nil; end; procedure TInstantCustomDBBuilder.SetAfterCommandExecute( const Value: TInstantDBBuildCommandNotifyEvent); begin FCommandSequence.AfterCommandExecute := Value; end; procedure TInstantCustomDBBuilder.SetAfterCommandSequenceExecute( const Value: TNotifyEvent); begin FCommandSequence.AfterExecute := Value; end; procedure TInstantCustomDBBuilder.SetBeforeCommandExecute( const Value: TInstantDBBuildCommandNotifyEvent); begin FCommandSequence.BeforeCommandExecute := Value; end; procedure TInstantCustomDBBuilder.SetBeforeCommandSequenceExecute( const Value: TNotifyEvent); begin FCommandSequence.BeforeExecute := Value; end; procedure TInstantCustomDBBuilder.SetCommandExecuteError( const Value: TInstantDBBuildCommandErrorEvent); begin FCommandSequence.OnCommandExecuteError := Value; end; procedure TInstantCustomDBBuilder.SetConnector(const Value: TInstantConnector); begin if Value <> FConnector then begin if Assigned(FConnector) then FConnector.RemoveFreeNotification(Self); FConnector := Value; if Assigned(FConnector) then FConnector.FreeNotification(Self); end; end; { TInstantCustomDBEvolver } function TInstantCustomDBEvolver.GetTargetModel: TInstantModel; begin if Assigned(FTargetModel) then Result := FTargetModel else Result := InstantModel; end; procedure TInstantCustomDBEvolver.SetTargetModel( const Value: TInstantModel); begin FTargetModel := Value; end; { TInstantDBBuilder } procedure TInstantDBBuilder.InternalBuildCommandSequence; begin { TODO : Build a series of drop & create tables and indices. } end; { TInstantDBBuildCommandSequence } procedure TInstantDBBuildCommandSequence.Append( const ACommand: TInstantDBBuildCommand); begin FCommands.Add(ACommand); end; procedure TInstantDBBuildCommandSequence.Clear; begin FCommands.Clear; end; constructor TInstantDBBuildCommandSequence.Create(AOwner: TComponent); begin inherited Create(AOwner); FCommands := TObjectList.Create(True); end; destructor TInstantDBBuildCommandSequence.Destroy; begin FreeAndNil(FCommands); FreeAndNil(FSourceScheme); FreeAndNil(FTargetScheme); inherited; end; procedure TInstantDBBuildCommandSequence.DoAfterCommandExecute( const ACommand: TInstantDBBuildCommand); begin if Assigned(FAfterCommandExecute) then FAfterCommandExecute(Self, ACommand); end; procedure TInstantDBBuildCommandSequence.DoAfterExecute; begin if Assigned(FAfterExecute) then FAfterExecute(Self); end; procedure TInstantDBBuildCommandSequence.DoBeforeCommandExecute( const ACommand: TInstantDBBuildCommand); begin if Assigned(FBeforeCommandExecute) then FBeforeCommandExecute(Self, ACommand); end; procedure TInstantDBBuildCommandSequence.DoBeforeExecute; begin if Assigned(FBeforeExecute) then FBeforeExecute(Self); end; procedure TInstantDBBuildCommandSequence.DoCommandExecuteError( const ACommand: TInstantDBBuildCommand; const Error: Exception; var RaiseError: Boolean); begin end; procedure TInstantDBBuildCommandSequence.Execute; var i: Integer; CurrentCommand: TInstantDBBuildCommand; RaiseError: Boolean; begin DoBeforeExecute; Connector.StartTransaction; try for i := 0 to FCommands.Count - 1 do begin CurrentCommand := FCommands[i] as TInstantDBBuildCommand; DoBeforeCommandExecute(CurrentCommand); try if CurrentCommand.Enabled then CurrentCommand.Execute; except on E: Exception do begin RaiseError := True; DoCommandExecuteError(CurrentCommand, E, RaiseError); if RaiseError then raise; end; end; DoAfterCommandExecute(CurrentCommand); end; Connector.CommitTransaction; DoAfterExecute; except Connector.RollbackTransaction; raise; end; end; function TInstantDBBuildCommandSequence.GetConnector: TInstantConnector; begin if Assigned(FConnector) then Result := FConnector else Result := InstantDefaultConnector; end; function TInstantDBBuildCommandSequence.GetCount: Integer; begin Result := FCommands.Count; end; function TInstantDBBuildCommandSequence.GetItem( const Index: Integer): TInstantDBBuildCommand; begin Result := FCommands[Index] as TInstantDBBuildCommand; end; procedure TInstantDBBuildCommandSequence.MoveItem( const AItem: TInstantDBBuildCommand; const Extent: Integer); var i: Integer; begin for i := 0 to FCommands.Count - 1 do begin if FCommands[i] = AItem then begin FCommands.Move(i, i + Extent); Break; end; end; end; procedure TInstantDBBuildCommandSequence.Notification(AComponent: TComponent; Operation: TOperation); begin if Operation = opRemove then if AComponent = FConnector then FConnector := nil; end; procedure TInstantDBBuildCommandSequence.SetConnector( const Value: TInstantConnector); begin if Value <> FConnector then begin if Assigned(FConnector) then FConnector.RemoveFreeNotification(Self); FConnector := Value; if Assigned(FConnector) then FConnector.FreeNotification(Self); end; end; procedure TInstantDBBuildCommandSequence.SetSourceScheme( const Value: TInstantScheme); begin FreeAndNil(FSourceScheme); FSourceScheme := Value; end; procedure TInstantDBBuildCommandSequence.SetTargetScheme( const Value: TInstantScheme); begin FreeAndNil(FTargetScheme); FTargetScheme := Value; end; { TInstantDBBuildSQLCommand } function TInstantDBBuildSQLCommand.GetBroker: TInstantSQLBroker; begin Result := Connector.Broker as TInstantSQLBroker; end; function TInstantDBBuildSQLCommand.GetConnector: TInstantRelationalConnector; begin Result := inherited Connector as TInstantRelationalConnector; end; function TInstantDBBuildSQLCommand.GetDescription: string; begin Result := GetSQLStatement; end; procedure TInstantDBBuildSQLCommand.InternalExecute; begin Broker.Execute(GetSQLStatement()); end; { TInstantDBBuildAddTableSQLCommand } function TInstantDBBuildAddTableSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateCreateTableSQL(TableMetadata); end; function TInstantDBBuildAddTableSQLCommand.GetTableMetadata: TInstantTableMetadata; begin Result := NewMetadata as TInstantTableMetadata; end; { TInstantDBBuildAddFieldSQLCommand } function TInstantDBBuildAddFieldSQLCommand.GetFieldMetadata: TInstantFieldMetadata; begin Result := NewMetadata as TInstantFieldMetadata; end; function TInstantDBBuildAddFieldSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateAddFieldSQL(FieldMetadata); end; { TInstantDBBuildDropFieldSQLCommand } function TInstantDBBuildDropFieldSQLCommand.GetFieldMetadata: TInstantFieldMetadata; begin Result := OldMetadata as TInstantFieldMetadata; end; function TInstantDBBuildDropFieldSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateDropFieldSQL(FieldMetadata); end; { TInstantDBBuildDropTableSQLCommand } function TInstantDBBuildDropTableSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateDropTableSQL(TableMetadata); end; function TInstantDBBuildDropTableSQLCommand.GetTableMetadata: TInstantTableMetadata; begin Result := OldMetadata as TInstantTableMetadata; end; { TInstantDBBuildAlterFieldSQLCommand } function TInstantDBBuildAlterFieldSQLCommand.GetNewFieldMetadata: TInstantFieldMetadata; begin Result := NewMetadata as TInstantFieldMetadata; end; function TInstantDBBuildAlterFieldSQLCommand.GetOldFieldMetadata: TInstantFieldMetadata; begin Result := OldMetadata as TInstantFieldMetadata; end; function TInstantDBBuildAlterFieldSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateAlterFieldSQL(OldFieldMetadata, NewFieldMetadata); end; { TInstantDBBuildAddIndexSQLCommand } function TInstantDBBuildAddIndexSQLCommand.GetIndexMetadata: TInstantIndexMetadata; begin Result := NewMetadata as TInstantIndexMetadata; end; function TInstantDBBuildAddIndexSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateCreateIndexSQL(IndexMetadata); end; { TInstantDBBuildDropIndexSQLCommand } function TInstantDBBuildDropIndexSQLCommand.GetIndexMetadata: TInstantIndexMetadata; begin Result := OldMetadata as TInstantIndexMetadata; end; function TInstantDBBuildDropIndexSQLCommand.GetSQLStatement: string; begin Result := Broker.Generator.GenerateDropIndexSQL(IndexMetadata); end; end. |
From: Nando D. <na...@us...> - 2005-06-18 09:46:51
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25732/Core Modified Files: InstantPersistence.pas Log Message: Core support for database evolution; BeforeConnectionChange/AfterConnectionChange fixes Index: InstantPersistence.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantPersistence.pas,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** InstantPersistence.pas 13 Jun 2005 01:04:09 -0000 1.39 --- InstantPersistence.pas 18 Jun 2005 09:46:35 -0000 1.40 *************** *** 61,65 **** --- 61,68 ---- function GetCollection: TInstantMetadatas; procedure SetCollection(Value: TInstantMetadatas); {$IFDEF D6+}reintroduce;{$ENDIF} + protected + function InternalEquals(const Other: TInstantMetadata): Boolean; virtual; public + function Equals(const Other: TInstantMetadata): Boolean; property Collection: TInstantMetadatas read GetCollection write SetCollection; end; *************** [...1053 lines suppressed...] + [Description]); + end; + + { TInstantCatalog } + + constructor TInstantCatalog.Create(const AScheme: TInstantScheme); + begin + inherited Create; + FScheme := AScheme; + end; + + { TInstantSQLBrokerCatalog } + + function TInstantSQLBrokerCatalog.GetBroker: TInstantSQLBroker; + begin + Result := inherited Broker as TInstantSQLBroker; + end; + initialization RegisterClasses([TInstantClassMetadatas, TInstantClassMetadata, |
From: Nando D. <na...@us...> - 2005-06-18 09:42:50
|
Update of /cvsroot/instantobjects/Source/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24771/Core Modified Files: InstantConsts.pas Log Message: Core support for database evolution; definitions sorted Index: InstantConsts.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Core/InstantConsts.pas,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** InstantConsts.pas 25 Feb 2005 14:48:26 -0000 1.9 --- InstantConsts.pas 18 Jun 2005 09:42:39 -0000 1.10 *************** *** 66,78 **** SAccessError = 'Cannot access attribute %s(''%s'') as type: %s'; SAccessorClassNotFoundFor = 'Accessor class not found for class %s '; SAttributeNotFound = 'Attribute ''%s'' not found for class %s '; SAttributeNotIndexed = 'Attribute %s(''%s'') in class %s not indexed'; SAttributeNotQueryable = 'Attribute %s(''%s'') in class %s not queryable'; ! SAttributeConversionError = 'Error converting value for attribute %s(''%s''): "%s"'; SCapabilityNotSuppported = 'Capability not supported'; - SClassReferenceMissing = 'Class reference missing'; SClassNotQueryable = 'Class %s not queryable'; SClassNotRegistered = 'Class %s not registered'; SClassNotStreamable = 'Class %s not streamable: '; SConnectorInUse = 'Connector %s in use by %d object(s)'; SConnectorMismatch = 'Connector mismatch'; --- 66,83 ---- SAccessError = 'Cannot access attribute %s(''%s'') as type: %s'; SAccessorClassNotFoundFor = 'Accessor class not found for class %s '; + SAttributeConversionError = 'Error converting value for attribute %s(''%s''): "%s"'; SAttributeNotFound = 'Attribute ''%s'' not found for class %s '; SAttributeNotIndexed = 'Attribute %s(''%s'') in class %s not indexed'; SAttributeNotQueryable = 'Attribute %s(''%s'') in class %s not queryable'; ! SCannotBuildDB = 'Database build step "%s" not supported'; SCapabilityNotSuppported = 'Capability not supported'; SClassNotQueryable = 'Class %s not queryable'; SClassNotRegistered = 'Class %s not registered'; SClassNotStreamable = 'Class %s not streamable: '; + SClassReferenceMissing = 'Class reference missing'; + SConnectionDefError = 'Error: connection definitions %s not found in file %s'; + SConnectionDefFilter = 'Connection files|*.con;*.xml'; + SConnectionManagerCaption = 'Connection Manager'; + SConnectionManagerExecutorNotAssigned = 'Connection manager execution procedure not assigned'; SConnectorInUse = 'Connector %s in use by %d object(s)'; SConnectorMismatch = 'Connector mismatch'; *************** *** 80,83 **** --- 85,92 ---- SDefaultContainerNotFound = 'Default container not found for class %s'; SDefaultContainerNotSpecified = 'Default container not specified for class %s'; + SDeniedDispose = 'Denied dispose of object %s(''%s'')'; + SDeniedRefresh = 'Denied refresh of object %s(''%s'')'; + SDeniedRetrieve = 'Denied retrieve of object %s(''%s'')'; + SDeniedStore = 'Denied store of object %s(''%s'')'; SDisposeConflict = 'Object %s(''%s'') was disposed by another session'; SErrorDisposingObject = 'Error disposing object %s(''%s''): "%s"'; *************** *** 88,93 **** SFatalError = 'Fatal Error for object %s(''%s''): "%s"'; SFieldReadError = 'Error reading value from field ''%s'': %s'; - SFieldWriteError = 'Error writing value ''%s'' to field %s: %s'; SFieldSizeRequired = 'Field size required for field "%s" in table "%s"'; SFinalizationFailed = 'Finalization failed for object %s(''%s''): "%s"'; SGateClassNotFoundFor = 'Gate class not found for connection class %s'; --- 97,102 ---- SFatalError = 'Fatal Error for object %s(''%s''): "%s"'; SFieldReadError = 'Error reading value from field ''%s'': %s'; SFieldSizeRequired = 'Field size required for field "%s" in table "%s"'; + SFieldWriteError = 'Error writing value ''%s'' to field %s: %s'; SFinalizationFailed = 'Finalization failed for object %s(''%s''): "%s"'; SGateClassNotFoundFor = 'Gate class not found for connection class %s'; *************** *** 99,108 **** SInvalidClass = 'Invalid class %s. Expected %s'; SInvalidConnector = 'Invalid connector for object %s(''%s'') in attribute %s(''%s'')'; - SInvalidObjectClass = 'Invalid object class %s in attribute %s(''%s''). Required class %s'; SInvalidDataType = 'Invalid data type'; SInvalidDateTime = 'Invalid date/time: %s'; SInvalidItemClass = 'Invalid item class %s'; - SInvalidObjectId = 'Invalid Id (''%s'') for object of class %s'; SInvalidMasterDataSetClass = 'Invalid master dataset class %s. Class %s required.'; SInvalidOperator = 'Invalid operator: %s'; SInvalidPropertyValue = 'Invalid property value'; --- 108,117 ---- SInvalidClass = 'Invalid class %s. Expected %s'; SInvalidConnector = 'Invalid connector for object %s(''%s'') in attribute %s(''%s'')'; SInvalidDataType = 'Invalid data type'; SInvalidDateTime = 'Invalid date/time: %s'; SInvalidItemClass = 'Invalid item class %s'; SInvalidMasterDataSetClass = 'Invalid master dataset class %s. Class %s required.'; + SInvalidObjectClass = 'Invalid object class %s in attribute %s(''%s''). Required class %s'; + SInvalidObjectId = 'Invalid Id (''%s'') for object of class %s'; SInvalidOperator = 'Invalid operator: %s'; SInvalidPropertyValue = 'Invalid property value'; *************** *** 113,120 **** SMetadataNotFound = 'Metadata not found for class %s'; SMethodNotFound = 'Method ''%s'' not found for class %s'; ! SDeniedDispose = 'Denied dispose of object %s(''%s'')'; ! SDeniedRefresh = 'Denied refresh of object %s(''%s'')'; ! SDeniedRetrieve = 'Denied retrieve of object %s(''%s'')'; ! SDeniedStore = 'Denied store of object %s(''%s'')'; SNotPublishedObjectProperty = '%s is not a published object property'; SObjectClassUndefined = 'ObjectClass undefined'; --- 122,126 ---- SMetadataNotFound = 'Metadata not found for class %s'; SMethodNotFound = 'Method ''%s'' not found for class %s'; ! SMissingImplementation = 'Method %s is not implemented in class %s'; SNotPublishedObjectProperty = '%s is not a published object property'; SObjectClassUndefined = 'ObjectClass undefined'; *************** *** 127,137 **** STrueString = 'True'; SUnableToQueryAttribute = 'Unable to query on attribute %s.%s'; - SUnexpectedAttributeClass = 'Unexpected attribute class for %s(''%s'') in class %s. Expected attribute class %s'; - SUnexpectedAttributeCategory = 'Unexpected attribute category %s for %s(''%s'') in class %s. Expected attribute category %s'; - SUnexpectedClass = 'Unexpected class %s. Expected class %s'; - SUnexpectedToken = 'Unexpected token ''%s''. Expected token ''%s'''; SUnassigned = '[Unassigned]'; - SUnassignedBroker = 'Unassigned broker'; SUnassignedAttributeMetadata = 'Unassigned metadata for attribute %s(''%s'')'; SUnassignedClass = 'Unassigned class'; SUnassignedClassMetadata = 'Unassigned metadata for class %s'; --- 133,139 ---- STrueString = 'True'; SUnableToQueryAttribute = 'Unable to query on attribute %s.%s'; SUnassigned = '[Unassigned]'; SUnassignedAttributeMetadata = 'Unassigned metadata for attribute %s(''%s'')'; + SUnassignedBroker = 'Unassigned broker'; SUnassignedClass = 'Unassigned class'; SUnassignedClassMetadata = 'Unassigned metadata for class %s'; *************** *** 147,162 **** SUnassignedStream = 'Unassigned stream'; SUnassignedTranslator = 'Unassigned translator'; SUnknownAttributeClass = 'Unknown attribute class for attribute %s(''%s'')'; SUnspecifiedCommand = 'Command is not specified'; SUnsupportedDataType = 'Unsupported datatype: %s'; SUnsupportedType = 'Unsupported type: %s'; SUpdateConflict = 'Object %s(''%s'') was updated by another session'; - SUnsupportedGraphicStream = 'Unsupported graphic stream format'; - SUnsupportedGraphicClass = 'Unsupported graphic class'; - SMissingImplementation = 'Method %s is not implemented in class %s'; - SConnectionManagerCaption = 'Connection Manager'; - SConnectionManagerExecutorNotAssigned = 'Connection manager execution procedure not assigned'; - SConnectionDefError = 'Error: connection definitions %s not found in file %s'; - SConnectionDefFilter = 'Connection files|*.con;*.xml'; implementation --- 149,165 ---- SUnassignedStream = 'Unassigned stream'; SUnassignedTranslator = 'Unassigned translator'; + SUndefinedCatalog = 'Catalog not defined for %s'; + SUnexpectedAttributeCategory = 'Unexpected attribute category %s for %s(''%s'') in class %s. Expected attribute category %s'; + SUnexpectedAttributeClass = 'Unexpected attribute class for %s(''%s'') in class %s. Expected attribute class %s'; + SUnexpectedClass = 'Unexpected class %s. Expected class %s'; + SUnexpectedToken = 'Unexpected token ''%s''. Expected token ''%s'''; SUnknownAttributeClass = 'Unknown attribute class for attribute %s(''%s'')'; SUnspecifiedCommand = 'Command is not specified'; SUnsupportedDataType = 'Unsupported datatype: %s'; + SUnsupportedGraphicClass = 'Unsupported graphic class'; + SUnsupportedGraphicStream = 'Unsupported graphic stream format'; + SUnsupportedOperation = 'Unsupported operation: %s'; SUnsupportedType = 'Unsupported type: %s'; SUpdateConflict = 'Object %s(''%s'') was updated by another session'; implementation |
From: Nando D. <na...@us...> - 2005-06-18 09:40:08
|
Update of /cvsroot/instantobjects/Source/Brokers/XML/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23811/Brokers/XML/D7 Modified Files: DclIOXML.cfg DclIOXML.dof DclIOXML.dpk IOXML.cfg IOXML.dof IOXML.dpk Log Message: harmonized compiler options Index: DclIOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/DclIOXML.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOXML.dpk 20 Jul 2004 16:39:09 -0000 1.1 --- DclIOXML.dpk 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 19,23 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} --- 19,23 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} Index: DclIOXML.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/DclIOXML.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOXML.cfg 20 Jul 2004 16:39:09 -0000 1.1 --- DclIOXML.cfg 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: IOXML.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/IOXML.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOXML.cfg 20 Jul 2004 16:39:09 -0000 1.1 --- IOXML.cfg 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: IOXML.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/IOXML.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOXML.dof 20 Jul 2004 16:39:09 -0000 1.1 --- IOXML.dof 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 137,144 **** Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - [HistoryLists\hlSearchPath] - Count=1 - Item0=..\core - [HistoryLists\hlBPLOutput] - Count=1 - Item0=$(DELPHI)\Lib --- 137,138 ---- Index: IOXML.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/IOXML.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOXML.dpk 20 Jul 2004 16:39:09 -0000 1.1 --- IOXML.dpk 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 18,22 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} --- 18,22 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} Index: DclIOXML.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/XML/D7/DclIOXML.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOXML.dof 20 Jul 2004 16:39:09 -0000 1.1 --- DclIOXML.dof 18 Jun 2005 09:39:56 -0000 1.2 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 137,144 **** Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - [HistoryLists\hlSearchPath] - Count=1 - Item0=..\core - [HistoryLists\hlBPLOutput] - Count=1 - Item0=$(DELPHI)\Lib --- 137,138 ---- |
From: Nando D. <na...@us...> - 2005-06-18 09:38:29
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23468/Brokers/UIB/D7 Modified Files: DclIOUIB.cfg DclIOUIB.dof DclIOUIB.dpk IOUIB.cfg IOUIB.dof IOUIB.dpk Log Message: support for IB/Fb database evolution; harmonized compiler options Index: IOUIB.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/IOUIB.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOUIB.dpk 11 Oct 2004 08:15:09 -0000 1.1 --- IOUIB.dpk 18 Jun 2005 09:38:20 -0000 1.2 *************** *** 18,24 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 18,24 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} *************** *** 33,37 **** ibxpress, IOCore, ! JvUIBD7R; contains --- 33,38 ---- ibxpress, IOCore, ! JvUIBD7R, ! IOIBFbCatalog; contains Index: IOUIB.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/IOUIB.dof,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOUIB.dof 3 Feb 2005 16:49:01 -0000 1.2 --- IOUIB.dof 18 Jun 2005 09:38:20 -0000 1.3 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 Index: IOUIB.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/IOUIB.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOUIB.cfg 11 Oct 2004 08:15:09 -0000 1.1 --- IOUIB.cfg 18 Jun 2005 09:38:20 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: DclIOUIB.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/DclIOUIB.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOUIB.cfg 11 Oct 2004 08:15:09 -0000 1.1 --- DclIOUIB.cfg 18 Jun 2005 09:38:20 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: DclIOUIB.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/DclIOUIB.dof,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DclIOUIB.dof 6 Dec 2004 08:51:23 -0000 1.2 --- DclIOUIB.dof 18 Jun 2005 09:38:20 -0000 1.3 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 134,135 **** --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 + [HistoryLists\hlUnitAliases] + Count=1 + Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; Index: DclIOUIB.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D7/DclIOUIB.dpk,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DclIOUIB.dpk 3 Feb 2005 15:33:23 -0000 1.2 --- DclIOUIB.dpk 18 Jun 2005 09:38:20 -0000 1.3 *************** *** 19,25 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 19,25 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} |
From: Nando D. <na...@us...> - 2005-06-18 09:37:58
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB/D6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23358/Brokers/UIB/D6 Modified Files: IOUIB.dpk Log Message: support for IB/Fb database evolution. Index: IOUIB.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/D6/IOUIB.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOUIB.dpk 18 Feb 2005 15:33:36 -0000 1.1 --- IOUIB.dpk 18 Jun 2005 09:37:47 -0000 1.2 *************** *** 33,37 **** ibxpress, IOCore, ! JvUIBD6R; contains --- 33,38 ---- ibxpress, IOCore, ! JvUIBD6R, ! IOIBFbCatalog; contains |
From: Nando D. <na...@us...> - 2005-06-18 07:31:10
|
Update of /cvsroot/instantobjects/Source/Brokers/DBISAM In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16669/Brokers/DBISAM Modified Files: InstantDBISAM.pas InstantDBISAMConnectionDefEdit.pas Log Message: changes applied on behalf of Juan J. V. Garcia Index: InstantDBISAM.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBISAM/InstantDBISAM.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** InstantDBISAM.pas 16 Sep 2004 11:31:51 -0000 1.3 --- InstantDBISAM.pas 18 Jun 2005 07:31:01 -0000 1.4 *************** *** 25,29 **** * * Contributor(s): ! * Carlo Barazzetta: blob streaming in XML format (Part, Parts, References) * * ***** END LICENSE BLOCK ***** *) --- 25,29 ---- * * Contributor(s): ! * Carlo Barazzetta, Juan J. V. Garcia * * ***** END LICENSE BLOCK ***** *) *************** *** 310,315 **** procedure CreateTable(TableMetadata: TInstantTableMetadata); const ! FieldTypes: array[TInstantDataType] of TFieldType = ! (ftInteger, ftFloat, ftBoolean, ftString, ftMemo, ftDateTime, ftBlob); var I: Integer; --- 310,316 ---- procedure CreateTable(TableMetadata: TInstantTableMetadata); const ! FieldTypes: array[TInstantDataType] of TFieldType = ( ! ftInteger, ftFloat, ftCurrency, ftBoolean, ftString, ftMemo, ftDateTime, ! ftBlob); var I: Integer; Index: InstantDBISAMConnectionDefEdit.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBISAM/InstantDBISAMConnectionDefEdit.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InstantDBISAMConnectionDefEdit.pas 29 Jul 2004 20:43:13 -0000 1.2 --- InstantDBISAMConnectionDefEdit.pas 18 Jun 2005 07:31:01 -0000 1.3 *************** *** 25,29 **** * * Contributor(s): ! * Carlo Barazzetta: blob streaming in XML format (Part, Parts, References) * * ***** END LICENSE BLOCK ***** *) --- 25,29 ---- * * Contributor(s): ! * Carlo Barazzetta, Juan J. V. Garcia * * ***** END LICENSE BLOCK ***** *) *************** *** 79,83 **** uses ! DBISAMTb, Graphics, SysUtils, FileCtrl; { TInstantDBISAMConnectionDefEditForm } --- 79,83 ---- uses ! DBISAMTb, Graphics, SysUtils, FileCtrl, InstantClasses, InstantPersistence; { TInstantDBISAMConnectionDefEditForm } |
From: Steven M. <sr...@us...> - 2005-06-18 05:59:36
|
Update of /cvsroot/instantobjects/Source/Brokers/NexusDbSQL In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10366 Modified Files: InstantNexusDb.pas Log Message: Dataset pooling update. Index: InstantNexusDb.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/NexusDbSQL/InstantNexusDb.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** InstantNexusDb.pas 24 Apr 2005 07:21:09 -0000 1.1 --- InstantNexusDb.pas 18 Jun 2005 05:59:27 -0000 1.2 *************** *** 746,756 **** function TInstantNexusDbSQLBroker.Execute( const aStatement: string; aParams: TParams = nil): Integer; begin ! with CreateDataSet(aStatement, aParams) as TNexusDbQuery do try ! ExecSQL; ! Result := RowsAffected; finally ! Free; end; end; --- 746,758 ---- function TInstantNexusDbSQLBroker.Execute( const aStatement: string; aParams: TParams = nil): Integer; + var + DataSet: TNexusDbQuery; begin ! DataSet := AcquireDataSet(aStatement, aParams) as TNexusDbQuery; try ! DataSet.ExecSQL; ! Result := DataSet.RowsAffected; finally ! ReleaseDataSet(DataSet); end; end; |
From: Nando D. <na...@us...> - 2005-06-17 20:07:00
|
Update of /cvsroot/instantobjects/Source/Brokers/UIB In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12970/Brokers/UIB Modified Files: InstantUIB.pas Log Message: support for IB/Fb database evolution; redundant Register procedure removed. Index: InstantUIB.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/UIB/InstantUIB.pas,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** InstantUIB.pas 5 Jun 2005 20:29:59 -0000 1.8 --- InstantUIB.pas 17 Jun 2005 20:06:51 -0000 1.9 *************** *** 21,28 **** * The Initial Developer of the Original Code is: Andrea Petrelli * ! * Contributor(s): ! * Carlo Barazzetta: ! * - OnLogin event support ! * - TInstantCurrency support * * ***** END LICENSE BLOCK ***** *) --- 21,25 ---- * The Initial Developer of the Original Code is: Andrea Petrelli * ! * Contributor(s): Carlo Barazzetta, Nando Dessena * * ***** END LICENSE BLOCK ***** *) *************** *** 114,117 **** --- 111,115 ---- function DelimitedIdentsEnabled: Boolean; protected + function CreateCatalog(const AScheme: TInstantScheme): TInstantCatalog; override; function CreateResolver(Map: TInstantAttributeMap): TInstantSQLResolver; override; function GetDatabaseName: string; override; *************** *** 122,125 **** --- 120,125 ---- 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, InstantUIBConnectionDefEdit, InstantUtils, ! TypInfo; ! ! procedure Register; ! begin ! RegisterComponents('InstantObjects', [TInstantUIBConnector]); ! end; { TInstantUIBConnectionDef } --- 145,153 ---- end; implementation uses Controls, InstantConsts, InstantUIBConnectionDefEdit, InstantUtils, ! TypInfo, InstantDBBuild, InstantIBFbCatalog; { TInstantUIBConnectionDef } *************** *** 401,404 **** --- 394,416 ---- end; + const + Types: array[TInstantDataType] of string = ( + 'INTEGER', + 'DOUBLE PRECISION', + 'DECIMAL(14,4)', + 'SMALLINT', + 'VARCHAR', + 'BLOB SUB_TYPE 1', + 'TIMESTAMP', + 'BLOB'); + + function TInstantUIBBroker.DataTypeToColumnType( + DataType: TInstantDataType; Size: Integer): string; + begin + Result := Types[DataType]; + if (DataType = dtString) and (Size > 0) then + Result := Result + InstantEmbrace(IntToStr(Size), '()'); + end; + function TInstantUIBBroker.CreateDataSet(const AStatement: string; AParams: TParams): TDataSet; *************** *** 430,451 **** end; - function TInstantUIBBroker.DataTypeToColumnType( - DataType: TInstantDataType; Size: Integer): string; - const - Types: array[TInstantDataType] of string = ( - 'INTEGER', - 'DOUBLE PRECISION', - 'DECIMAL(14,4)', - 'SMALLINT', - 'VARCHAR', - 'BLOB SUB_TYPE 1', - 'TIMESTAMP', - 'BLOB'); - begin - Result := Types[DataType]; - if (DataType = dtString) and (Size > 0) then - Result := Result + InstantEmbrace(IntToStr(Size), '()'); - end; - function TInstantUIBBroker.DelimitedIdentsEnabled: Boolean; begin --- 442,445 ---- *************** *** 505,508 **** --- 499,529 ---- end; + function TInstantUIBBroker.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 TInstantUIBBroker.CreateCatalog( + const AScheme: TInstantScheme): TInstantCatalog; + begin + Result := TInstantIBFbCatalog.Create(AScheme, Self); + end; + { TInstantUIBTranslator } |
From: Nando D. <na...@us...> - 2005-06-17 20:03:00
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12022/Brokers/IBX/D7 Modified Files: IOIBX.dpk Log Message: support for IB/Fb database evolution; harmonized compiler options Index: IOIBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/IOIBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOIBX.dpk 20 Jul 2004 16:22:57 -0000 1.1 --- IOIBX.dpk 17 Jun 2005 20:02:51 -0000 1.2 *************** *** 18,24 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 18,24 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} *************** *** 32,36 **** vcldb, ibxpress, ! IOCore; contains --- 32,37 ---- vcldb, ibxpress, ! IOCore, ! IOIBFbCatalog; contains |
From: Nando D. <na...@us...> - 2005-06-17 20:01:48
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11142/Brokers/IBX/D7 Modified Files: DclIOIBX.dpk Log Message: harmonized compiler options Index: DclIOIBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/DclIOIBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOIBX.dpk 20 Jul 2004 16:22:57 -0000 1.1 --- DclIOIBX.dpk 17 Jun 2005 20:01:39 -0000 1.2 *************** *** 19,25 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 19,25 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} |
From: Nando D. <na...@us...> - 2005-06-17 20:01:06
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10561/Brokers/IBX/D7 Modified Files: DclIOIBX.cfg DclIOIBX.dof IOIBX.cfg IOIBX.dof Log Message: harmonized compiler options Index: DclIOIBX.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/DclIOIBX.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOIBX.cfg 20 Jul 2004 16:22:57 -0000 1.1 --- DclIOIBX.cfg 17 Jun 2005 20:00:56 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: DclIOIBX.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/DclIOIBX.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOIBX.dof 20 Jul 2004 16:22:57 -0000 1.1 --- DclIOIBX.dof 17 Jun 2005 20:00:56 -0000 1.2 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 134,135 **** --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 + [HistoryLists\hlUnitAliases] + Count=1 + Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; Index: IOIBX.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/IOIBX.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOIBX.cfg 29 Jul 2004 20:43:14 -0000 1.2 --- IOIBX.cfg 17 Jun 2005 20:00:56 -0000 1.3 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: IOIBX.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D7/IOIBX.dof,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IOIBX.dof 29 Jul 2004 20:43:14 -0000 1.2 --- IOIBX.dof 17 Jun 2005 20:00:56 -0000 1.3 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 134,135 **** --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 + [HistoryLists\hlUnitAliases] + Count=1 + Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
From: Nando D. <na...@us...> - 2005-06-17 19:59:34
|
Update of /cvsroot/instantobjects/Source/Brokers/IBX/D6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9942/Brokers/IBX/D6 Modified Files: IOIBX.dpk Log Message: support for IB/Fb database evolution Index: IOIBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/IBX/D6/IOIBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOIBX.dpk 20 Jul 2004 16:22:56 -0000 1.1 --- IOIBX.dpk 17 Jun 2005 19:59:26 -0000 1.2 *************** *** 32,36 **** vcldb, ibxpress, ! IOCore; contains --- 32,37 ---- vcldb, ibxpress, ! IOCore, ! IOIBFbCatalog; contains |
From: Nando D. <na...@us...> - 2005-06-17 19:59:05
|
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; |
From: Nando D. <na...@us...> - 2005-06-17 19:56:09
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8429/Brokers/DBX/D7 Modified Files: DclIODBX.cfg DclIODBX.dof DclIODBX.dpk Log Message: harmonized compiler options Index: DclIODBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/D7/DclIODBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIODBX.dpk 20 Jul 2004 16:22:56 -0000 1.1 --- DclIODBX.dpk 17 Jun 2005 19:55:58 -0000 1.2 *************** *** 19,23 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} --- 19,23 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} Index: DclIODBX.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/D7/DclIODBX.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIODBX.cfg 20 Jul 2004 16:22:56 -0000 1.1 --- DclIODBX.cfg 17 Jun 2005 19:55:58 -0000 1.2 *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: DclIODBX.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/D7/DclIODBX.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIODBX.dof 20 Jul 2004 16:22:56 -0000 1.1 --- DclIODBX.dof 17 Jun 2005 19:55:58 -0000 1.2 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 134,135 **** --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 + [HistoryLists\hlUnitAliases] + Count=1 + Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
From: Nando D. <na...@us...> - 2005-06-17 19:55:28
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8249/Brokers/DBX/D7 Modified Files: IODBX.dpk Log Message: support for IB/Fb database evolution Index: IODBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/D7/IODBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IODBX.dpk 20 Jul 2004 16:22:56 -0000 1.1 --- IODBX.dpk 17 Jun 2005 19:55:19 -0000 1.2 *************** *** 33,37 **** dbrtl, dbexpress, ! IOCore; contains --- 33,38 ---- dbrtl, dbexpress, ! IOCore, ! IOIBFbCatalog; contains |
From: Nando D. <na...@us...> - 2005-06-17 19:52:52
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX/D6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7472/Brokers/DBX/D6 Modified Files: IODBX.dpk Log Message: support for IB/Fb database evolution Index: IODBX.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/D6/IODBX.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IODBX.dpk 20 Jul 2004 16:22:55 -0000 1.1 --- IODBX.dpk 17 Jun 2005 19:52:41 -0000 1.2 *************** *** 33,37 **** dbrtl, dbexpress, ! IOCore; contains --- 33,38 ---- dbrtl, dbexpress, ! IOCore, ! IOIBFbCatalog; contains |
From: Nando D. <na...@us...> - 2005-06-17 19:21:19
|
Update of /cvsroot/instantobjects/Source/Brokers/DBX In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23876/Brokers/DBX Modified Files: InstantDBX.pas Log Message: support for IB/Fb database evolution Index: InstantDBX.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/DBX/InstantDBX.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** InstantDBX.pas 22 Feb 2005 10:54:23 -0000 1.4 --- InstantDBX.pas 17 Jun 2005 19:21:10 -0000 1.5 *************** *** 25,33 **** * * Contributor(s): ! * Carlo Barazzetta, Adrea Petrelli: porting Kylix ! * Carlo Barazzetta: ! * - blob streaming in XML format (Part, Parts, References) ! * - Prepared queries support ! * Carlo Barazzetta: Currency and LoginPrompt support * ***** END LICENSE BLOCK ***** *) --- 25,30 ---- * * Contributor(s): ! * Carlo Barazzetta, Adrea Petrelli, Nando Dessena ! * * ***** END LICENSE BLOCK ***** *) *************** *** 105,108 **** --- 102,107 ---- 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; *************** *** 126,138 **** end; ! { InterBase } ! TInstantDBXInterBaseBroker = class(TInstantDBXBroker) private function GetDialect: Integer; protected function ColumnTypeByDataType(DataType: TInstantDataType): string; override; ! function GetDBMSName: string; override; ! function GetSQLDelimiters: string; override; function GetSQLQuote: Char; override; public --- 125,136 ---- end; ! { InterBase / Firebird (abstract) } ! TInstantDBXInterBaseFirebirdBroker = class(TInstantDBXBroker) private function GetDialect: Integer; protected function ColumnTypeByDataType(DataType: TInstantDataType): string; override; ! function CreateCatalog(const AScheme: TInstantScheme): TInstantCatalog; override; function GetSQLQuote: Char; override; public *************** *** 140,143 **** --- 138,155 ---- end; + { InterBase } + + TInstantDBXInterBaseBroker = class(TInstantDBXInterBaseFirebirdBroker) + protected + function GetDBMSName: string; override; + end; + + { Firebird through the UIB dbX driver } + + TInstantDBXFirebirdUIBBroker = class(TInstantDBXInterBaseFirebirdBroker) + protected + function GetDBMSName: string; override; + end; + { MS SQL Server } *************** *** 187,201 **** end; - procedure Register; - implementation uses ! SysUtils, InstantDBXConnectionDefEdit, InstantUtils, InstantConsts, Math; ! ! procedure Register; ! begin ! RegisterComponents('InstantObjects', [TInstantDBXConnector]); ! end; { TInstantDBXConnector } --- 199,207 ---- end; implementation uses ! SysUtils, InstantDBXConnectionDefEdit, InstantUtils, InstantConsts, Math, ! InstantDBBuild, InstantIBFbCatalog; { TInstantDBXConnector } *************** *** 230,233 **** --- 236,241 ---- else if SameText(Connection.DriverName, 'MySQL') then Result := TInstantDBXMySQLBroker.Create(Self) + else if SameText(Connection.DriverName, 'FirebirdUIB') then + Result := TInstantDBXFirebirdUIBBroker.Create(Self) else raise Exception.CreateFmt('dbExpress driver "%s" not supported', *************** *** 393,396 **** --- 401,425 ---- end; + function TInstantDBXBroker.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 TInstantDBXBroker.CreateResolver( Map: TInstantAttributeMap): TInstantSQLResolver; *************** *** 465,471 **** end; ! { TInstantDBXInterBaseBroker } ! function TInstantDBXInterBaseBroker.ColumnTypeByDataType( DataType: TInstantDataType): string; const --- 494,500 ---- end; ! { TInstantDBXInterBaseFirebirdBroker } ! function TInstantDBXInterBaseFirebirdBroker.ColumnTypeByDataType( DataType: TInstantDataType): string; const *************** *** 483,507 **** end; ! function TInstantDBXInterBaseBroker.GetDBMSName: string; begin ! Result := 'InterBase'; end; ! function TInstantDBXInterBaseBroker.GetDialect: Integer; begin Result := StrToIntDef(Connector.ParamByName('SQLDialect'), 3); end; ! function TInstantDBXInterBaseBroker.GetSQLDelimiters: string; ! begin ! // if Dialect >= 3 then ! // Result := '""' ! // else ! Result := inherited GetSQLDelimiters; ! end; ! ! function TInstantDBXInterBaseBroker.GetSQLQuote: Char; begin ! Result := '''' end; --- 512,529 ---- end; ! function TInstantDBXInterBaseFirebirdBroker.CreateCatalog( ! const AScheme: TInstantScheme): TInstantCatalog; begin ! Result := TInstantIBFbCatalog.Create(AScheme, Self); end; ! function TInstantDBXInterBaseFirebirdBroker.GetDialect: Integer; begin Result := StrToIntDef(Connector.ParamByName('SQLDialect'), 3); end; ! function TInstantDBXInterBaseFirebirdBroker.GetSQLQuote: Char; begin ! Result := ''''; end; *************** *** 664,667 **** --- 686,703 ---- end; + { TInstantDBXInterBaseBroker } + + function TInstantDBXInterBaseBroker.GetDBMSName: string; + begin + Result := 'InterBase'; + end; + + { TInstantDBXFirebirdUIBBroker } + + function TInstantDBXFirebirdUIBBroker.GetDBMSName: string; + begin + Result := 'Firebird'; + end; + initialization RegisterClass(TInstantDBXConnectionDef); |
From: Nando D. <na...@us...> - 2005-06-17 19:19:41
|
Update of /cvsroot/instantobjects/Source/Brokers/BDE/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22862/Brokers/BDE/D7 Modified Files: DclIOBDE.cfg DclIOBDE.dof DclIOBDE.dpk IOBDE.cfg IOBDE.dof IOBDE.dpk Log Message: harmonized compiler options Index: IOBDE.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/IOBDE.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOBDE.cfg 20 Jul 2004 16:22:55 -0000 1.1 --- IOBDE.cfg 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ Index: IOBDE.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/IOBDE.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOBDE.dof 20 Jul 2004 16:22:55 -0000 1.1 --- IOBDE.dof 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 Index: DclIOBDE.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/DclIOBDE.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOBDE.dpk 20 Jul 2004 16:22:55 -0000 1.1 --- DclIOBDE.dpk 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 21,25 **** {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 21,25 ---- {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} Index: IOBDE.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/IOBDE.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOBDE.dpk 20 Jul 2004 16:22:55 -0000 1.1 --- IOBDE.dpk 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 20,24 **** {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 20,24 ---- {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} Index: DclIOBDE.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/DclIOBDE.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOBDE.cfg 20 Jul 2004 16:22:55 -0000 1.1 --- DclIOBDE.cfg 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ Index: DclIOBDE.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/BDE/D7/DclIOBDE.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOBDE.dof 20 Jul 2004 16:22:55 -0000 1.1 --- DclIOBDE.dof 17 Jun 2005 19:19:01 -0000 1.2 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 134,135 **** --- 134,138 ---- ProductName=InstantObjects ProductVersion=1.7 + [HistoryLists\hlUnitAliases] + Count=1 + Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; |
From: Nando D. <na...@us...> - 2005-06-17 19:17:18
|
Update of /cvsroot/instantobjects/Source/Brokers/ADO/D7 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21483/Brokers/ADO/D7 Modified Files: DclIOADO.cfg DclIOADO.dof DclIOADO.dpk IOADO.cfg IOADO.dof IOADO.dpk Log Message: harmonized compiler options Index: DclIOADO.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/DclIOADO.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOADO.dof 20 Jul 2004 16:22:54 -0000 1.1 --- DclIOADO.dof 17 Jun 2005 19:16:45 -0000 1.2 *************** *** 18,25 **** O=1 P=1 ! Q=1 ! R=1 S=0 ! T=0 U=0 V=1 --- 18,25 ---- O=1 P=1 ! Q=0 ! R=0 S=0 ! T=1 U=0 V=1 *************** *** 95,99 **** PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath=$(DELPHI)\Lib\Debug Packages=vcl;rtl;dbrtl Conditionals= --- 95,99 ---- PackageDLLOutputDir= PackageDCPOutputDir= ! SearchPath= Packages=vcl;rtl;dbrtl Conditionals= *************** *** 138,142 **** Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - [HistoryLists\hlSearchPath] - Count=1 - Item0=$(DELPHI)\Lib\Debug --- 138,139 ---- Index: IOADO.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/IOADO.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOADO.dpk 20 Jul 2004 16:22:54 -0000 1.1 --- IOADO.dpk 17 Jun 2005 19:16:46 -0000 1.2 *************** *** 18,24 **** {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST ON} {$MINENUMSIZE 1} {$IMAGEBASE $400000} --- 18,24 ---- {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} ! {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} Index: DclIOADO.dpk =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/DclIOADO.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOADO.dpk 20 Jul 2004 16:22:54 -0000 1.1 --- DclIOADO.dpk 17 Jun 2005 19:16:45 -0000 1.2 *************** *** 14,23 **** {$OPENSTRINGS ON} {$OPTIMIZATION ON} ! {$OVERFLOWCHECKS ON} ! {$RANGECHECKS ON} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} --- 14,23 ---- {$OPENSTRINGS ON} {$OPTIMIZATION ON} ! {$OVERFLOWCHECKS OFF} ! {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} ! {$TYPEDADDRESS ON} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} Index: DclIOADO.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/DclIOADO.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DclIOADO.cfg 20 Jul 2004 16:22:54 -0000 1.1 --- DclIOADO.cfg 17 Jun 2005 19:16:45 -0000 1.2 *************** *** 15,22 **** -$O+ -$P+ ! -$Q+ ! -$R+ -$S- ! -$T- -$U- -$V+ --- 15,22 ---- -$O+ -$P+ ! -$Q- ! -$R- -$S- ! -$T+ -$U- -$V+ *************** *** 34,41 **** -LE"c:\programmi\borland\delphi7\Projects\Bpl" -LN"c:\programmi\borland\delphi7\Projects\Bpl" - -U"c:\programmi\borland\delphi7\Lib\Debug" - -O"c:\programmi\borland\delphi7\Lib\Debug" - -I"c:\programmi\borland\delphi7\Lib\Debug" - -R"c:\programmi\borland\delphi7\Lib\Debug" -Z -w-UNSAFE_TYPE --- 34,37 ---- Index: IOADO.cfg =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/IOADO.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOADO.cfg 20 Jul 2004 16:22:54 -0000 1.1 --- IOADO.cfg 17 Jun 2005 19:16:45 -0000 1.2 *************** *** 8,12 **** -$H+ -$I+ ! -$J+ -$K- -$L+ --- 8,12 ---- -$H+ -$I+ ! -$J- -$K- -$L+ *************** *** 18,22 **** -$R- -$S- ! -$T- -$U- -$V+ --- 18,22 ---- -$R- -$S- ! -$T+ -$U- -$V+ Index: IOADO.dof =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/D7/IOADO.dof,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IOADO.dof 20 Jul 2004 16:22:54 -0000 1.1 --- IOADO.dof 17 Jun 2005 19:16:45 -0000 1.2 *************** *** 11,15 **** H=1 I=1 ! J=1 K=0 L=1 --- 11,15 ---- H=1 I=1 ! J=0 K=0 L=1 *************** *** 21,25 **** R=0 S=0 ! T=0 U=0 V=1 --- 21,25 ---- R=0 S=0 ! T=1 U=0 V=1 *************** *** 137,141 **** Count=1 Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; - [HistoryLists\hlSearchPath] - Count=1 - Item0=$(DELPHI)\Lib\Debug --- 137,138 ---- |
From: Nando D. <na...@us...> - 2005-06-17 19:12:01
|
Update of /cvsroot/instantobjects/Source/Brokers/ADO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18236/Brokers/ADO Modified Files: InstantADO.pas Log Message: small change due to the database evolution refactorings Index: InstantADO.pas =================================================================== RCS file: /cvsroot/instantobjects/Source/Brokers/ADO/InstantADO.pas,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** InstantADO.pas 22 Feb 2005 10:53:50 -0000 1.9 --- InstantADO.pas 17 Jun 2005 19:11:53 -0000 1.10 *************** *** 424,430 **** Catalog := CoCatalog.Create; Catalog.Set_ActiveConnection(Connection.ConnectionObject); ! with Scheme do ! for I := 0 to Pred(TableMetadataCount) do ! AddTable(Catalog, TableMetadatas[I]); end; --- 424,429 ---- Catalog := CoCatalog.Create; Catalog.Set_ActiveConnection(Connection.ConnectionObject); ! for I := 0 to Pred(Scheme.TableMetadataCount) do ! AddTable(Catalog, Scheme.TableMetadatas[I]); end; |
From: Nando D. <na...@us...> - 2005-06-17 19:10:51
|
Update of /cvsroot/instantobjects/Source/Catalogs/IBFb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17312/Catalogs/IBFb Added Files: InstantIBFbCatalog.pas Log Message: Catalog to read IB/Fb metadata information --- NEW FILE: InstantIBFbCatalog.pas --- unit InstantIBFbCatalog; interface uses InstantPersistence; type // A TInstantCatalog that reads catalog information from an InterBase // or Firebird database. Can be used with a SQL broker that accesses // InterBase or Firebird databases. TInstantIBFbCatalog = class(TInstantSQLBrokerCatalog) private procedure AddFieldMetadatas(TableMetadata: TInstantTableMetadata); procedure AddIndexMetadatas(TableMetadata: TInstantTableMetadata); procedure AddTableMetadatas(TableMetadatas: TInstantTableMetadatas); function ColumnTypeToDataType(const ColumnType: string; const BlobSubType, FieldScale: Integer): TInstantDataType; function GetSelectFieldsSQL(const ATableName: string): string; function GetSelectIndexesSQL(const ATableName: string): string; function GetSelectIndexFieldsSQL(const AIndexName: string): string; function GetSelectTablesSQL: string; public procedure InitTableMetadatas(ATableMetadatas: TInstantTableMetadatas); override; end; implementation uses SysUtils, Classes, DB; { TInstantIBFbCatalog } procedure TInstantIBFbCatalog.AddIndexMetadatas( TableMetadata: TInstantTableMetadata); var Indexes: TDataSet; IndexMetadata: TInstantIndexMetadata; function GetIndexFields(const IndexName: string): string; var IndexFieldList: TStrings; IndexFields: TDataSet; begin IndexFieldList := TStringList.Create; try IndexFields := Broker.AcquireDataSet(GetSelectIndexFieldsSQL(IndexName)); try IndexFields.Open; try while not IndexFields.Eof do begin IndexFieldList.Add(Trim(IndexFields.FieldByName('RDB$FIELD_NAME').AsString)); IndexFields.Next; end; finally IndexFields.Close; end; finally Broker.ReleaseDataSet(IndexFields); end; IndexFieldList.Delimiter := ';'; Result := IndexFieldList.DelimitedText; finally IndexFieldList.Free; end; end; begin Indexes := Broker.AcquireDataSet(GetSelectIndexesSQL(TableMetadata.Name)); try Indexes.Open; try while not Indexes.Eof do begin IndexMetadata := TableMetadata.IndexMetadatas.Add; IndexMetadata.Name := Trim(Indexes.FieldByName('RDB$INDEX_NAME').AsString); IndexMetadata.Fields := GetIndexFields(IndexMetadata.Name); IndexMetadata.Options := []; if Pos('RDB$PRIMARY', Indexes.FieldByName('RDB$INDEX_NAME').AsString) = 1 then IndexMetadata.Options := IndexMetadata.Options + [ixPrimary, ixUnique] else if Indexes.FieldByName('RDB$UNIQUE_FLAG').AsInteger = 1 then IndexMetadata.Options := IndexMetadata.Options + [ixUnique]; { TODO : support other Options? } Indexes.Next; end; finally Indexes.Close; end; finally Broker.ReleaseDataSet(Indexes); end; end; procedure TInstantIBFbCatalog.AddFieldMetadatas( TableMetadata: TInstantTableMetadata); var Fields: TDataSet; FieldMetadata: TInstantFieldMetadata; begin Fields := Broker.AcquireDataSet(GetSelectFieldsSQL(TableMetadata.Name)); try Fields.Open; try while not Fields.Eof do begin FieldMetadata := TableMetadata.FieldMetadatas.Add; FieldMetadata.Name := Trim(Fields.FieldByName('RDB$FIELD_NAME').AsString); FieldMetadata.DataType := ColumnTypeToDataType( Trim(Fields.FieldByName('RDB$TYPE_NAME').AsString), Fields.FieldByName('RDB$FIELD_SUB_TYPE').AsInteger, Fields.FieldByName('RDB$FIELD_SCALE').AsInteger); FieldMetadata.Options := []; if Fields.FieldByName('RDB$NULL_FLAG').AsInteger <> 0 then FieldMetadata.Options := FieldMetadata.Options + [foRequired]; if TableMetadata.IndexMetadatas.IsFieldIndexed(FieldMetadata) then FieldMetadata.Options := FieldMetadata.Options + [foIndexed]; { TODO : support ExternalTableName? } if FieldMetadata.DataType = dtString then FieldMetadata.Size := Fields.FieldByName('RDB$CHARACTER_LENGTH').AsInteger else FieldMetadata.Size := Fields.FieldByName('RDB$FIELD_LENGTH').AsInteger; Fields.Next; end; finally Fields.Close; end; finally Broker.ReleaseDataSet(Fields); end; end; procedure TInstantIBFbCatalog.AddTableMetadatas( TableMetadatas: TInstantTableMetadatas); var Tables: TDataSet; TableMetadata: TInstantTableMetadata; begin Tables := Broker.AcquireDataSet(GetSelectTablesSQL()); try Tables.Open; try while not Tables.Eof do begin TableMetadata := TableMetadatas.Add; TableMetadata.Name := Trim(Tables.FieldByName('RDB$RELATION_NAME').AsString); // Call AddIndexMetadatas first, so that AddFieldMetadatas can see what // indexes are defined to correctly set the foIndexed option. AddIndexMetadatas(TableMetadata); AddFieldMetadatas(TableMetadata); Tables.Next; end; finally Tables.Close; end; finally Broker.ReleaseDataSet(Tables); end; end; function TInstantIBFbCatalog.ColumnTypeToDataType(const ColumnType: string; const BlobSubType, FieldScale: Integer): TInstantDataType; begin { TODO : How to use FieldScale? } if SameText(ColumnType, 'TEXT') or SameText(ColumnType, 'VARYING') then Result := dtString else if SameText(ColumnType, 'SHORT') or SameText(ColumnType, 'LONG') then Result := dtInteger else if SameText(ColumnType, 'FLOAT') or SameText(ColumnType, 'DOUBLE') then Result := dtFloat else if SameText(ColumnType, 'TIMESTAMP') or SameText(ColumnType, 'DATE') or SameText(ColumnType, 'TIME')then Result := dtDateTime else if SameText(ColumnType, 'BLOB') then begin if BlobSubType = 1 then Result := dtMemo else Result := dtBlob; end else raise Exception.CreateFmt('ColumnType %s not supported.', [ColumnType]); end; function TInstantIBFbCatalog.GetSelectFieldsSQL( const ATableName: string): string; begin Result := 'select ' + ' RF.RDB$FIELD_NAME, RF.RDB$NULL_FLAG, ' + ' T.RDB$TYPE_NAME, F.RDB$FIELD_SUB_TYPE, F.RDB$FIELD_LENGTH, ' + ' F.RDB$FIELD_SCALE, F.RDB$CHARACTER_LENGTH ' + 'from ' + ' RDB$RELATION_FIELDS RF ' + 'join ' + ' RDB$FIELDS F ' + 'on ' + ' RF.RDB$FIELD_SOURCE = F.RDB$FIELD_NAME ' + 'join ' + ' RDB$TYPES T ' + 'on ' + ' F.RDB$FIELD_TYPE = T.RDB$TYPE ' + ' and T.RDB$FIELD_NAME = ''RDB$FIELD_TYPE'' ' + 'where ' + ' RF.RDB$RELATION_NAME = ''' + ATableName + ''' ' + 'order by ' + ' RF.RDB$FIELD_POSITION'; end; function TInstantIBFbCatalog.GetSelectIndexesSQL( const ATableName: string): string; begin Result := 'select ' + ' RDB$INDEX_NAME, RDB$UNIQUE_FLAG ' + 'from ' + ' RDB$INDICES ' + 'where ' + ' RDB$RELATION_NAME = ''' + ATableName + ''' ' + 'order by ' + ' RDB$INDEX_NAME'; end; function TInstantIBFbCatalog.GetSelectIndexFieldsSQL( const AIndexName: string): string; begin Result := 'select ' + ' RDB$FIELD_NAME ' + 'from ' + ' RDB$INDEX_SEGMENTS ' + 'where ' + ' RDB$INDEX_NAME = ''' + AIndexName + ''' ' + 'order by ' + ' RDB$FIELD_POSITION'; end; function TInstantIBFbCatalog.GetSelectTablesSQL: string; begin Result := 'select ' + ' RDB$RELATION_NAME ' + 'from ' + ' RDB$RELATIONS ' + 'where ' + ' RDB$SYSTEM_FLAG = 0 ' + ' and RDB$VIEW_BLR is null ' + 'order by ' + ' RDB$RELATION_NAME'; end; procedure TInstantIBFbCatalog.InitTableMetadatas( ATableMetadatas: TInstantTableMetadatas); begin ATableMetadatas.Clear; AddTableMetadatas(ATableMetadatas); end; end. |