r2dbc / r2dbc-mssql

R2DBC Driver for Microsoft SQL Server using TDS (Tabular Data Stream) Protocol
Apache License 2.0
178 stars 32 forks source link

test that shows `getRowsUpdated` returns 0 in upsert #290

Open sebastian-alfers opened 6 months ago

sebastian-alfers commented 6 months ago

Not really a fix, but a test that shows that getRowsUpdated does not return 1 for an inserted row in an upsert query.

An upsert is basically update ... if @@ROWCOUNT = 0 insert ...

sebastian-alfers commented 6 months ago

I tried to fix it, but did not really come to a point beside writing a reproducer as a test - which is why I created this draft pr instead of making an issue. Should I do the latter as well?