Skip to content

Commit

Permalink
AccessDataProvider is complete. Many small bug fixed. All 504 unit te…
Browse files Browse the repository at this point in the history
…sts now reliably pass
  • Loading branch information
6pac committed Jan 25, 2012
1 parent bd13e71 commit 59a7077
Show file tree
Hide file tree
Showing 95 changed files with 18,578 additions and 44,461 deletions.
Binary file removed Dependencies/Gallio_old.dll
Binary file not shown.
44,326 changes: 0 additions & 44,326 deletions Dependencies/Gallio_old.xml

This file was deleted.

7 changes: 6 additions & 1 deletion SubSonic.Tests/App.config
Expand Up @@ -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 modified SubSonic.Tests/DBScripts/Northwind.mdb
Binary file not shown.
214 changes: 214 additions & 0 deletions SubSonic.Tests/Generated/AllStructs.cs
Expand Up @@ -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
Expand All @@ -1019,5 +1231,7 @@ public partial struct Databases

public static readonly string SouthwindRepository = @"SouthwindRepository";

public static readonly string NorthwindAccess = @"NorthwindAccess";

}
#endregion
2 changes: 1 addition & 1 deletion SubSonic.Tests/Generated/Northwind/Enums.cs
Expand Up @@ -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,
Expand Down

0 comments on commit 59a7077

Please sign in to comment.