Skip to content

Commit

Permalink
Updates for GA release (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
okramarenko authored Apr 18, 2024
1 parent 533055a commit 15387da
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 44 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# SingleStore.EntityFrameworkCore

`SingleStore.EntityFrameworkCore` is the Entity Framework Core provider for SingleStore. It supports EF Core up to its latest version and uses [SingleStoreConnector](https://github.com/memsql/SingleStoreNETConnector) for high-performance database server communication.
`SingleStore.EntityFrameworkCore` is the Entity Framework Core provider for SingleStore. It uses [SingleStoreConnector](https://github.com/memsql/SingleStoreNETConnector) for high-performance database server communication.

## Schedule and Roadmap

Milestone | Status | Release Date
----------|--------|-------------
6.0.2-beta| in progress | February 2023
Milestone | Status | Release Date
----------|----------------------|-------------
6.0.2| general availability | April 2024
## Getting Started

### 1. Project Configuration

Ensure that your `.csproj` file contains the following reference:

```xml
<PackageReference Include="EntityFrameworkCore.SingleStore" Version="6.0.2-beta" />
<PackageReference Include="EntityFrameworkCore.SingleStore" Version="6.0.2" />
```

### 2. Services Configuration
Expand Down
2 changes: 1 addition & 1 deletion Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- "servicing" - EF Core release independent, code quality production ready, mainly bugfixes
-->
<VersionPrefix>6.0.2</VersionPrefix>
<PreReleaseVersionLabel>beta</PreReleaseVersionLabel>
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>

<!--
The following properties will automatically be set by CI builds when appropriate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ public override void Can_insert_and_read_back_with_string_key()
{
base.Can_insert_and_read_back_with_string_key();
}

[ConditionalFact(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override void Optional_datetime_reading_null_from_database()
{
base.Optional_datetime_reading_null_from_database();
}

public override void Can_perform_query_with_ansi_strings_test()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public override void Value_conversion_on_enum_collection_contains()
Assert.Throws<InvalidOperationException>(() => base.Value_conversion_on_enum_collection_contains()).Message);
}

[ConditionalFact(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override void Optional_datetime_reading_null_from_database()
{
base.Optional_datetime_reading_null_from_database();
}

// TODO: Needed to customize:
// `private bool Equal(DateTimeOffset left, DateTimeOffset right)` Recheck/remove once fixed upstream.
// Recheck/remove after `https://github.com/dotnet/efcore/issues/26068` has been fixed upstream.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public override Task Contains_with_subquery_optional_navigation_and_constant_ite
return base.Contains_with_subquery_optional_navigation_and_constant_item(async);
}

[SupportedServerVersionCondition("8.1.0-singlestore", Skip = "The issue failing this test is fixed in 8.1")]
[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task SelectMany_subquery_with_custom_projection(bool async)
{
return base.SelectMany_subquery_with_custom_projection(async);
}

[SupportedServerVersionCondition("8.1.0-singlestore", Skip = "The issue failing this test is fixed in 8.1")]
[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task Sum_with_filter_with_include_selector_cast_using_as(bool async)
{
return base.Sum_with_filter_with_include_selector_cast_using_as(async);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ public override Task Where_navigation_property_to_collection_of_original_entity_
return base.Where_navigation_property_to_collection_of_original_entity_type(async);
}

[SupportedServerVersionCondition("8.1.0-singlestore", Skip = "The issue failing this test is fixed in 8.1")]
[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task SelectMany_subquery_with_custom_projection(bool async)
{
return base.SelectMany_subquery_with_custom_projection(async);
}

[SupportedServerVersionCondition("8.1.0-singlestore", Skip = "The issue failing this test is fixed in 8.1")]
[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task Sum_with_filter_with_include_selector_cast_using_as(bool async)
{
return base.Sum_with_filter_with_include_selector_cast_using_as(async);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,22 @@ public override Task Include_collection_with_multiple_conditional_order_by(bool
entryCount: 14);
}

[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task Include_collection_SelectMany_GroupBy_Select(bool async)
{
// The original EF Core query depends on a specific implicit order of the Order.OrderDetails collection.
// This order is not returned for some database server implementations (which is not a bug of the DBMS, but an inaccuracy of the
// EF Core LINQ query definition).
// Because it is tricky to manipulate the order of the Order.OrderDetails collection for this query, we just filter it to the
// entities in question.
return AssertQuery(
async,
ss => (from o in ss.Set<Order>().Include(o => o.OrderDetails).Where(o => o.OrderID == 10248)
from od in ss.Set<OrderDetail>()
.Where(od => od.OrderID == o.OrderID) // <-- explicit filtering needed for some MariaDB versions, because we cannot manually influence the order of the Order.OrderDetails property
select o)
.GroupBy(e => e.OrderID)
.Select(e => e.OrderBy(o => o.OrderID).FirstOrDefault()),
entryCount: 4);
return base.Include_collection_SelectMany_GroupBy_Select(async);
}

[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task Join_Include_collection_GroupBy_Select(bool async)
{
return base.Join_Include_collection_GroupBy_Select(async);
}

[ConditionalTheory(Skip = "Further investigation is needed to determine why it is failing with SingleStore")]
public override Task Include_collection_Join_GroupBy_Select(bool async)
{
// The original EF Core query depends on a specific implicit order of the Order.OrderDetails collection.
// This order is not returned for some database server implementations (which is not a bug of the DBMS, but an inaccuracy of the
// EF Core LINQ query definition).
// Because it is tricky to manipulate the order of the Order.OrderDetails collection for this query, we just filter it to the
// entities in question.
return AssertQuery(
async,
ss => ss.Set<Order>()
.Where(o => o.OrderID == 10248)
.Include(o => o.OrderDetails)
.Join(
ss.Set<OrderDetail>().Where(od => od.OrderID == 10248), // <-- explicit filtering needed for some MariaDB versions, because we cannot manually influence the order of the Order.OrderDetails property
o => o.OrderID,
od => od.OrderID,
(o, od) => o)
.GroupBy(e => e.OrderID)
.Select(e => e.OrderBy(o => o.OrderID).FirstOrDefault()),
entryCount: 4);
return base.Include_collection_Join_GroupBy_Select(async);
}

public override Task SelectMany_Include_collection_GroupBy_Select(bool async)
Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.SingleStore.FunctionalTests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Functional Tests

**Configuring the Database**

Configure your MySQL database by opening the `config.json.example` file, specifying the connection string and saving the changed file as `config.json`.
Configure your SingleStore database by opening the `config.json.example` file, specifying the connection string and saving the changed file as `config.json`.

**Running Functional Tests**

Expand Down
2 changes: 1 addition & 1 deletion test/EFCore.SingleStore.IntegrationTests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Integration and Performance Tests

**Configuring the Database**

1. Configure your MySQL database by opening the `config.json.example` file, specifying the connection string and saving the changed file as `config.json`.
1. Configure your SingleStore database by opening the `config.json.example` file, specifying the connection string and saving the changed file as `config.json`.
2. Run the `scripts/rebuild.sh` script on Linux or the `scripts/rebuild.ps1` script on Windows to rebuild all migrations. Any time you make changes to database models, run the rebuild script again.

**Running Integration Tests**
Expand Down

0 comments on commit 15387da

Please sign in to comment.