Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SQLFormatter written in Go

pongzu
May 18, 2019

SQLFormatter written in Go

SQLを整形するツールを作った経緯やその実装手順についてまとめました。

pongzu

May 18, 2019
Tweet

More Decks by pongzu

Other Decks in Technology

Transcript

  1. 42-'PSNBUUFS
    XSJUUFOJO(P
    QPOH[V

    View full-size slide

  2. NF
    w /BNF:V5BOBLB
    w 5XJUUFS!@QPOH[V
    w (JU)VCIUUQTHJUIVCDPNQPOH[V
    w $PNQBOZ,BONV *OD

    TPGUXBSFFOHJOFFSJOUFSO

    View full-size slide

  3. XIBUJTHPTRMGNUʁ
    w IUUQTHJUIVCDPNLBONVHPTRMGNU
    w (PϑΝΠϧ಺ͷ42-จΛ౷Ұͨ͠ϑΥʔϚοτʹ੔ܗ
    w 1PTUHSF42-ʹରԠ

    View full-size slide

  4. #BDLHSPVOE
    w ΧϯϜͰ͸ɺٕज़બఆͷ݁Ռɺ"1*αʔόͷ%#ΞΫηεͷ
    ࣮૷Ͱɺ௚઀42-Λॻ͘

    View full-size slide

  5. #BDLHSPVOE
    w ݟͨ໨ʹ౷Ұײ͕ͳ͍
    w ͲͷϑΥʔϚοτϧʔϧʹै͏͔ߟ͑Δ͕࣌ؒແବʹͳΔ

    View full-size slide

  6. IPX
    w 42-จΛݟ͚ͭΔ
    w UPLFOJ[F͢Δ
    w QBSTF͢Δ
    w JOEFOU͢Δ

    View full-size slide

  7. 42-Λݟ͚ͭΔ

    View full-size slide

  8. UPLFOJ[F
    w จࣈྻΛจࣈͣͭεΩϟϯ

    w ҙຯͷ͋Δࣝผࢠ͝ͱʹUPLFOJ[F͢Δ

    ྫʣ4&-&$5 '30.

    View full-size slide

  9. QBSTF
    w Πϯσϯτ͢Δ୯ҐͰ͋Δ42-۟͝ͱʹτʔΫϯΛ෼཭
    ʢάϧʔϐϯάʣ͢Δɻ

    ྫʣ4&-&$5͕ݱΕͨΒɺ'30.͕ݱΕΔ·Ͱͷτʔ
    ΫϯΛ4&-&$5άϧʔϓͱ͢Δ

    w άϧʔϓ಺ͰߋʹΩʔϫʔυ͕ݱΕͨ৔߹͸࠶ؼతʹॲཧ
    Λ͠ɺωετ͞Εͨ42-ʹ΋ରԠ͢Δ

    View full-size slide