コメントの書き方について

E866e3d85756de6fcc8ff5fd2c9c6e67?s=47 Yudai Suzuki
September 19, 2013

 コメントの書き方について

社内勉強会用

E866e3d85756de6fcc8ff5fd2c9c6e67?s=128

Yudai Suzuki

September 19, 2013
Tweet

Transcript

  1. ίϝϯτͷ ॻ͖ํʹ͍ͭͯ ͪΐͬͱݴ͍͍ͨ 13೥9݄19೔໦༵೔

  2. όον܈Λ Ҡ২ͯ͠Δ࣌ʹ ࢥͬͨࣄ 13೥9݄19೔໦༵೔

  3. ҙຯͷແ͍ ίϝϯτ͕ଟ͍ 13೥9݄19೔໦༵೔

  4. hoge.sql ---------------------------------------------- -- SCHEMA1 SET INSERT ---------------------------------------------- insert into schema1.table

    select … 13೥9݄19೔໦༵೔
  5. insertͯ͠Δͷ͸ݟΓΌΘ͔Δɻ ͱ͍͏͔ɺSETͯԿʁ ஌Γ͍ͨͷ͸ɺ SCHEMA1.tableʹ Ͳ͏͍͏σʔλΛೖΕ͍ͨͷ͔ 13೥9݄19೔໦༵೔

  6. hoge.sql -- 20070222 HOGE YUUSEN LOAD DATA INFILE ‘hoge.csv’ INTO

    TABLE schema.table; LOAD DATA INFILE ‘web_hoge.csv’ IGNORE INTO TABLE schema.table; LOAD DATA INFILE ‘mob_hoge.csv’ IGNORE INTO TABLE schema.table; 13೥9݄19೔໦༵೔
  7. ஌Γ͍ͨͷ͸ɺͳͥ”hoge.csv”Λ ༏ઌͯ͠load͢Δඞཁ͕͋Δͷ͔ 13೥9݄19೔໦༵೔

  8. hoge.sh DB_NAME=hoge # db2 connect db2 connect to ${DB_NAME} 13೥9݄19೔໦༵೔

  9. ݟΓΌΘ͔Δ… 13೥9݄19೔໦༵೔

  10. hoge.sh # 2013-09-11 add john doe start … # 2013-09-11

    add john doe end 13೥9݄19೔໦༵೔
  11. όʔδϣϯ؅ཧγεςϜ࢖͑ʂ 13೥9݄19೔໦༵೔

  12. 13೥9݄19೔໦༵೔

  13. ҙຯͷ͋Δ ίϝϯτͷ ॻ͖ํͱ͸ʁ 13೥9݄19೔໦༵೔

  14. 1.ίʔυͷҙਤΛॻ͘ 13೥9݄19೔໦༵೔

  15. ίϝϯτͱ͸ɺίʔυΛॻ͍͍ͯΔ࣌ʹ ߟ͍͑ͯͨࣄΛಡΈखʹ఻͑Δ ͨΊͷ΋ͷ 13೥9݄19೔໦༵೔

  16. ίʔυͷಈ࡞Λͦͷ··ॻ͍͍ͯΔ ͚ͩͰ͸ҙຯ͕ແ͍ 13೥9݄19೔໦༵೔

  17. hoge.sql -- 20070222 HOGE YUUSEN LOAD DATA INFILE ‘hoge.csv’ INTO

    TABLE schema.table; LOAD DATA INFILE ‘web_hoge.csv’ IGNORE INTO TABLE schema.table; LOAD DATA INFILE ‘mob_hoge.csv’ IGNORE INTO TABLE schema.table; 13೥9݄19೔໦༵೔
  18. hoge.sql /* * AॲཧޙͷσʔλΛਖ਼ͱͯ͠ѻ͍͍ͨͨΊɺ * hoge.csvΛઌʹload͠ɺAॲཧલͷσʔλͱͯ͠औಘ͞ΕΔ * webɺmobͷσʔλ͸ϩʔυ͠ͳ͍Α͏ʹ͓ͯ͘͠ */ LOAD

    DATA INFILE ‘hoge.csv’ INTO TABLE schema.table; LOAD DATA INFILE ‘web_hoge.csv’ IGNORE INTO TABLE schema.table; LOAD DATA INFILE ‘mob_hoge.csv’ IGNORE INTO TABLE schema.table; 13೥9݄19೔໦༵೔
  19. hoge.sql ---------------------------------------------- -- SCHEMA1 SET INSERT ---------------------------------------------- insert into schema1.table

    select … 13೥9݄19೔໦༵೔
  20. hoge.sql -- Aॲཧલͷड஫৘ใΛऔಘ͢Δ insert into schema1.table select … 13೥9݄19೔໦༵೔

  21. Ⅱ.ίʔυ͔Β͙͢ʹ ෼͔Δࣄ͸ॻ͔ͳ͍ 13೥9݄19೔໦༵೔

  22. hoge.sh DB_NAME=hoge # db2 connect db2 connect to ${DB_NAME} 13೥9݄19೔໦༵೔

  23. Ⅲ.ࣗ෼ͷߟ͑Λ ه࿥͢Δ 13೥9݄19೔໦༵೔

  24. # ͜ͷΫϥε͸Ԛ͘ͳ͖ͬͯͯΔ # αϒΫϥε࢖ͬͯ੔ཧͨ͠΄͏͕Αͦ͞͏ 13೥9݄19೔໦༵೔

  25. # TODO: john doe # jpgҎ֎ͷϑΥʔϚοτʹ΋ରԠ͢Δ 13೥9݄19೔໦༵೔

  26. ίπɿ Կ͕͍ͨ͠ͷ͔Λॻ͘ 13೥9݄19೔໦༵೔

  27. ࢀߟɿ Ϧʔμϒϧίʔυ http://www.oreilly.co.jp/ books/9784873115658/ 13೥9݄19೔໦༵೔