Option to normalize casing of identifiers in the ScriptGenerator
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
Línea de trabajo
Comienza por localizar el ScriptGenerator y su configuración actual, y luego sigue cómo se emiten los identificadores en el SQL generado. Determina si el uso de mayúsculas y minúsculas se aplica de forma uniforme o requiere configuraciones separadas a nivel de instancia y de base de datos; la tarea estará terminada cuando PreserveOriginal siga siendo el valor predeterminado y LowerCase y UpperCase utilicen el uso invariable de mayúsculas y minúsculas según lo especificado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- GAP
- Estrellas
- 277
- Forks
- 43
- Merge medio
- 6 d 17 h
- PR fusionados (30 d)
- 3
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/SqlScriptDOM
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/SqlScriptDOM#228 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
microsoft/SqlScriptDOM#183 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
microsoft/SqlScriptDOM#226 · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
microsoft/SqlScriptDOM#225 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
microsoft/SqlScriptDOM#224 ·
Todos los issues de microsoft/SqlScriptDOM
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
[BUG]: "Clear All" in Settings doesn't clear the saved analysis, old data comes back after reload Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
AOSSIE-Org/OrgExplorer#253 · 1 comentario ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
needs triage receiver/oracledb
Dificultad 2/5 1-2 días Aptitud para principiantes 84/100
open-telemetry/opentelemetry-collector-contrib#51400 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100