tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 466 forks source link

Bulk Insert row lock not supported #1630

Closed aburht closed 3 months ago

aburht commented 6 months ago

Bulk insert operations are not supporting row level locks, I don't see options in IbulkOptions, As a results transactions are experiencing delays and potential deadlocks

Expected behaviour:

Bulk insert operations should support row level locks

Software versions

dhensby commented 6 months ago

I believe this is a feature request to add a lock configuration during bulk insert operations, is that correct?

Locking seems to be managed via dedicated options (https://learn.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-ver16#tablock), I'm not clear on how you would specify a row level lock.

Do you have a suggestion for how to implement this feature?