Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Columns with similar names on the DB collide in SQLProvider

オープン
#599 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
fsharp, sql
領域
databases

調査の方向性

まず、ExampleColumn、ExampleColumn:、ExampleColumn_ という名前の列を使い、SQL Server 2012 上の SQLProvider で衝突を再現します。provider がそれらのデータベース列を F# 識別子にどのようにマッピングしているかを追跡します。生成された名前が区別できない状態にならず、すべての列を参照するための実用的な方法を維持したまま、テーブルをクエリできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Description

When a table has 2 or more columns whose names are only different by "special" characters, SQLProvider creates indistinct mappings for them.

Repro steps
  1. Create a table with these columns
  • [ExampleColumn]
  • [ExampleColumn:]
  • [ExampleColumn_]
  1. Try to query this table from SQLProvider
Expected behavior

I would expect, given F#'s ability to create identifiers with special characters, that SQLProvider wouldn't need to alter your column names in any way (at least, as an option when creating the provider).

Actual behavior

SQLProvider will rename these fields with indistinct names, causing an exception to be thrown, and the table becomes un-queryable.

Known workarounds

Create a view in your database that disambiguates that column names and use that from SQLProvider, but this is not acceptable since you're then designing the database around an arbitrary tool in a separate code stack.

Related information
  • SQL Server 2012
  • Windows 7, SP1
  • v1.1.30-1.1.58
  • .NET 4.6
主要言語
F#
スター
627
フォーク
147
平均マージ
2時間 2分
マージ済み PR(30日)
1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

fsprojects/SQLProvider のほかの issue

fsprojects/SQLProvider の issue をすべて見る

似ている issue

Databases の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。