Skip to content

Commit 6f9f204

Browse files
fix linter
1 parent fede6a8 commit 6f9f204

File tree

8 files changed

+11
-18
lines changed

8 files changed

+11
-18
lines changed

src/EFCore.Ydb/src/Query/Internal/Translators/YdbMathTranslator.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ public class YdbMathTranslator : IMethodCallTranslator
7474
{ typeof(MathF).GetMethod(nameof(MathF.Truncate), [typeof(float)])!, "Trunc" }
7575
};
7676

77-
private static readonly List<MethodInfo> _roundWithDecimalMethods =
77+
private static readonly List<MethodInfo> RoundWithDecimalMethods =
7878
[
7979
typeof(Math).GetMethod(nameof(Math.Round), [typeof(double), typeof(int)])!,
8080
typeof(MathF).GetMethod(nameof(MathF.Round), [typeof(float), typeof(int)])!
8181
];
8282

83-
private static readonly List<MethodInfo> _logWithBaseMethods =
83+
private static readonly List<MethodInfo> LogWithBaseMethods =
8484
[
8585
typeof(Math).GetMethod(nameof(Math.Log), [typeof(double), typeof(double)])!,
8686
typeof(MathF).GetMethod(nameof(MathF.Log), [typeof(float), typeof(float)])!
@@ -117,7 +117,7 @@ public YdbMathTranslator(ISqlExpressionFactory sqlExpressionFactory)
117117
);
118118
}
119119

120-
if (_roundWithDecimalMethods.Contains(method))
120+
if (RoundWithDecimalMethods.Contains(method))
121121
{
122122
return _sqlExpressionFactory.Function(
123123
"Math::Round",

src/EFCore.Ydb/src/Storage/Internal/Mapping/YdbDateTimeTypeMapping.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,12 @@ public class YdbDateTimeTypeMapping : DateTimeTypeMapping
1212

1313
public YdbDateTimeTypeMapping(
1414
string storeType,
15-
DbType? dbType,
16-
Type clrType
15+
DbType? dbType
1716
) : base(storeType, dbType)
1817
{
1918
StoreTypeLiteral = storeType;
2019
}
2120

22-
protected YdbDateTimeTypeMapping(RelationalTypeMappingParameters parameters) : base(parameters)
23-
{
24-
}
25-
2621
protected override string SqlLiteralFormatString
2722
=> "CAST('" + DateTimeFormatConst + $"' AS {StoreTypeLiteral})";
2823
}

src/EFCore.Ydb/src/Storage/Internal/YdbTypeMappingSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RelationalTypeMappingSourceDependencies relationalDependencies
3939
private static readonly YdbDateOnlyTypeMapping Date = new("Date");
4040
private static readonly DateTimeTypeMapping DateTime = new("DateTime");
4141

42-
private static readonly YdbDateTimeTypeMapping Timestamp = new("Timestamp", DbType.DateTime, typeof(DateTime));
42+
private static readonly YdbDateTimeTypeMapping Timestamp = new("Timestamp", DbType.DateTime);
4343

4444
// TODO: Await interval in Ydb.Sdk
4545
private static readonly TimeSpanTypeMapping Interval = new("Interval", DbType.Object);

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/DesignTimeYdbTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ public class DesignTimeYdbTest(DesignTimeYdbTest.DesignTimeYdbFixture fixture)
1010
: DesignTimeTestBase<DesignTimeYdbTest.DesignTimeYdbFixture>(fixture)
1111
{
1212
protected override Assembly ProviderAssembly
13+
#pragma warning disable EF1001
1314
=> typeof(YdbDesignTimeServices).Assembly;
15+
#pragma warning restore EF1001
1416

1517
public class DesignTimeYdbFixture : DesignTimeFixtureBase
1618
{

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/ModelBuilding/YdbModelBuilderGenericTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using EfCore.Ydb.FunctionalTests.ModelBuilding;
21
using Microsoft.EntityFrameworkCore;
32
using Xunit;
43

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/ModelBuilding/YdbModelBuilderTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.EntityFrameworkCore.TestUtilities;
44
using Xunit;
55

6-
namespace EfCore.Ydb.FunctionalTests.ModelBuilding;
6+
namespace EntityFrameworkCore.Ydb.FunctionalTests.ModelBuilding;
77

88
public class YdbModelBuilderTestBase : RelationalModelBuilderTest
99
{

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/Query/TPTGearsOfWarQueryYdbTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,7 @@ public override Task Byte_array_filter_by_length_literal(bool async) =>
922922
public override Task Byte_array_filter_by_length_parameter(bool async) =>
923923
base.Byte_array_filter_by_length_parameter(async);
924924

925-
[ConditionalTheory(Skip = "TODO: Fix tests")]
926-
[MemberData(nameof(IsAsyncData))]
925+
[Fact(Skip = "TODO: Fix tests")]
927926
public override void Byte_array_filter_by_length_parameter_compiled() =>
928927
base.Byte_array_filter_by_length_parameter_compiled();
929928

src/EFCore.Ydb/test/EntityFrameworkCore.Ydb.FunctionalTests/TestUtilities/YdbTestStore.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,9 @@ public override async Task CleanAsync(DbContext context)
191191
await connection.OpenAsync();
192192
}
193193

194-
var schema = await connection.GetSchemaAsync("tables");
195-
var tables = schema
194+
var tables = (await connection.GetSchemaAsync("Tables", [null, "TABLE"]))
196195
.AsEnumerable()
197-
.Select(entry => (string)entry["table_name"])
198-
.Where(tableName => !tableName.StartsWith('.'));
196+
.Select(entry => (string)entry["table_name"]);
199197

200198
if (!tables.Any()) return;
201199

0 commit comments

Comments
 (0)