Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Any Optimistic Concurrency Control support (MS SQL Server)?

Đang mở
#619 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
fsharp, sql
Lĩnh vực
databases

Hướng nghiên cứu

Bắt đầu từ hành vi của SubmitUpdates() trong SQLProvider đối với MSSQL và tái hiện thao tác cập nhật được mô tả trong hai session bằng một cột TIMESTAMP. Hoàn thành khi một thao tác cập nhật đồng thời gây ra lỗi runtime và giữ nguyên cơ sở dữ liệu; issue không nêu các source file hoặc test cụ thể.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Description

I'm looking for a way to add Optimistic Concurrency Control in SQLProvider, based on TIMESTAMP columns (MSSQL). Similar to how it is done in Entity Framework.

Is there anything built-in? If not then a workaround or an extension?

Repro steps
  1. Create context, read a record from a table with TIMESTAMP column.

  2. Update some property of the record.

  3. Hit the breakpoint to make debugger stop just before ctx.SubmitUpdates(). Run the code in debugger.

  4. Concurrently update the record in MS SQL server (e.g. via SQL Management Studio) so record read in Step 1 becomes obsolete

  5. Resume debugger and execute ctx.SubmitUpdates()

Expected behavior

A runtime error saying that record was updated concurrently, no changes in database.

Actual behavior

SubmitUpdates() writes changes to database, regardless whether timestamp is obsolete or not.

Known workarounds

Don't know any out of the box. A stored procedure can be written instead which is tedious.

Related information
  • Used database: MSSQLSERVER
  • Operating system: Windows 10
  • .NET Core 2.1
Ngôn ngữ chính
F#
Star
627
Fork
147
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của fsprojects/SQLProvider

Tất cả issue của fsprojects/SQLProvider

Issue tương tự

Thêm issue về Databases

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.