Oracle provider does not work correctly when quoted identifiers are used
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
- 45/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện sự cố với các mã định danh schema, table và column của Oracle được đặt trong dấu ngoặc kép như hiển thị trong báo cáo, sau đó theo dõi SQL được tạo cho provider. So sánh câu lệnh không có dấu ngoặc kép bị lỗi với dạng có dấu ngoặc kép được mong đợi và xác minh rằng các truy vấn đối với mã định danh có dấu ngoặc kép thành công mà không làm hỏng các mã định danh không có dấu ngoặc kép.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Like Firebug (#431) Oracle also has a problem with quoted table names. Actually the same goes for schema names and column names as well. (ref). When a table is created with quoted identifiers:
CREATE TABLE "SchemaName"."table_name"
( "timestamp" TIMESTAMP (6) NOT NULL ENABLE,
"text" NVARCHAR2(50) NOT NULL ENABLE )
Identifiers with quotes are case sensitive. Identifiers without quotes are treated as uppercase. To maintain the casing of the identifier names, they should be referenced everywhere with quotes:
SELECT t."timestamp", t."text" FROM "SchemaName"."table_name" t
To Reproduce
Steps to reproduce the behavior:
- create a table like mentioned above
- create a query to retrieve records from that table
let records =
query {
for t in context.SchemName.TableName do
select ( t.Timestamp, t.Text )
}
It wil fail with Oracle.ManagedDataAccess.Client.OracleException: 'ORA-00942: table or view does not exist' because it creates the query:
SELECT table_name.timestamp as "timestamp", table_name.text as "text" FROM SchemaName.table_name table_name
Which is interpreted by Oracle as something that cannot be found:
SELECT table_name.TIMESTAMP as "timestamp", table_name.TEXT as "text" FROM SCHEMANAME.TABLE_NAME table_name
Expected behavior
The schema object identifiers schema name, table name and column name should be quoted in statements when they were created as quoted identifiers. Preferably automatically otherwise with a flag like the one used in the Firebird solution (#431). The resulting query in this case should look like:
SELECT table_name."timestamp" as "timestamp", table_name."text" as "text" FROM "SchemaName"."table_name" table_name
Desktop (please complete the following information):
- OS: windows 11
- Oracle 12
- SqlProvider 1.3.5
Libraries used for resolution
- Oracle.ManagedDataAccess.dl (version 2.0.19.1)
- System.Diagnostics.PerformanceCounter.dll (targeting netstandard2.0, version 6.0.0)
- System.DirectoryService.dll (targeting netstandard2.0, version 5.0.0)
- System.DirectoryService.Protocols.dll (targeting netstandard2.0, version 5.0.1)
- System.Text.Json.dll (targeting netstandard2.0, version 6.0.0)
- 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ự
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
[InvoiceShelf] No database info Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
community-scripts/ProxmoxVE#17396 · 1 bình luận ·
-
bug possible-duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
AOSSIE-Org/PictoPy#1553 · 4 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
BasedHardware/omi#15274 · 3 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100