From fbf0671913511c9cfd7c5775f3bd3ec20394af6b Mon Sep 17 00:00:00 2001 From: Namek Date: Wed, 11 Dec 2024 01:07:47 +0100 Subject: [PATCH] Rename __tname__ to __tname due to constraint: EdgeQLSyntaxError: identifiers surrounded by double underscores are forbidden --- .../Binary/Builders/Info/EdgeDBTypeDeserializerInfo.cs | 2 +- tests/EdgeDB.Tests.Benchmarks/TypeBuilderBenchmarks.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EdgeDB.Net.Driver/Binary/Builders/Info/EdgeDBTypeDeserializerInfo.cs b/src/EdgeDB.Net.Driver/Binary/Builders/Info/EdgeDBTypeDeserializerInfo.cs index dd3d4189..319eafd3 100644 --- a/src/EdgeDB.Net.Driver/Binary/Builders/Info/EdgeDBTypeDeserializerInfo.cs +++ b/src/EdgeDB.Net.Driver/Binary/Builders/Info/EdgeDBTypeDeserializerInfo.cs @@ -274,7 +274,7 @@ private TypeDeserializerFactory CreateDefaultFactory() return (ref ObjectEnumerator enumerator) => { // introspect the type name - if (!enumerator.Next(out var name, out var value) || name != "__tname__") + if (!enumerator.Next(out var name, out var value) || name != "__tname") throw new ConfigurationException( "Type introspection is required for abstract types, this is a bug."); diff --git a/tests/EdgeDB.Tests.Benchmarks/TypeBuilderBenchmarks.cs b/tests/EdgeDB.Tests.Benchmarks/TypeBuilderBenchmarks.cs index 80fd4778..ca4e23c2 100644 --- a/tests/EdgeDB.Tests.Benchmarks/TypeBuilderBenchmarks.cs +++ b/tests/EdgeDB.Tests.Benchmarks/TypeBuilderBenchmarks.cs @@ -28,7 +28,7 @@ static TypeBuilderBenchmarks() Codec = new ObjectCodec(in Guid.Empty, new ICodec[] {new TextCodec(), new UUIDCodec(), new UUIDCodec(), new TextCodec(), new TextCodec()}, - new[] {"__tname__", "__tid__", "id", "name", "email"}); + new[] {"__tname", "__tid__", "id", "name", "email"}); Codec = Codec.GetOrCreateTypeCodec(typeof(Person)); }