From: Michael D. <mik...@us...> - 2005-01-23 15:48:09
|
Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17470/SqlCommand Modified Files: ANSIJoinFragment.cs QuerySelect.cs SqlDeleteBuilder.cs SqlUpdateBuilder.cs Template.cs Log Message: parameter renaming from FxCop fixed a spelling error in the error message that is generated in AnsiJoinFragment. Index: ANSIJoinFragment.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/ANSIJoinFragment.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ANSIJoinFragment.cs 31 Dec 2004 22:24:36 -0000 1.3 --- ANSIJoinFragment.cs 23 Jan 2005 15:48:00 -0000 1.4 *************** *** 40,44 **** break; default: ! throw new AssertionFailure( "undefind join type" ); } --- 40,44 ---- break; default: ! throw new AssertionFailure( "undefined join type" ); } Index: SqlDeleteBuilder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlDeleteBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SqlDeleteBuilder.cs 31 Dec 2004 22:25:33 -0000 1.5 --- SqlDeleteBuilder.cs 23 Jan 2005 15:48:00 -0000 1.6 *************** *** 87,95 **** /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereString">A well formed sql string with no parameters.</param> /// <returns>The SqlDeleteBuilder</returns> ! public SqlDeleteBuilder AddWhereFragment( string whereString ) { ! whereStrings.Add( new SqlString( whereString ) ); return this; } --- 87,95 ---- /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereSql">A well formed sql statement with no parameters.</param> /// <returns>The SqlDeleteBuilder</returns> ! public SqlDeleteBuilder AddWhereFragment( string whereSql ) { ! whereStrings.Add( new SqlString( whereSql ) ); return this; } Index: QuerySelect.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/QuerySelect.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** QuerySelect.cs 31 Dec 2004 22:25:19 -0000 1.4 --- QuerySelect.cs 23 Jan 2005 15:48:00 -0000 1.5 *************** *** 22,26 **** private StringBuilder orderBy = new StringBuilder(); private StringBuilder having = new StringBuilder(); ! private bool distinct = false; /// <summary> --- 22,28 ---- private StringBuilder orderBy = new StringBuilder(); private StringBuilder having = new StringBuilder(); ! ! // false by default ! private bool distinct; /// <summary> *************** *** 200,207 **** /// <summary> ! /// /// </summary> ! /// <param name="orderByString"></param> ! public void AddOrderBy( string orderByString ) { if( orderBy.Length > 0 ) --- 202,210 ---- /// <summary> ! /// Adds a string containing a valid "order by" sql statement ! /// to this QuerySelect /// </summary> ! /// <param name="orderBySql">The "order by" sql statement.</param> ! public void AddOrderBy( string orderBySql ) { if( orderBy.Length > 0 ) *************** *** 209,213 **** orderBy.Append( StringHelper.CommaSpace ); } ! orderBy.Append( orderByString ); } --- 212,216 ---- orderBy.Append( StringHelper.CommaSpace ); } ! orderBy.Append( orderBySql ); } Index: SqlUpdateBuilder.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/SqlUpdateBuilder.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SqlUpdateBuilder.cs 31 Dec 2004 22:25:58 -0000 1.5 --- SqlUpdateBuilder.cs 23 Jan 2005 15:48:00 -0000 1.6 *************** *** 155,163 **** /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereString">A well formed sql string with no parameters.</param> /// <returns>The SqlUpdateBuilder</returns> ! public SqlUpdateBuilder AddWhereFragment( string whereString ) { ! whereStrings.Add( new SqlString( whereString ) ); return this; } --- 155,163 ---- /// Adds a string to the WhereFragement /// </summary> ! /// <param name="whereSql">A well formed sql string with no parameters.</param> /// <returns>The SqlUpdateBuilder</returns> ! public SqlUpdateBuilder AddWhereFragment( string whereSql ) { ! whereStrings.Add( new SqlString( whereSql ) ); return this; } Index: Template.cs =================================================================== RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/SqlCommand/Template.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Template.cs 31 Dec 2004 22:25:58 -0000 1.11 --- Template.cs 23 Jan 2005 15:48:00 -0000 1.12 *************** *** 88,101 **** /// Takes the where condition provided in the mapping attribute and iterpolates the alias. /// </summary> ! /// <param name="sqlWhereString"></param> ! /// <param name="dialect"></param> ! /// <returns></returns> ! public static string RenderWhereStringTemplate( string sqlWhereString, Dialect.Dialect dialect ) { //TODO: make this a bit nicer. ! StringTokenizer tokens = new StringTokenizer( sqlWhereString, delimiters, true ); ! StringBuilder result = new StringBuilder( sqlWhereString.Length + 10 ); bool quoted = false; --- 88,103 ---- /// Takes the where condition provided in the mapping attribute and iterpolates the alias. /// </summary> ! /// <param name="whereSql">The "where" sql statement from the mapping attribute.</param> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with rendering the Sql.</param> ! /// <returns> ! /// A well formed "where" sql statement for the <see cref="Dialect.Dialect"/>. ! /// </returns> ! public static string RenderWhereStringTemplate( string whereSql, Dialect.Dialect dialect ) { //TODO: make this a bit nicer. ! StringTokenizer tokens = new StringTokenizer( whereSql, delimiters, true ); ! StringBuilder result = new StringBuilder( whereSql.Length + 10 ); bool quoted = false; *************** *** 165,178 **** /// <summary> ! /// Takes order-by clause in the mapping attribute and iterpolates the alias /// </summary> ! /// <param name="sqlOrderByString"></param> ! /// <param name="dialect"></param> ! /// <returns></returns> ! public static string RenderOrderByStringTemplate( string sqlOrderByString, Dialect.Dialect dialect ) { //TODO: make this a bit nicer ! StringTokenizer tokens = new StringTokenizer( sqlOrderByString, ",", false ); ! StringBuilder result = new StringBuilder( sqlOrderByString.Length + 2 ); bool commaNeeded = false; IEnumerator tokenEnum = tokens.GetEnumerator(); --- 167,182 ---- /// <summary> ! /// Takes "order by" clause in the mapping attribute and iterpolates the alias /// </summary> ! /// <param name="orderBySql">The "order by" sql statement from the mapping.</param> ! /// <param name="dialect">The <see cref="Dialect.Dialect"/> to help with rendering the Sql.</param> ! /// <returns> ! /// A well formed "order by" sql statement for the <see cref="Dialect.Dialect"/>. ! /// </returns> ! public static string RenderOrderByStringTemplate( string orderBySql, Dialect.Dialect dialect ) { //TODO: make this a bit nicer ! StringTokenizer tokens = new StringTokenizer( orderBySql, ",", false ); ! StringBuilder result = new StringBuilder( orderBySql.Length + 2 ); bool commaNeeded = false; IEnumerator tokenEnum = tokens.GetEnumerator(); |