Oracle provider does not work correctly when quoted identifiers are used
還沒有人認領這個 Issue。
評估
研究方向
先使用報告中所示的加上引號的 Oracle schema、table 和 column 識別碼重現問題,然後追蹤為 provider 產生的 SQL。比較失敗的不加引號陳述式與預期的加引號形式,並驗證針對加引號識別碼的查詢能夠成功,同時不會破壞不加引號的識別碼。
由索引模型根據 Issue 內容生成。
描述
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)
- 主要語言
- F#
- 星號
- 627
- 分支
- 148
- 平均合併
- 2 小時 2 分鐘
- 30 天內合併 PR
- 1
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 沒有貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
fsprojects/SQLProvider 的其他 Issue
-
enhancement
難度 3/5 1-2 天 新手友好度 55/100
fsprojects/SQLProvider#872 · 2 則留言 ·
-
Repo Assist?未關閉enhancement
難度 5/5 一週以上 新手友好度 10/100
fsprojects/SQLProvider#870 · 1 則留言 ·
-
postgresql
難度 4/5 3-5 天 新手友好度 58/100
fsprojects/SQLProvider#869 · 2 則留言 ·
-
documentation
難度 2/5 1-3 小時 新手友好度 42/100
fsprojects/SQLProvider#868 · 2 則留言 ·
-
sql server
難度 4/5 3-5 天 新手友好度 45/100
fsprojects/SQLProvider#851 · 1 則留言 ·
查看 fsprojects/SQLProvider 的全部 Issue
相似的 Issue
-
area:connection bug effort:S priority:P2
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
Arekkazu/sgpmp-backend#549 ·
維護者通常 1 天內回覆
-
priority: medium tech-debt
難度 2/5 1-3 小時 新手友好度 62/100
LeeAdcock/robocodeJs.com#411 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
good first issue refactor
難度 2/5 1-3 小時 新手友好度 80/100
pedrorchagas/blog-api#18 ·