[Quantproject-developers] QuantDownloader/Downloader/OpenTickDownloader/DatabaseManagement DataBas
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-01-11 20:38:26
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/DatabaseManagement In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17077/Downloader/OpenTickDownloader/DatabaseManagement Modified Files: DataBaseWriter.cs Log Message: Old commented code has been removed Index: DataBaseWriter.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/OpenTickDownloader/DatabaseManagement/DataBaseWriter.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DataBaseWriter.cs 4 Jan 2009 17:46:44 -0000 1.3 --- DataBaseWriter.cs 11 Jan 2009 20:38:14 -0000 1.4 *************** *** 82,123 **** } - // #region getSqlCommand - // - // #region getSqlCommand_getValues - // private string formatDoubleForSql( double value ) - // { - // string formattedValue = - // value.ToString().Replace( ',' , '.' ); - // return formattedValue; - // } - // private string getSqlCommand_getValues( Bar bar ) - // { - // DateTime utcDateTimeForOpen = - // TimeZoneManager.ConvertToEST( bar.DateTimeForOpenInUTCTime ); - // string values = - // "'" + bar.Ticker + "' , " + - // "'" + bar.Exchange + "' , " + - // DataBaseWriter.GetDateConstant( utcDateTimeForOpen ) + " , " + - // bar.Interval + " , " + - // formatDoubleForSql( bar.Open ) + " , " + - // formatDoubleForSql( bar.High ) + " , " + - // formatDoubleForSql( bar.Low ) + " , " + - // formatDoubleForSql( bar.Close ) + " , " + - // bar.Volume; - // return values; - // } - // #endregion getSqlCommand_getValues - // - // private string getSqlCommand( Bar bar ) - // { - // string sqlCommand = - // "INSERT INTO bars " + - // "( baTicker, baExchange, baDateTimeForOpen, baInterval, baOpen, baHigh, baLow, baClose, baVolume ) " + - // "SELECT " + this.getSqlCommand_getValues( bar ) + ";"; - //// "SELECT 'MSFT' , 'Q' , #12/13/2004 15:16:17# , 60 , 30.2 , 30.5 , 29.9 , 30.3 , 100000 ;"; - // return sqlCommand; - // } - // #endregion getSqlCommand - private void writeToDataBaseActually( Bar bar ) { --- 82,85 ---- *************** *** 127,133 **** bar.Ticker , bar.Exchange , dateTimeForOpenInESTTime , bar.Interval , bar.Open , bar.High , bar.Low , bar.Close , bar.Volume ); - // string sqlCommand = - // this.getSqlCommand( bar ); - // SqlExecutor.ExecuteNonQuery( sqlCommand ); } private void riseDatabaseUpdatedEvent( Bar bar ) --- 89,92 ---- *************** *** 173,195 **** this.writeToDataBaseThread.Start(); } - - // /// <summary> - // /// Builds a date to be used in a Sql query - // /// </summary> - // /// <param name="dateTime"></param> - // /// <returns></returns> - // public static string GetDateConstant( DateTime dateTime ) - // { - // string dateConstant = - // "#" + - // dateTime.Month + "/" + - // dateTime.Day + "/" + - // dateTime.Year + " " + - // dateTime.Hour + ":" + - // dateTime.Minute + ":" + - // dateTime.Second + - // "#"; - // return dateConstant; - // } } } --- 132,135 ---- |