Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27500/src/Adapdev.Data/Sql
Modified Files:
ISelectQuery.cs QueryHelper.cs SelectQuery.cs
Log Message:
Several bug fixes for AbstractDAO
Added unit tests for NUnit support
Index: SelectQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/SelectQuery.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SelectQuery.cs 21 Jul 2005 23:29:21 -0000 1.3
--- SelectQuery.cs 21 Oct 2005 04:59:20 -0000 1.4
***************
*** 103,106 ****
--- 103,119 ----
}
+ public void AddOrderBy(string tableName, string columnName)
+ {
+ order.Enqueue(QueryHelper.GetPreDelimeter(this.type) + tableName + QueryHelper.GetPostDelimeter(this.type) + "." + QueryHelper.GetPreDelimeter(this.type) + columnName + QueryHelper.GetPostDelimeter(this.type));
+ }
+
+ public void AddOrderBy(string tableName, params string[] columns)
+ {
+ foreach (string s in columns)
+ {
+ this.AddOrderBy(tableName, s);
+ }
+ }
+
public void AddOrderBy(params string[] columns)
{
Index: QueryHelper.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/QueryHelper.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** QueryHelper.cs 25 Jul 2005 02:22:15 -0000 1.5
--- QueryHelper.cs 21 Oct 2005 04:59:20 -0000 1.6
***************
*** 161,164 ****
--- 161,169 ----
}
+ public static string GetSqlServerLastInsertedScopeCommand()
+ {
+ return "SELECT SCOPE_IDENTITY();";
+ }
+
public static string GetAccessLastInsertedCommand(string table, string column)
{
Index: ISelectQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/ISelectQuery.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ISelectQuery.cs 25 May 2005 05:17:47 -0000 1.2
--- ISelectQuery.cs 21 Oct 2005 04:59:20 -0000 1.3
***************
*** 50,53 ****
--- 50,59 ----
void AddOrderBy(string columnName);
/// <summary>
+ /// Adds a ORDER BY [table].[column] statement in the datastore specific format
+ /// </summary>
+ /// <param name="tableName"></param>
+ /// <param name="columnName"></param>
+ void AddOrderBy(string tableName, string columnName);
+ /// <summary>
/// Adds a ORDER BY [column1], [column2]... statement in the datastore specific format
/// </summary>
|