From: Michael D. <mik...@us...> - 2004-08-25 03:54:58
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6005/NHibernate/Impl Modified Files: PreparerImpl.cs Log Message: Removed BuildCommand from the public api. Index: PreparerImpl.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Impl/PreparerImpl.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PreparerImpl.cs 19 Jul 2004 03:21:32 -0000 1.7 --- PreparerImpl.cs 25 Aug 2004 03:54:49 -0000 1.8 *************** *** 24,30 **** // key = SqlString or a sql string // value = ADO.NET Command - // A Built command is just an sql string/SQL Statement that has been converted - // into an ADO.NET Command - private Hashtable builtCommands = new Hashtable(); // A prepared command is ADO.NET command that is attached to an IDbConnection --- 24,27 ---- *************** *** 62,66 **** // a connection. preparedCommands = new Hashtable(); - builtCommands = new Hashtable(); currentConnection = value; --- 59,62 ---- *************** *** 73,89 **** } ! public IDbCommand BuildCommand(string sql) { ! IDbCommand cmd = builtCommands[sql] as IDbCommand; ! if( cmd==null ) { ! cmd = factory.ConnectionProvider.Driver.GenerateCommand(factory.Dialect, sql); ! if(log.IsDebugEnabled) ! { ! log.Debug( "Building an IDbCommand object for the sql: " + sql ); ! } } - - builtCommands[sql] = cmd; return cmd; --- 69,79 ---- } ! private IDbCommand BuildCommand(string sql) { ! IDbCommand cmd = factory.ConnectionProvider.Driver.GenerateCommand(factory.Dialect, sql); ! if(log.IsDebugEnabled) { ! log.Debug( "Building an IDbCommand object for the sql: " + sql ); } return cmd; *************** *** 91,108 **** ! public IDbCommand BuildCommand(SqlString sqlString) { ! IDbCommand cmd = builtCommands[sqlString] as IDbCommand; ! ! if( cmd==null ) { ! cmd = factory.ConnectionProvider.Driver.GenerateCommand(factory.Dialect, sqlString); ! if(log.IsDebugEnabled) ! { ! log.Debug( "Building an IDbCommand object for the SqlString: " + sqlString.ToString() ); ! } } - - builtCommands[sqlString] = cmd; return cmd; --- 81,91 ---- ! private IDbCommand BuildCommand(SqlString sqlString) { ! IDbCommand cmd = factory.ConnectionProvider.Driver.GenerateCommand(factory.Dialect, sqlString); ! if(log.IsDebugEnabled) { ! log.Debug( "Building an IDbCommand object for the SqlString: " + sqlString.ToString() ); } return cmd; *************** *** 159,163 **** public IDbCommand PrepareCommand(IDbCommand dbCommand) { - try { --- 142,145 ---- *************** *** 189,193 **** } - public IDbCommand PrepareCommand(string sql) { --- 171,174 ---- |