Skip to content

Commit 564261e

Browse files
fix linter
1 parent 3825995 commit 564261e

File tree

6 files changed

+8
-31
lines changed

6 files changed

+8
-31
lines changed

src/EfCore.Ydb/src/Infrastructure/Internal/YdbOptionsExtension.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ public override DbContextOptionsExtensionInfo Info
2828

2929
private sealed class ExtensionInfo(IDbContextOptionsExtension extension) : RelationalExtensionInfo(extension)
3030
{
31-
private new YdbOptionsExtension Extension => (YdbOptionsExtension)base.Extension;
32-
3331
public override bool IsDatabaseProvider => true;
3432

3533
// TODO: Right now it's stub

src/EfCore.Ydb/src/Storage/Internal/Mapping/YdbJsonTypeMapping.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ private static readonly ConstructorInfo MemoryStreamConstructor
3535
protected override RelationalTypeMapping Clone(RelationalTypeMappingParameters parameters)
3636
=> new YdbJsonTypeMapping(parameters);
3737

38-
public override MethodInfo GetDataReaderMethod()
39-
=> GetStringMethod;
38+
public override MethodInfo GetDataReaderMethod() => GetStringMethod;
4039

4140
protected override string GenerateNonNullSqlLiteral(object value)
4241
{

src/EfCore.Ydb/src/Storage/Internal/YdbRelationalConnection.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,7 @@ namespace EfCore.Ydb.Storage.Internal;
99
public class YdbRelationalConnection(RelationalConnectionDependencies dependencies)
1010
: RelationalConnection(dependencies), IYdbRelationalConnection
1111
{
12-
public DbDataSource? DataSource { get; private set; }
13-
14-
protected override DbConnection CreateDbConnection()
15-
{
16-
if (DataSource is not null)
17-
{
18-
return DataSource.CreateConnection();
19-
}
20-
21-
var connection = new YdbConnection(GetValidatedConnectionString());
22-
return connection;
23-
}
12+
protected override DbConnection CreateDbConnection() => new YdbConnection(GetValidatedConnectionString());
2413

2514
public IYdbRelationalConnection Clone()
2615
{

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ RelationalTypeMappingSourceDependencies relationalDependencies
122122
{
123123
var clrType = mappingInfo.ClrType;
124124
var storeTypeName = mappingInfo.StoreTypeName;
125-
var storeTypeNameBase = mappingInfo.StoreTypeNameBase;
126125

127126
// Special case.
128127
// If property has [YdbString] attribute then we use STRING type instead of TEXT

src/EfCore.Ydb/src/Update/Internal/YdbModificationCommandBatchFactory.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@
55
using Microsoft.EntityFrameworkCore.Diagnostics;
66
using Microsoft.EntityFrameworkCore.Storage;
77
using Microsoft.EntityFrameworkCore.Update;
8-
using Ydb.Sdk.Ado;
98

109
namespace EfCore.Ydb.Update.Internal;
1110

12-
public class YdbModificationCommandBatchFactory : IModificationCommandBatchFactory
11+
public sealed class YdbModificationCommandBatchFactory(ModificationCommandBatchFactoryDependencies dependencies)
12+
: IModificationCommandBatchFactory
1313
{
14-
public YdbModificationCommandBatchFactory(ModificationCommandBatchFactoryDependencies dependencies)
15-
{
16-
Dependencies = dependencies;
17-
}
18-
19-
protected virtual ModificationCommandBatchFactoryDependencies Dependencies { get; }
14+
private ModificationCommandBatchFactoryDependencies Dependencies { get; } = dependencies;
2015

2116
public ModificationCommandBatch Create()
2217
=> new TemporaryStubModificationCommandBatch(Dependencies);
@@ -28,7 +23,7 @@ internal class TemporaryStubModificationCommandBatch(ModificationCommandBatchFac
2823
protected override void Consume(RelationalDataReader reader) =>
2924
ConsumeAsync(reader).ConfigureAwait(false).GetAwaiter().GetResult();
3025

31-
protected override async Task ConsumeAsync(
26+
protected override Task ConsumeAsync(
3227
RelationalDataReader? reader,
3328
CancellationToken cancellationToken = default
3429
)
@@ -62,6 +57,8 @@ protected override async Task ConsumeAsync(
6257
ModificationCommands[commandIndex].Entries
6358
);
6459
}
60+
61+
return Task.CompletedTask;
6562
}
6663

6764
protected override void AddCommand(IReadOnlyModificationCommand modificationCommand)

src/EfCore.Ydb/test/EfCore.Ydb.FunctionalTests/AllTests/BulkUpdates/ComplexTypeBulkUpdatesYdbTest.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ public override async Task Update_multiple_projected_complex_types_via_anonymous
106106
"""
107107
);
108108

109-
public override async Task Update_projected_complex_type_via_OrderBy_Skip(bool async)
110-
{
111-
// TODO: Implement later
112-
}
113-
114109
public override async Task Update_complex_type_to_parameter(bool async)
115110
=> await SharedTestMethods.TestIgnoringBase(
116111
base.Update_complex_type_to_parameter,

0 commit comments

Comments
 (0)