Permalink
Browse files

AccessDataProvider is complete. Many small bug fixed. All 504 unit te…

…sts now reliably pass
  • Loading branch information...
1 parent bd13e71 commit 59a707710ae69e4814b3fc0233bd366310bf8493 @6pac 6pac committed Jan 25, 2012
Showing with 18,578 additions and 44,461 deletions.
  1. BIN Dependencies/Gallio_old.dll
  2. +0 −44,326 Dependencies/Gallio_old.xml
  3. +6 −1 SubSonic.Tests/App.config
  4. BIN SubSonic.Tests/DBScripts/Northwind.mdb
  5. +214 −0 SubSonic.Tests/Generated/AllStructs.cs
  6. +1 −1 SubSonic.Tests/Generated/Northwind/Enums.cs
  7. +663 −0 SubSonic.Tests/Generated/NorthwindAccess/AlphabeticalListOfProduct.cs
  8. +436 −0 SubSonic.Tests/Generated/NorthwindAccess/Category.cs
  9. +118 −0 SubSonic.Tests/Generated/NorthwindAccess/CategoryController.cs
  10. +187 −0 SubSonic.Tests/Generated/NorthwindAccess/CategorySalesFor1997.cs
  11. +187 −0 SubSonic.Tests/Generated/NorthwindAccess/CurrentProductList.cs
  12. +669 −0 SubSonic.Tests/Generated/NorthwindAccess/Customer.cs
  13. +148 −0 SubSonic.Tests/Generated/NorthwindAccess/CustomerController.cs
  14. +297 −0 SubSonic.Tests/Generated/NorthwindAccess/CustomerCustomerDemo.cs
  15. +124 −0 SubSonic.Tests/Generated/NorthwindAccess/CustomerCustomerDemoController.cs
  16. +368 −0 SubSonic.Tests/Generated/NorthwindAccess/CustomerDemographic.cs
  17. +112 −0 SubSonic.Tests/Generated/NorthwindAccess/CustomerDemographicController.cs
  18. +932 −0 SubSonic.Tests/Generated/NorthwindAccess/Employee.cs
  19. +178 −0 SubSonic.Tests/Generated/NorthwindAccess/EmployeeController.cs
  20. +297 −0 SubSonic.Tests/Generated/NorthwindAccess/EmployeeTerritory.cs
  21. +124 −0 SubSonic.Tests/Generated/NorthwindAccess/EmployeeTerritoryController.cs
  22. +222 −0 SubSonic.Tests/Generated/NorthwindAccess/Enums.cs
  23. +859 −0 SubSonic.Tests/Generated/NorthwindAccess/Invoice.cs
  24. +801 −0 SubSonic.Tests/Generated/NorthwindAccess/Order.cs
  25. +158 −0 SubSonic.Tests/Generated/NorthwindAccess/OrderController.cs
  26. +399 −0 SubSonic.Tests/Generated/NorthwindAccess/OrderDetail.cs
  27. +136 −0 SubSonic.Tests/Generated/NorthwindAccess/OrderDetailController.cs
  28. +327 −0 SubSonic.Tests/Generated/NorthwindAccess/OrderDetailsExtended.cs
  29. +187 −0 SubSonic.Tests/Generated/NorthwindAccess/OrderSubtotal.cs
  30. +691 −0 SubSonic.Tests/Generated/NorthwindAccess/OrdersQry.cs
  31. +1,004 −0 SubSonic.Tests/Generated/NorthwindAccess/Product.cs
  32. +297 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductCategoryMap.cs
  33. +124 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductCategoryMapController.cs
  34. +174 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductController.cs
  35. +243 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductSalesFor1997.cs
  36. +187 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductsAboveAveragePrice.cs
  37. +271 −0 SubSonic.Tests/Generated/NorthwindAccess/ProductsByCategory.cs
  38. +243 −0 SubSonic.Tests/Generated/NorthwindAccess/QuarterlyOrder.cs
  39. +293 −0 SubSonic.Tests/Generated/NorthwindAccess/Region.cs
  40. +110 −0 SubSonic.Tests/Generated/NorthwindAccess/RegionController.cs
  41. +243 −0 SubSonic.Tests/Generated/NorthwindAccess/SalesByCategory.cs
  42. +326 −0 SubSonic.Tests/Generated/NorthwindAccess/Shipper.cs
  43. +114 −0 SubSonic.Tests/Generated/NorthwindAccess/ShipperController.cs
  44. +146 −0 SubSonic.Tests/Generated/NorthwindAccess/StoredProcedures.cs
  45. +623 −0 SubSonic.Tests/Generated/NorthwindAccess/Supplier.cs
  46. +150 −0 SubSonic.Tests/Generated/NorthwindAccess/SupplierController.cs
  47. +187 −0 SubSonic.Tests/Generated/NorthwindAccess/TenMostExpensiveProduct.cs
  48. +415 −0 SubSonic.Tests/Generated/NorthwindAccess/Territory.cs
  49. +116 −0 SubSonic.Tests/Generated/NorthwindAccess/TerritoryController.cs
  50. +14 −0 SubSonic.Tests/Generated/NorthwindAccess/TextEntry.cs
  51. +14 −0 SubSonic.Tests/Generated/NorthwindAccess/TextEntryController.cs
  52. +253 −0 SubSonic.Tests/MsAccess/ActiveListTests.cs
  53. +280 −0 SubSonic.Tests/MsAccess/ActiveRecordTest.cs
  54. +40 −0 SubSonic.Tests/MsAccess/AssemblyCleaner.cs
  55. +136 −0 SubSonic.Tests/MsAccess/CodeGeneratorTests.cs
  56. +77 −0 SubSonic.Tests/MsAccess/DataServiceTest.cs
  57. +96 −0 SubSonic.Tests/MsAccess/ETL.cs
  58. +74 −0 SubSonic.Tests/MsAccess/ForeignKeyTests.cs
  59. +176 −0 SubSonic.Tests/MsAccess/GeneratedObjectTests.cs
  60. +77 −0 SubSonic.Tests/MsAccess/ManyToMany.cs
  61. +52 −0 SubSonic.Tests/MsAccess/MultiProvider.cs
  62. +49 −0 SubSonic.Tests/MsAccess/MySqlTests.cs
  63. +61 −0 SubSonic.Tests/MsAccess/NameTransformationTests.cs
  64. +937 −0 SubSonic.Tests/MsAccess/QueryTest.cs
  65. +186 −0 SubSonic.Tests/MsAccess/SPs.cs
  66. +63 −0 SubSonic.Tests/MsAccess/ScriptersTest.cs
  67. +211 −0 SubSonic.Tests/MsAccess/SqlQuery/AggregateTests.cs
  68. +94 −0 SubSonic.Tests/MsAccess/SqlQuery/DeleteTests.cs
  69. +50 −0 SubSonic.Tests/MsAccess/SqlQuery/InlineQueryTests.cs
  70. +59 −0 SubSonic.Tests/MsAccess/SqlQuery/InsertTests.cs
  71. +31 −0 SubSonic.Tests/MsAccess/SqlQuery/ParserTestUtility.cs
  72. +897 −0 SubSonic.Tests/MsAccess/SqlQuery/SelectTests.cs
  73. +41 −0 SubSonic.Tests/MsAccess/SqlQuery/TransactionTests.cs
  74. +89 −0 SubSonic.Tests/MsAccess/SqlQuery/UpdateTests.cs
  75. +25 −25 SubSonic.Tests/QueryTest.cs
  76. +69 −0 SubSonic.Tests/SubSonic.Tests.csproj
  77. +1 −0 SubSonic/ActiveRecord/ActiveRecord.cs
  78. +1 −1 SubSonic/ActiveRecord/ReadOnlyRecord.cs
  79. +3 −1 SubSonic/ActiveRecord/RecordBase.cs
  80. +2 −2 SubSonic/CodeGeneration/Templates/CS_SPTemplate.aspx
  81. +2 −2 SubSonic/CodeGeneration/Templates/VB_SPTemplate.aspx
  82. +4 −11 SubSonic/Constants.cs
  83. +89 −62 SubSonic/DataProviders/AccessDataProvider.cs
  84. +1 −1 SubSonic/DataProviders/DataProvider.cs
  85. +3 −0 SubSonic/DataProviders/DataService.cs
  86. +1 −1 SubSonic/DataProviders/SqlDataProvider.cs
  87. +7 −4 SubSonic/Sql Tools/Query.cs
  88. +1 −1 SubSonic/Sql Tools/TableSchema.cs
  89. +10 −3 SubSonic/SqlQuery/InlineQuery.cs
  90. +1 −1 SubSonic/SqlQuery/Insert.cs
  91. +13 −12 SubSonic/SqlQuery/SqlGenerators/ANSISqlGenerator.cs
  92. +155 −0 SubSonic/SqlQuery/SqlGenerators/MSJetGenerator.cs
  93. +10 −4 SubSonic/SqlQuery/SqlQuery.cs
  94. +1 −0 SubSonic/SubSonic.csproj
  95. +15 −2 SubSonic/Utility.cs
View
Binary file not shown.
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -8,15 +8,20 @@
<connectionStrings>
<add name="Northwind" connectionString="Data Source=.\SQLExpress; Database=northwind; Integrated Security=true;"/>
<add name="Southwind" connectionString="Data Source=localhost; Database=Northwind; user id=root; password=;"/>
+ <add name="NorthwindAccess" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DBScripts\Northwind.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
<dataConfiguration defaultDatabase="NorthwindConnection"/>
<SubSonicService defaultProvider="Northwind" >
<providers>
<clear/>
+ <add name="Northwind" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="Northwind" generatedNamespace="Northwind"
+ enumIncludeList="^Categories$, ^Employees$, ^Products$, ^Region$, ^Shippers$, ^Suppliers$, ^Territories$" />
<add name="Southwind" type="SubSonic.MySqlDataProvider, SubSonic" connectionStringName="Southwind" generatedNamespace="Southwind" />
- <add name="Northwind" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="Northwind" generatedNamespace="Northwind" />
<add name="NorthwindRepository" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="Northwind" generatedNamespace="NorthwindRepository" tableBaseClass="RepositoryRecord"/>
<add name="SouthwindRepository" type="SubSonic.MySqlDataProvider, SubSonic" connectionStringName="Southwind" generatedNamespace="SouthwindRepository" tableBaseClass="RepositoryRecord"/>
+
+ <add name="NorthwindAccess" type="SubSonic.AccessDataProvider, SubSonic" connectionStringName="NorthwindAccess" generatedNamespace="NorthwindAccess"
+ enumIncludeList="^Categories$, ^Employees$, ^Products$, ^Region$, ^Shippers$, ^Suppliers$, ^Territories$" />
</providers>
</SubSonicService>
</configuration>
Binary file not shown.
@@ -1006,6 +1006,218 @@ public static int Insert<T>(RepositoryRecord<T> item, string userName) where T :
}
#endregion
+}
+// <auto-generated />
+namespace NorthwindAccess
+{
+ #region Tables Struct
+ public partial struct Tables
+ {
+
+ public static readonly string Category = @"Categories";
+
+ public static readonly string CustomerCustomerDemo = @"CustomerCustomerDemo";
+
+ public static readonly string CustomerDemographic = @"CustomerDemographics";
+
+ public static readonly string Customer = @"Customers";
+
+ public static readonly string Employee = @"Employees";
+
+ public static readonly string EmployeeTerritory = @"EmployeeTerritories";
+
+ public static readonly string OrderDetail = @"Order Details";
+
+ public static readonly string Order = @"Orders";
+
+ public static readonly string ProductCategoryMap = @"Product_Category_Map";
+
+ public static readonly string Product = @"Products";
+
+ public static readonly string Region = @"Region";
+
+ public static readonly string Shipper = @"Shippers";
+
+ public static readonly string Supplier = @"Suppliers";
+
+ public static readonly string Territory = @"Territories";
+
+ public static readonly string TextEntry = @"TextEntry";
+
+ }
+ #endregion
+ #region Schemas
+ public partial class Schemas {
+
+ public static TableSchema.Table Category
+ {
+ get { return DataService.GetSchema("Categories", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table CustomerCustomerDemo
+ {
+ get { return DataService.GetSchema("CustomerCustomerDemo", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table CustomerDemographic
+ {
+ get { return DataService.GetSchema("CustomerDemographics", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Customer
+ {
+ get { return DataService.GetSchema("Customers", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Employee
+ {
+ get { return DataService.GetSchema("Employees", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table EmployeeTerritory
+ {
+ get { return DataService.GetSchema("EmployeeTerritories", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table OrderDetail
+ {
+ get { return DataService.GetSchema("Order Details", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Order
+ {
+ get { return DataService.GetSchema("Orders", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table ProductCategoryMap
+ {
+ get { return DataService.GetSchema("Product_Category_Map", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Product
+ {
+ get { return DataService.GetSchema("Products", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Region
+ {
+ get { return DataService.GetSchema("Region", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Shipper
+ {
+ get { return DataService.GetSchema("Shippers", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Supplier
+ {
+ get { return DataService.GetSchema("Suppliers", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table Territory
+ {
+ get { return DataService.GetSchema("Territories", "NorthwindAccess"); }
+ }
+
+ public static TableSchema.Table TextEntry
+ {
+ get { return DataService.GetSchema("TextEntry", "NorthwindAccess"); }
+ }
+
+
+ }
+ #endregion
+ #region View Struct
+ public partial struct Views
+ {
+
+ public static readonly string AlphabeticalListOfProduct = @"Alphabetical List of Products";
+
+ public static readonly string CategorySalesFor1997 = @"Category Sales for 1997";
+
+ public static readonly string CurrentProductList = @"Current Product List";
+
+ public static readonly string Invoice = @"Invoices";
+
+ public static readonly string OrderDetailsExtended = @"Order Details Extended";
+
+ public static readonly string OrderSubtotal = @"Order Subtotals";
+
+ public static readonly string OrdersQry = @"Orders Qry";
+
+ public static readonly string ProductSalesFor1997 = @"Product Sales for 1997";
+
+ public static readonly string ProductsAboveAveragePrice = @"Products Above Average Price";
+
+ public static readonly string ProductsByCategory = @"Products by Category";
+
+ public static readonly string QuarterlyOrder = @"Quarterly Orders";
+
+ public static readonly string SalesByCategory = @"Sales by Category";
+
+ public static readonly string TenMostExpensiveProduct = @"Ten Most Expensive Products";
+
+ }
+ #endregion
+
+ #region Query Factories
+ public static partial class DB
+ {
+ public static DataProvider _provider = DataService.Providers["NorthwindAccess"];
+ static ISubSonicRepository _repository;
+ public static ISubSonicRepository Repository
+ {
+ get
+ {
+ if (_repository == null)
+ return new SubSonicRepository(_provider);
+ return _repository;
+ }
+ set { _repository = value; }
+ }
+ public static Select SelectAllColumnsFrom<T>() where T : RecordBase<T>, new()
+ {
+ return Repository.SelectAllColumnsFrom<T>();
+ }
+ public static Select Select()
+ {
+ return Repository.Select();
+ }
+
+ public static Select Select(params string[] columns)
+ {
+ return Repository.Select(columns);
+ }
+
+ public static Select Select(params Aggregate[] aggregates)
+ {
+ return Repository.Select(aggregates);
+ }
+
+ public static Update Update<T>() where T : RecordBase<T>, new()
+ {
+ return Repository.Update<T>();
+ }
+
+ public static Insert Insert()
+ {
+ return Repository.Insert();
+ }
+
+ public static Delete Delete()
+ {
+ return Repository.Delete();
+ }
+
+ public static InlineQuery Query()
+ {
+ return Repository.Query();
+ }
+
+
+ }
+ #endregion
+
}
#region Databases
public partial struct Databases
@@ -1019,5 +1231,7 @@ public partial struct Databases
public static readonly string SouthwindRepository = @"SouthwindRepository";
+ public static readonly string NorthwindAccess = @"NorthwindAccess";
+
}
#endregion
@@ -57,7 +57,7 @@ public enum ProductEnum {
Alice_Mutton = 17,
Carnarvon_Tigers = 18,
Teatime_Chocolate_Biscuits = 19,
- new_name_of_product_20_4210 = 20,
+ new_name_of_product_20_9798 = 20,
Sir_Rodney_s_Scones = 21,
Gustaf_s_Knäckebröd = 22,
Tunnbröd = 23,
Oops, something went wrong.

0 comments on commit 59a7077

Please sign in to comment.