Use a different string for the ReallyLargeString. When using the new line the string concatenation of chr(10) & chr(13) etc became too complex for Jet

pull/204/head
Christopher Jolly 2 years ago
parent dcca36386c
commit 165c195180

@ -133,7 +133,7 @@ namespace EntityFrameworkCore.Jet.FunctionalTests
context =>
{
var owner1 = new Owner { Id = "0", Name = "Zero" };
var owner2 = new Owner { Id = "A", Name = string.Join("", Enumerable.Repeat('A', 900)) };
var owner2 = new Owner { Id = "A", Name = string.Join("", Enumerable.Repeat('A', 255)) };
context.Owners.Add(owner1);
context.Owners.Add(owner2);

@ -3118,14 +3118,7 @@ UnicodeDataTypes.StringUnicode ---> [nullable varchar] [MaxLength = 255]
public override int LongStringLength => 255;
public override string ReallyLargeString
{
get
{
//Jet max is 255
var res = string.Join("", Enumerable.Repeat("testphrase", 25));
return res;
}
}
=> string.Join("", Enumerable.Repeat("testphrase", 25));
}
[Flags]

@ -93,16 +93,16 @@ SET `b`.`CreationTimestamp` = #2020-01-01#
}
//see efcore 31407 for the same problem on SQL Server
public override async Task Update_non_main_table_in_entity_with_entity_splitting(bool async)
public override Task Update_non_main_table_in_entity_with_entity_splitting(bool async)
{
await base.Update_non_main_table_in_entity_with_entity_splitting(async);
AssertSql(
return Assert.ThrowsAnyAsync<Exception>(
() => base.Update_non_main_table_in_entity_with_entity_splitting(async));
/*AssertSql(
"""
UPDATE `BlogsPart1` AS `b0`
SET `b0`.`Rating` = IIF(LEN(`b0`.`Title`) IS NULL, NULL, CLNG(LEN(`b0`.`Title`))),
`b0`.`Title` = (`b0`.`Rating` & '')
""");
""");*/
}
public override async Task Delete_entity_with_auto_include(bool async)

@ -1,6 +1,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using EntityFrameworkCore.Jet.FunctionalTests.TestUtilities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
@ -183,6 +184,9 @@ UnicodeDataTypes.StringUnicode ---> `nullable nvarchar` [MaxLength = -1]
public override DateTime DefaultDateTime => new DateTime();
public override bool PreservesDateTimeKind { get; }
public override string ReallyLargeString
=> string.Join("", Enumerable.Repeat("testphrase", 25));
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
=> base
.AddOptions(builder)

@ -1,6 +1,7 @@
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using EntityFrameworkCore.Jet.FunctionalTests.TestUtilities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
@ -211,6 +212,9 @@ User.Id ---> `uniqueidentifier`
public override DateTime DefaultDateTime => new DateTime();
public override bool PreservesDateTimeKind { get; }
public override string ReallyLargeString
=> string.Join("", Enumerable.Repeat("testphrase", 25));
public override DbContextOptionsBuilder AddOptions(DbContextOptionsBuilder builder)
=> base
.AddOptions(builder)

@ -226,14 +226,7 @@ UnicodeDataTypes.StringUnicode ---> [nullable varbinary] [MaxLength = 510]
public override bool PreservesDateTimeKind { get; }
public override string ReallyLargeString
{
get
{
//Jet max is 255
var res = string.Join("", Enumerable.Repeat("testphrase", 25));
return res;
}
}
=> string.Join("", Enumerable.Repeat("testphrase", 25));
public override int LongStringLength => 255;

@ -216,14 +216,7 @@ UnicodeDataTypes.StringUnicode ---> [nullable varchar] [MaxLength = 255]
public override bool PreservesDateTimeKind { get; }
public override string ReallyLargeString
{
get
{
//Jet max is 255
var res = string.Join("", Enumerable.Repeat("testphrase", 25));
return res;
}
}
=> string.Join("", Enumerable.Repeat("testphrase", 25));
public override int LongStringLength => 255;

@ -484,7 +484,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex") // Don't change to HasDatabaseName
.HasFilter("`NormalizedName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetRoles");
});
@ -557,7 +557,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("`NormalizedUserName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetUsers");
});
@ -725,7 +725,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("`NormalizedName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetRoles");
});
@ -798,7 +798,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("`NormalizedUserName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetUsers");
});
@ -969,7 +969,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedName")
.IsUnique()
.HasName("RoleNameIndex")
.HasFilter("`NormalizedName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetRoles");
});
@ -1060,7 +1060,7 @@ COMMIT TRANSACTION;
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex")
.HasFilter("`NormalizedUserName` IS NOT NULL");
.HasFilter("IGNORE NULL");
b.ToTable("AspNetUsers");
});

@ -698,7 +698,6 @@ FROM `Customers` AS `c`");
FROM `Customers` AS `c`");
}
[ConditionalTheory(Skip = "`SELECT (SELECT TOP 1) FROM` is not supported by Jet.")]
public override async Task Project_single_element_from_collection_with_OrderBy_Distinct_and_FirstOrDefault(bool isAsync)
{
await base.Project_single_element_from_collection_with_OrderBy_Distinct_and_FirstOrDefault(isAsync);
@ -2351,7 +2350,7 @@ WHERE `c`.`CustomerID` = 'ALFKI'
SELECT 1
FROM `Customers` AS `c`
""",
//
//
"""
SELECT 1
FROM `Customers` AS `c`

Loading…
Cancel
Save