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

Option to normalize casing of identifiers in the ScriptGenerator

Aperta
#177 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
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
sql
Ambito
databases

Direzione di ricerca

Inizia individuando ScriptGenerator e le sue impostazioni attuali, quindi traccia il modo in cui gli identificatori vengono emessi nell'SQL generato. Determina se la distinzione tra maiuscole e minuscole si applica uniformemente o richiede impostazioni separate a livello di istanza e di database; il lavoro è completato quando PreserveOriginal rimane il valore predefinito e LowerCase e UpperCase usano la distinzione invariante tra maiuscole e minuscole come specificato.

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

Descrizione

formatting

SQL Server compares identifiers with respect to the CI/CS, AI/AS setting of the respective database's collation. While accent sensitivity has no effect on the SQL source code, case-sensitivity may have such an effect when the goal is to produce a 'canonical' form of the source code. The locale part of the collation plays no part in this.

Hence, the settings of the ScriptGenerator should be extended with an option to normalize casing of identifiers as follows:

  • PreserveOriginal — outputs identifiers as-is; this shall be the default behavior corresponding to the current state (no breaking change)
  • LowerCase — lower-case all identifiers when producing the output
  • UpperCase — upper-case all identifiers when producing the output

A simple ToLowerInvariant() / ToUpperInvariant() should be used.

Question is, whether the ScriptGenerator should support separate settings for instance-level (global) objects versus objects in a database. This would significantly increase the complexity. See also Database identifiers:

The collation of an identifier depends on the level at which it's defined. Identifiers of instance-level objects, such as logins and database names, are assigned the default collation of the instance. Identifiers of objects in a database, such as tables, views, and column names, are assigned the default collation of the database.

Lingua principale
GAP
Stelle
277
Fork
43
Merge medio
6g 17h
PR unite (30g)
3

Guida per i contributori

Apri la guida per i contributori

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 microsoft/SqlScriptDOM

Tutte le issue di microsoft/SqlScriptDOM

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.