“Comment” yozish bo'yicha:
Umumiy:
1. Hamma commentlar faqat ingliz tilida bo'ladi.
2. “termin” lar o’z tilida yoziladi
3. “Self-Documentary” bo’lishi kerak. “Reminders” (masalan:” todo smth”), “note” kerak bo’lsa yoziladi
4. “TODO” yozishda nima ekanligi, kim yozgani va qachon yozgani yoziladi. Masalan: -- TODO: adding check to manager; owner=Sherzod date=19.09.2021
I. “Table” uchun “comment” yozish:
I.1. Har bir “table’ uchun “comment” yoziladi
I.2. “Nima ma’lumot saqlaydi?” savoliga javob berishi kerak
I.3. Masalan:
a) Dictionary – “Description of data dictionary tables and views” b) User_All_Tables – “Description of all object and relational tables owned by the user. Description of all object and relational tables owned by the user's” d) User_Audit_Object - “Audit trail records for statements concerning objects, specifically: table, cluster, view, index, sequence, [public] database link, [public] synonym, procedure, trigger, rollback segment, tablespace, role, user” (uzunligi – 211 ta belgi)
II. Column uchun “comment” yozish:
II.1. “Comment” qachon “column” “name” nima ma’lumot saqlashini to’liq ifodalay olmasa yoziladi. Masalan: Dictionary.Table_Name(“Name of the object”) “table” nomini va ularning bir qancha “synonym” nomini saqlaydi, va Dictionary.Comments(“Text comment on the object”) II.2. “Nima ma’lumot saqlaydi?” savoliga javob berishi kerak
Masalan:
“comment on column mr_products.gen_name is 'Product_Name + ''/'' + Producer_Name + ''/'' + Region_Name';”
II.3. “Option column” larga nima qiymat olishi “comment” qilinadi
II.4. “Option column” qachonki qo’shimcha ma’lumot uchun bo’lsa qo’shimcha “comment” yozilmaydi(faqat nima “value” saqlasa usha yoziladi), biznes logikaga aloqador bo’lsa (boshqa “column value” lariga ta’sir o’tkazsa) har bir “option” da nima holat bo’lishi “comment” ga qo’shiladi.
Masalan:
“comment on column md_users.gender is '(M)ale, (F)emale';” “comment on column mcg_actions.order_limit_kind is '(N)one, (F)or N orders, (A)fter N orders: (N)one - the action will not work; (F)or N orders - the action will work for N (order_limit) orders for each client; (A)fter N orders - the action will work after N (order_limit) orders for each client;';”
III. “Code” qismga “comment” yozish masalasi:
III. Module (md_pref, md_util, md_api, md_core, md_next, md_watcher …), Setup, Uit modul “package” va “script” lariga va boshqa “util script” larga commit yozish kerak.
“Comment” kerakli joyga yoziladi (Hozir: Teamleader hal qiladi yozish yoki o’zgartirish kerakligini, o’chirishni emas).
III.1. PL/SQL da “comment” yozishda, “comment” aloqador ob’ektdan oldin yoziladi. Umumiy “package” uchun esa, “package header” da “package” e’lon qilinganidan keyin boshqa ob’ekt “comment” lardan bitta “enter” farq bilan yoziladi. Masalan:
III.2. Funksiya “header” qismiga “comment” yoziladi
III.3. Funksiyalarni “header” qismiga yoziladi (ya’ni funksiya “declaration” idan oldin), unda funksiyani o’zi, nima “result” qaytarishi – “more detail” (agar “result” qaytarsa), funksiya nima ish bajarishi – biznes logikasi. Nima “argumentlar” qabul qilishi alohida yoziladi. Ketma-ketligi: “function -> purpose -> Return -> Arguments”.
Masalan:
II.4. “Code” qismga “pref” da “exception” yoki logik jihatdan “constant” olingan bo'lsa “comment” yozish. Masalan: “md_pref” da “User Admin” va “System User” tushunchadan foydalanilgan.
“Code” qismda biznes logikaga aloqador “block” bo'lsa shunga “comment” yoziladi (Hozir: Teamleader hal qiladi yozish yoki o’zgartirish kerakligini, o’chirishni emas).