Skip to content

Commit 87488b7

Browse files
committed
Make CreateBatchCommand return NpgsqlBatchCommand (#5241)
Closes #5238 (cherry picked from commit 20d0b6c)
1 parent 3b57938 commit 87488b7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Npgsql/NpgsqlBatch.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ private protected NpgsqlBatch(NpgsqlDataSourceCommand command)
118118
}
119119

120120
/// <inheritdoc />
121-
protected override DbBatchCommand CreateDbBatchCommand()
121+
protected override DbBatchCommand CreateDbBatchCommand() => CreateBatchCommand();
122+
123+
/// <inheritdoc cref="DbBatch.CreateBatchCommand"/>
124+
public new NpgsqlBatchCommand CreateBatchCommand()
122125
=> new NpgsqlBatchCommand();
123126

124127
/// <inheritdoc />
@@ -171,4 +174,4 @@ public override Task PrepareAsync(CancellationToken cancellationToken = default)
171174

172175
/// <inheritdoc />
173176
public override void Cancel() => Command.Cancel();
174-
}
177+
}

src/Npgsql/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
#nullable enable
2+
Npgsql.NpgsqlBatch.CreateBatchCommand() -> Npgsql.NpgsqlBatchCommand!

0 commit comments

Comments
 (0)