Update of /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15765/src/Adapdev.Data/Sql
Modified Files:
IInsertQuery.cs IUpdateQuery.cs InsertQuery.cs UpdateQuery.cs
Log Message:
Index: InsertQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/InsertQuery.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** InsertQuery.cs 30 Dec 2005 20:42:11 -0000 1.6
--- InsertQuery.cs 12 Jan 2006 05:42:34 -0000 1.7
***************
*** 1,2 ****
--- 1,4 ----
+ using System;
+
namespace Adapdev.Data.Sql
{
***************
*** 42,45 ****
--- 44,54 ----
}
+ public void AddNull(string columnName)
+ {
+ cnames[cindex] = columnName;
+ cvalues[cindex] = "NULL";
+ cindex++;
+ }
+
public void Add(string columnName, object columnValue)
{
Index: IInsertQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/IInsertQuery.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IInsertQuery.cs 16 Nov 2005 07:01:48 -0000 1.5
--- IInsertQuery.cs 12 Jan 2006 05:42:34 -0000 1.6
***************
*** 14,21 ****
void Add(string columnName);
/// <summary>
! /// Adds the column name and value to the insert query
/// </summary>
! /// <param name="columnName"></param>
! /// <param name="columnValue"></param>
void Add(string columnName, object columnValue);
}
--- 14,21 ----
void Add(string columnName);
/// <summary>
! /// Adds the specified column with a NULL value
/// </summary>
! /// <param name="columnName">The name of the column</param>
! void AddNull(string columnName);
void Add(string columnName, object columnValue);
}
Index: UpdateQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/UpdateQuery.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** UpdateQuery.cs 30 Dec 2005 20:42:11 -0000 1.6
--- UpdateQuery.cs 12 Jan 2006 05:42:34 -0000 1.7
***************
*** 36,39 ****
--- 36,44 ----
}
+ public void AddNull(string columnName)
+ {
+ sb.Append(" " + QueryHelper.GetPreDelimeter(this.type) + columnName + QueryHelper.GetPostDelimeter(this.type) + " = NULL,");
+ }
+
public void Add(string columnName, object columnValue)
{
Index: IUpdateQuery.cs
===================================================================
RCS file: /cvsroot/adapdev/Adapdev/src/Adapdev.Data/Sql/IUpdateQuery.cs,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** IUpdateQuery.cs 16 Nov 2005 07:01:48 -0000 1.5
--- IUpdateQuery.cs 12 Jan 2006 05:42:34 -0000 1.6
***************
*** 14,17 ****
--- 14,22 ----
void Add(string columnName);
/// <summary>
+ /// Adds the specified column with a NULL value
+ /// </summary>
+ /// <param name="columnName">The name of the column</param>
+ void AddNull(string columnName);
+ /// <summary>
/// Adds the column name and value to the update query
/// </summary>
|