Skip to content

Commit

Permalink
More tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Dec 12, 2024
1 parent 1319ef9 commit e1566aa
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ public override Task Null_check_removal_in_ternary_maintain_appropriate_cast(boo
return base.Null_check_removal_in_ternary_maintain_appropriate_cast(async);
}

[NotSupportedOnFirebirdFact]
public override Task Operators_combine_nullability_of_entity_shapers()
{
return base.Operators_combine_nullability_of_entity_shapers();
}

protected override async Task Seed2951(Context2951 context)
{
await context.Database.ExecuteSqlRawAsync("""CREATE TABLE "ZeroKey" ("Id" INT)""");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,27 @@ public override Task Nested_SelectMany_correlated_with_join_table_correctly_tran
return base.Nested_SelectMany_correlated_with_join_table_correctly_translated_to_apply(async);
}

[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Correlated_projection_with_first(bool async)
{
return base.Correlated_projection_with_first(async);
}

[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Multiple_select_many_in_projection(bool async)
{
return base.Multiple_select_many_in_projection(async);
}

[NotSupportedOnFirebirdTheory]
[MemberData(nameof(IsAsyncData))]
public override Task Single_select_many_in_projection_with_take(bool async)
{
return base.Single_select_many_in_projection_with_take(async);
}

[Theory]
[MemberData(nameof(IsAsyncData))]
public override Task GroupJoin_client_method_in_OrderBy(bool async)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;

namespace FirebirdSql.EntityFrameworkCore.Firebird.Storage.Internal;
Expand Down Expand Up @@ -163,4 +164,21 @@ IRelationalCommand CreateAlterCollationCommand(string collation)
BEGIN
execute statement 'alter character set ' || (select coalesce(trim(rdb$character_set_name), 'NONE') from rdb$database) || ' set default collation {collation}';
END");

public override void CreateTables()
{
// we need to execute commands separately to avoid issues with inserts and transactions after creating a table
foreach (var command in GetCreateTablesCommands())
{
Dependencies.MigrationCommandExecutor.ExecuteNonQuery([command], Dependencies.Connection, new MigrationExecutionState(), commitTransaction: true);
}
}
public override async Task CreateTablesAsync(CancellationToken cancellationToken = default)
{
// we need to execute commands separately to avoid issues with inserts and transactions after creating a table
foreach (var command in GetCreateTablesCommands())
{
await Dependencies.MigrationCommandExecutor.ExecuteNonQueryAsync([command], Dependencies.Connection, new MigrationExecutionState(), commitTransaction: true, cancellationToken: cancellationToken);
}
}
}

0 comments on commit e1566aa

Please sign in to comment.