Option to normalize casing of identifiers in the ScriptGenerator
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
Rechercherichtung
Beginne damit, den ScriptGenerator und seine aktuellen Einstellungen zu lokalisieren, und verfolge dann, wie Bezeichner im generierten SQL ausgegeben werden. Kläre, ob die Groß-/Kleinschreibung einheitlich angewendet wird oder separate Einstellungen auf Instanz- und Datenbankebene benötigt; abgeschlossen ist die Aufgabe, wenn PreserveOriginal weiterhin der Standard ist und LowerCase und UpperCase die angegebene invariante Groß-/Kleinschreibung verwenden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 outputUpperCase— 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.
- Vorherrschende Sprache
- GAP
- Sterne
- 277
- Forks
- 43
- Ø Merge
- 46 Min.
- Gemergte PRs (30 T.)
- 2
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/SqlScriptDOM
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
microsoft/SqlScriptDOM#228 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
microsoft/SqlScriptDOM#183 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 56/100
microsoft/SqlScriptDOM#226 · 1 Reaktion ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
microsoft/SqlScriptDOM#225 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 58/100
microsoft/SqlScriptDOM#224 ·
Alle Issues in microsoft/SqlScriptDOM
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
GoogleChromeLabs/project-sesame#216 ·
Maintainer antworten meist innerhalb von 12 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
Add: Prima Sport 5 LogoOffencheck:passed logos:add
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag