mirror of
https://github.com/treffynnon/sqlstyle.guide.git
synced 2025-03-09 12:49:51 -05:00
updated camelCase examples
This commit is contained in:
parent
47071bc63d
commit
0e8deec03d
12 changed files with 13 additions and 13 deletions
|
@ -58,7 +58,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Vermeiden
|
### Vermeiden
|
||||||
|
|
||||||
* CamelCase. Es ist schwierig schnell zu scannen.
|
* camelCase. Es ist schwierig schnell zu scannen.
|
||||||
* Beschreibende Präfixe oder [ungarische Notation][ungarische-notation] wie
|
* Beschreibende Präfixe oder [ungarische Notation][ungarische-notation] wie
|
||||||
`sp_` oder `tbl`.
|
`sp_` oder `tbl`.
|
||||||
* Plurale. Verwenden Sie stattdessen den natürlicheren Sammelbegriff. Zum
|
* Plurale. Verwenden Sie stattdessen den natürlicheren Sammelbegriff. Zum
|
||||||
|
|
|
@ -39,7 +39,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### À éviter
|
### À éviter
|
||||||
|
|
||||||
* Le CamelCase — c'est difficile à lire rapidement.
|
* Le camelCase — c'est difficile à lire rapidement.
|
||||||
* Les préfixes descriptifs ou les notations hongroises comme `sp_` ou `tbl`.
|
* Les préfixes descriptifs ou les notations hongroises comme `sp_` ou `tbl`.
|
||||||
* Les pluriels — à la place, utilisez le terme collectif le plus naturel quand c'est possible. Par exemple `staff` au lieu de `employees` ou `people` au lieu de `individuals`.
|
* Les pluriels — à la place, utilisez le terme collectif le plus naturel quand c'est possible. Par exemple `staff` au lieu de `employees` ou `people` au lieu de `individuals`.
|
||||||
* Identifiants entre guillemets — si vous devez les utiliser, limitez-vous aux doubles guillemets SQL-92 pour la portabilité (selon le SGBD, vous aurez peut-être besoin de configurer votre serveur SQL pour qu'il soit compatible).
|
* Identifiants entre guillemets — si vous devez les utiliser, limitez-vous aux doubles guillemets SQL-92 pour la portabilité (selon le SGBD, vous aurez peut-être besoin de configurer votre serveur SQL pour qu'il soit compatible).
|
||||||
|
|
|
@ -37,7 +37,7 @@ SELECT file_hash -- stored ssdeep hash
|
||||||
|
|
||||||
### Evitare
|
### Evitare
|
||||||
|
|
||||||
- La [notazione a cammello][camelcase-it] (_CamelCase_)—è difficile da scorrere velocemente.
|
- La [notazione a cammello][camelCase-it] (_camelCase_)—è difficile da scorrere velocemente.
|
||||||
- Prefissi descrittivi o notazione ungherese tipo `sp_` o `tbl`.
|
- Prefissi descrittivi o notazione ungherese tipo `sp_` o `tbl`.
|
||||||
- Plurali—quando possibile usare invece il termine collettivo che più si addice. Ad esempio `personale` in luogo di `impiegati` o `persone` invece che `individui`
|
- Plurali—quando possibile usare invece il termine collettivo che più si addice. Ad esempio `personale` in luogo di `impiegati` o `persone` invece che `individui`
|
||||||
- Identificatori racchiusi tra virgolette—se si devono usare attenersi ai doppi apici SQL-92 per ragioni di portabilità (si potrebbe aver bisogno di configurare il proprio server SQL per supportarlo, dipende dal fornitore).
|
- Identificatori racchiusi tra virgolette—se si devono usare attenersi ai doppi apici SQL-92 per ragioni di portabilità (si potrebbe aver bisogno di configurare il proprio server SQL per supportarlo, dipende dal fornitore).
|
||||||
|
@ -1225,4 +1225,4 @@ Ci sono alcuni tipi di dato di colonna consigliati per massimizzare la compatibi
|
||||||
[eav]: https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model 'Wikipedia: Entity–attribute–value model'
|
[eav]: https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model 'Wikipedia: Entity–attribute–value model'
|
||||||
[sqlstyleguide]: https://www.sqlstyle.guide/ 'SQL style guide by Simon Holywell'
|
[sqlstyleguide]: https://www.sqlstyle.guide/ 'SQL style guide by Simon Holywell'
|
||||||
[licence]: https://creativecommons.org/licenses/by-sa/4.0/ 'Creative Commons Attribution-ShareAlike 4.0 International License'
|
[licence]: https://creativecommons.org/licenses/by-sa/4.0/ 'Creative Commons Attribution-ShareAlike 4.0 International License'
|
||||||
[camelcase-it]: https://www.wikiwand.com/it/Notazione_a_cammello
|
[camelCase-it]: https://www.wikiwand.com/it/Notazione_a_cammello
|
||||||
|
|
|
@ -47,7 +47,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### 非推奨
|
### 非推奨
|
||||||
|
|
||||||
* CamelCase - 読みづらくなる。
|
* camelCase - 読みづらくなる。
|
||||||
* 説明的接頭辞やハンガリアン記法(`sp_`または`tbl`など)。
|
* 説明的接頭辞やハンガリアン記法(`sp_`または`tbl`など)。
|
||||||
* 複数形 - できるだけ集合体を表す用語を使用する。たとえば`employees`の代わりに`staff`、または`individuals`の代わりに`people`を使用する。
|
* 複数形 - できるだけ集合体を表す用語を使用する。たとえば`employees`の代わりに`staff`、または`individuals`の代わりに`people`を使用する。
|
||||||
* 引用符で囲まれた識別子 - 使用しなければならない場合、移植性のためSQL92の二重引用符が欠かせなくなる(ベンダーによってはサーバーを構成する必要がある)。
|
* 引用符で囲まれた識別子 - 使用しなければならない場合、移植性のためSQL92の二重引用符が欠かせなくなる(ベンダーによってはサーバーを構成する必要がある)。
|
||||||
|
|
|
@ -47,7 +47,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Avoid
|
### Avoid
|
||||||
|
|
||||||
* CamelCase. — 빠르게 스캔하기 어렵다.
|
* camelCase. — 빠르게 스캔하기 어렵다.
|
||||||
* 설명 접두사 또는 `sp_`, `tbl`과 같은 헝가리안 표기법.
|
* 설명 접두사 또는 `sp_`, `tbl`과 같은 헝가리안 표기법.
|
||||||
* 복수. — 가능한 경우 더 자연스러운 집합 명사를 사용하라. 예를 들어, `employees` 대신 `staff`를,
|
* 복수. — 가능한 경우 더 자연스러운 집합 명사를 사용하라. 예를 들어, `employees` 대신 `staff`를,
|
||||||
`individuals` 대신 `people`을 사용하라.
|
`individuals` 대신 `people`을 사용하라.
|
||||||
|
|
|
@ -51,7 +51,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Avoid
|
### Avoid
|
||||||
|
|
||||||
* CamelCase—it is difficult to scan quickly.
|
* camelCase—it is difficult to scan quickly.
|
||||||
* Descriptive prefixes or Hungarian notation such as `sp_` or `tbl`.
|
* Descriptive prefixes or Hungarian notation such as `sp_` or `tbl`.
|
||||||
* Plurals—use the more natural collective term where possible instead. For example
|
* Plurals—use the more natural collective term where possible instead. For example
|
||||||
`staff` instead of `employees` or `people` instead of `individuals`.
|
`staff` instead of `employees` or `people` instead of `individuals`.
|
||||||
|
|
|
@ -56,7 +56,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Niezalecane
|
### Niezalecane
|
||||||
|
|
||||||
* CamelCase – trudno się go odczytuje przy szybkim przęglądaniu kodu.
|
* camelCase – trudno się go odczytuje przy szybkim przęglądaniu kodu.
|
||||||
* Przedrostki opisowe lub notacja węgierska, takie jak `sp_` lub `tbl`.
|
* Przedrostki opisowe lub notacja węgierska, takie jak `sp_` lub `tbl`.
|
||||||
* Liczba mnoga – tam, gdzie jest to możliwe, używaj bardziej naturalnego określenia zbiorowego,
|
* Liczba mnoga – tam, gdzie jest to możliwe, używaj bardziej naturalnego określenia zbiorowego,
|
||||||
np. `staff` zamiast `employees` lub `people` zamiast `individuals`.
|
np. `staff` zamiast `employees` lub `people` zamiast `individuals`.
|
||||||
|
|
|
@ -54,7 +54,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Evite
|
### Evite
|
||||||
|
|
||||||
* CamelCase—difícil de se analisar rapidamente.
|
* camelCase—difícil de se analisar rapidamente.
|
||||||
* Prefixos descritivos ou notação húngara como `sp_` ou `tbl`.
|
* Prefixos descritivos ou notação húngara como `sp_` ou `tbl`.
|
||||||
* Plurais—utilize termos coletivos onde possível. Por exemplo,
|
* Plurais—utilize termos coletivos onde possível. Por exemplo,
|
||||||
`pessoal` ao invés de `funcionários` ou `pessoa` no lugar de `indivíduos`.
|
`pessoal` ao invés de `funcionários` ou `pessoa` no lugar de `indivíduos`.
|
||||||
|
|
|
@ -61,7 +61,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Плохой стиль
|
### Плохой стиль
|
||||||
|
|
||||||
* **CamelCase**. Неудобочитаем.
|
* **camelCase**. Неудобочитаем.
|
||||||
* **Префиксы и [венгерская нотация][hungarian-notation-ru]**. Префиксы
|
* **Префиксы и [венгерская нотация][hungarian-notation-ru]**. Префиксы
|
||||||
наподобие `sp_` или `tbl_` избыточны.
|
наподобие `sp_` или `tbl_` избыточны.
|
||||||
* **Множественное число**. Лучше использовать более естественно звучащие
|
* **Множественное число**. Лучше использовать более естественно звучащие
|
||||||
|
|
|
@ -54,7 +54,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Bunlardan Kaçın
|
### Bunlardan Kaçın
|
||||||
|
|
||||||
* CamelCase—hızlı taranması için zor.
|
* camelCase—hızlı taranması için zor.
|
||||||
* Tanımlayıcı önekler ya da Hungarian gösterimi: `sp_` veya `tbl`.
|
* Tanımlayıcı önekler ya da Hungarian gösterimi: `sp_` veya `tbl`.
|
||||||
* Çoğullar—mümkün olduğunda daha doğal ve genel bir terim kullanın.
|
* Çoğullar—mümkün olduğunda daha doğal ve genel bir terim kullanın.
|
||||||
Örneğin `employees` yerine `staff` ya da `individuals` yerine `people`.
|
Örneğin `employees` yerine `staff` ya da `individuals` yerine `people`.
|
||||||
|
|
|
@ -47,7 +47,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Поганий стиль
|
### Поганий стиль
|
||||||
|
|
||||||
* CamelCase — важко швидко сканувати.
|
* camelCase — важко швидко сканувати.
|
||||||
* Описові префікси або Угорська нотація, такі як `sp_` або `tbl`.
|
* Описові префікси або Угорська нотація, такі як `sp_` або `tbl`.
|
||||||
* Множина — замість цього використовуйте більш природний збірний термін, де це можливо.
|
* Множина — замість цього використовуйте більш природний збірний термін, де це можливо.
|
||||||
Наприклад, `staff` замість `employees` або `people` замість `individuals`.
|
Наприклад, `staff` замість `employees` або `people` замість `individuals`.
|
||||||
|
|
|
@ -37,7 +37,7 @@ UPDATE file_system
|
||||||
|
|
||||||
### Nên tránh
|
### Nên tránh
|
||||||
|
|
||||||
* Tránh cách đặt tên kiểu "lạc đà" (CamelCase) - vì nó khiến tốc độ đọc chậm đi.
|
* Tránh cách đặt tên kiểu "lạc đà" (camelCase) - vì nó khiến tốc độ đọc chậm đi.
|
||||||
* Tránh cách đặt tên kiểu "ký pháp Hungary" (thêm các tiền tố thể hiện chức năng như `sp_` hoặc `tbl`)
|
* Tránh cách đặt tên kiểu "ký pháp Hungary" (thêm các tiền tố thể hiện chức năng như `sp_` hoặc `tbl`)
|
||||||
* Tránh dùng danh từ không đếm được, trong khi có thể thay thế bằng từ đếm được. Ví dụ như dùng `staff` thay vì `employees`, dùng `people` thay vì `individuals`.
|
* Tránh dùng danh từ không đếm được, trong khi có thể thay thế bằng từ đếm được. Ví dụ như dùng `staff` thay vì `employees`, dùng `people` thay vì `individuals`.
|
||||||
* Tránh đặt tên bảng/cột/biến cần dùng tới dấu ngoặc kép ". Nếu bạn buộc phải làm như thế, hãy tuân thủ phong cách SQL-92 để đoạn code tương thích tốt hơn (Thậm chí bạn sẽ có thể cần phải chỉnh sửa thiết lập của SQL server để hỗ trợ tính năng này)
|
* Tránh đặt tên bảng/cột/biến cần dùng tới dấu ngoặc kép ". Nếu bạn buộc phải làm như thế, hãy tuân thủ phong cách SQL-92 để đoạn code tương thích tốt hơn (Thậm chí bạn sẽ có thể cần phải chỉnh sửa thiết lập của SQL server để hỗ trợ tính năng này)
|
||||||
|
|
Loading…
Reference in a new issue