Oracle provider does not work correctly when quoted identifiers are used
まだ誰も着手していません。
評価
調査の方向性
まず、レポートに示されている引用符付きの Oracle のスキーマ、テーブル、列の識別子を使って問題を再現し、次に 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
- フォーク
- 147
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/SQLProvider のほかの issue
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
fsprojects/SQLProvider#872 · コメント 2 件 ·
-
Repo Assist? オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 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
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
AstrBotDevs/AstrBot#10205 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
OHDSI/Data2Evidence#3394 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100