Runtime System.Exception when ContextSchemaPath is defined
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- mysql
- Lĩnh vực
- databases
Hướng nghiên cứu
Bắt đầu với hành vi của ContextSchemaPath và mục nhập trong stack trace FSharp.Data.Sql.Providers.MySql.findClrType@91-1, sau đó tái hiện thao tác cơ sở dữ liệu bằng các bước được liệt kê. Hoàn tất khi một schema được lưu trong bộ nhớ đệm hỗ trợ việc sử dụng ở thời điểm thiết kế và thời điểm biên dịch mà không được tải trong các thao tác cơ sở dữ liệu lúc chạy, để thao tác chèn không còn gây ra System.Exception: !.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
When the ContextSchemaPath locally cached schema file is defined and present, SQLProvider returns System.Exception: ! when performing database operations at runtime.
Repro steps
-
Generate a local schema file with ContextSchemaPath as described in the documentation
-
Debug the project
-
Perform a database operation. The following exception is raised:
System.Exception: !
at FSharp.Data.Sql.Providers.MySql.findClrType@91-1.Invoke(String _arg1)
at FSharp.Data.Sql.Providers.MySql.createParam[a](String name, Int32 i, a v)
at <StartupCode$FSharp-Data-SqlProvider>.$Providers.MySql.clo@350-280.Invoke(Tuple`2 tupledArg)
at Microsoft.FSharp.Collections.SeqModule.Fold[T,TState](FSharpFunc`2 folder, TState state, IEnumerable`1 source)
at FSharp.Data.Sql.Providers.MySqlProvider.createInsertCommand(IDbConnection con, StringBuilder sb, SqlEntity entity)
at <StartupCode$FSharp-Data-SqlProvider>.$Providers.MySql.FSharp-Data-Sql-Common-ISqlProvider-ProcessUpdates@949-3.Invoke(SqlEntity e)
at Microsoft.FSharp.Collections.SeqModule.Iterate[T](FSharpFunc`2 action, IEnumerable`1 source)
at FSharp.Data.Sql.Providers.MySqlProvider.FSharp-Data-Sql-Common-ISqlProvider-ProcessUpdates(IDbConnection con, ConcurrentDictionary`2 entities, TransactionOptions transactionOptions, FSharpOption`1 timeout)
at <StartupCode$FSharp-Data-SqlProvider>.$SqlRuntime.DataContext.f@1-69(SqlDataContext __, IDbConnection con, Unit unitVar0)
at FSharp.Data.Sql.Runtime.SqlDataContext.FSharp-Data-Sql-Common-ISqlDataContext-SubmitPendingChanges()
at MyProject.DoDatabaseStuff(DbRow _row) in C:\Users\Me\Code\MyProject\Db.fs:line 65
Stopped due to error
Expected behavior
The type provider should not attempt to load the ContextSchemaPath at runtime since it is not a data source and will never work. It should only load at design-time and compile-time to allow development and compilation (build server) without a full-time database connection.
Known workarounds
Workarounds are to either not use the ContextSchemaPath at all, or delete the cached schema file each time debugging is needed.
Related information
- Used database: MySQL 5.6
- Operating system Window 10 version 1803
- Branch: 1.1.42
- .NET Runtime: 4.5.2
- Performance information, links to performance testing scripts : N/A
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của fsprojects/SQLProvider
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
fsprojects/SQLProvider#872 · 2 bình luận ·
-
Repo Assist? Đang mởenhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
fsprojects/SQLProvider#870 · 1 bình luận ·
-
postgresql
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
fsprojects/SQLProvider#869 · 2 bình luận ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
fsprojects/SQLProvider#868 · 2 bình luận ·
-
sql server
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
fsprojects/SQLProvider#851 · 1 bình luận ·
Tất cả issue của fsprojects/SQLProvider
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
AstrBotDevs/AstrBot#10205 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
OHDSI/Data2Evidence#3394 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100