Skip to content

Commit

Permalink
Update names
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJollyAU committed Aug 26, 2024
1 parent 121dcc4 commit 1ddc4ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Npgsql.EntityFrameworkCore.PostgreSQL.ValueGeneration.Internal;
/// Generates sequential <see cref="Guid" /> values according to the UUID version 7 specification.
/// Will be updated to use Guid.CreateVersion7 when available.
/// </summary>
public class NpgsqlUUid7ValueGenerator : ValueGenerator<Guid>
public class NpgsqlUuid7ValueGenerator : ValueGenerator<Guid>
{
/// <summary>
/// Gets a value indicating whether the values generated are temporary or permanent. This implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,6 @@ public override bool TrySelect(IProperty property, ITypeBase typeBase, out Value
=> property.ClrType.UnwrapNullableType() == typeof(Guid)
? property.ValueGenerated == ValueGenerated.Never || property.GetDefaultValueSql() is not null
? new TemporaryGuidValueGenerator()
: new NpgsqlUUid7ValueGenerator()
: new NpgsqlUuid7ValueGenerator()
: base.FindForType(property, typeBase, clrType);
}
6 changes: 3 additions & 3 deletions test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void Returns_built_in_generators_for_types_setup_for_value_generation()
AssertGenerator<TemporaryByteValueGenerator>("NullableByte");
AssertGenerator<TemporaryDecimalValueGenerator>("Decimal");
AssertGenerator<StringValueGenerator>("String");
AssertGenerator<NpgsqlUUid7ValueGenerator>("Guid");
AssertGenerator<NpgsqlUuid7ValueGenerator>("Guid");
AssertGenerator<BinaryValueGenerator>("Binary");
}

Expand Down Expand Up @@ -212,11 +212,11 @@ public override bool GeneratesTemporaryValues
}

[Fact]
public void CustomUuid7Test()
public void NpgsqlUuid7ValueGenerator_creates_uuidv7()
{
var dtoNow = DateTimeOffset.UtcNow;
var net9Internal = Guid.CreateVersion7(dtoNow);

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 16, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 16, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 15, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 15, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 14, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 14, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 13, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 13, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 12, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 12, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 16, Debug)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-22.04, 16, Debug)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 15, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 15, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 16, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 16, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 14, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 14, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 12, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 12, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 13, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / build (windows-2022, 13, Release)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'Guid' does not contain a definition for 'CreateVersion7'

Check failure on line 218 in test/EFCore.PG.Tests/NpgsqlValueGeneratorSelectorTest.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

'Guid' does not contain a definition for 'CreateVersion7'
var custom = NpgsqlUUid7ValueGenerator.BorrowedFromNet9.CreateVersion7(dtoNow);
var custom = NpgsqlUuid7ValueGenerator.BorrowedFromNet9.CreateVersion7(dtoNow);
var bytenet9 = net9Internal.ToByteArray().AsSpan(0, 6);
var bytecustom = custom.ToByteArray().AsSpan(0, 6);
Assert.Equal(bytenet9, bytecustom);
Expand Down

0 comments on commit 1ddc4ca

Please sign in to comment.