

| Directory | Changes | Lines of Code | Lines per Change |
|---|---|---|---|
| Totals | 12 (100.0%) | 235 (100.0%) | 19.5 |
| SubSonic/Sql Tools/ | 5 (41.7%) | 192 (81.7%) | 38.4 |
| SubSonic.Tests/ | 2 (16.7%) | 29 (12.3%) | 14.5 |
| SubSonic/ActiveRecord/ | 1 (8.3%) | 7 (3.0%) | 7.0 |
| SubSonic/DataProviders/ | 1 (8.3%) | 3 (1.3%) | 3.0 |
| SubSonic/ | 2 (16.7%) | 3 (1.3%) | 1.5 |
| SubSonic/CodeGeneration/Templates/ | 1 (8.3%) | 1 (0.4%) | 1.0 |

IMPROVED: Now it is possible to get the @RETURN_VALUE from a stored procedure.
Sample Usage:
StoredProcedure proc = StoredProcedures.ProcName();
proc.Command.AddReturnParameter();
proc.Execute();
int returnValue = (int)proc.OutputParameters[proc.OutputParameters.Count - 1];
NOTE: For now, you have to explicitly add a return parameter to the command until we know whether all the major databases support this concept. We don't want to automatically add that return value if it is SQL Server specific.
(Also added a unit test for this and cleaned up a bit of related code)
43 lines of code changed in 4 files:
Changed the StoredProcedure.Execute() method to return an int - the number of rows affected based on whatever the underlying provider returns.
7 lines of code changed in 1 file:
Updated the unit test to demonstrate the strongly typed access to table names and columns.
1 lines of code changed in 1 file:
Implemented a preliminary version of the Constraint based syntax for building queries based on the work done in NUnit: http://nunit.com/index.php?p=constraintModel&r=2.4
Here's an example of the new syntax in action:
new Query("Products").WHERE("ProductID", Is.LessThan(5)).ExecuteReader();
The point of this is it is a bit more readable than:
new Query("Products").WHERE("ProductID", Comparison.LessThan, 5).ExecuteReader();
and provides us more type safety and intellisense thaN:
new Query("Products").WHERE("ProductID < 5").ExecuteReader();
Especially given that "5" is probably going to be a parameter. We don't have to resort to string concatenation.
I'd like to add the following, but I need a deeper understanding of the current system of building queries before I do so:
new Query("Products").WHERE("ProductID", Is.In(5,6,7,8,9)).ExecuteReader();
184 lines of code changed in 6 files: