fsprojects / fsprojects/FSharp.Data.SqlClient
Is it possible to turn off concurrency violation checking?
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 206
- Forks
- 66
- PR merge metrics
- No merged PRs in 30d
Description
Description
Using the SQL Programmability Provider, I'm trying to use it for updates to existing rows. I only have a subset of columns in the table that need updating, and don't need to load in data first. The way I'm doing it currently is:
- Create a new data row with blank values.
- Call
AcceptChanges() - Modify the appropriate fields with the values to update.
- Call
Update().
The issue is that the generated SQL also adds in where clauses to ensure that all the other values are the same as before, which obviously doesn't work since it expects all values to be blank. Is it possible to turn this check off for the dynamically generated SQL? The only other alternatives that I can see are:
- Load in the data before performing the update - not needed in my scenario and will greatly increase the number of SQL calls.
- Switch to hand-crafted update statements, either using a custom data adapter or using the SQL Command Provider.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the SQL Programmability Provider's generated SQL from the DataRow Update() path, focusing on how AcceptChanges() and original column values become WHERE clauses. Compare this with the SQL Command Provider behavior and determine where an opt-out could be exposed. Done means the provider supports updates without requiring unchanged values for every column, with coverage for the described partial-row scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp, sql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100