Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Columns with similar names on the DB collide in SQLProvider

Aperta
#599 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
fsharp, sql
Ambito
databases

Direzione di ricerca

Inizia riproducendo la collision in SQLProvider con SQL Server 2012 usando colonne chiamate ExampleColumn, ExampleColumn: ed ExampleColumn_. Traccia il modo in cui il provider mappa queste colonne del database negli identificatori F#. Il lavoro è completato quando la tabella può essere interrogata senza nomi generati indistinguibili, mantenendo al contempo un modo utilizzabile per fare riferimento a ogni colonna.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
F#
Stelle
627
Fork
147
Merge medio
2h 2m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fsprojects/SQLProvider

Tutte le issue di fsprojects/SQLProvider

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.