TypeScript と ORM / ORM with TypeScript

TypeScript と ORM / ORM with TypeScript

309384d4f7b37d3532fd81800d356bcf?s=128

dojineko

June 18, 2019
Tweet

Transcript

  1. !EPKJOFLP(.01FQBCP *OD 'VLVPLBUT 5ZQF4DSJQUͱ03.

  2. ΑΖͣ԰݉੩తܕ෇͚͓͡͞Μ !EPKJOFLP

  3. ࠷ۙͷൃද΋5ZQF4DSJQUͩΒ͚ ੩తܕ෇͚͓͡͞ΜͳͷͰɺฐࣾ಺Ͱͷ5ZQF4DSJQUීٴ׆ಈʹ೔ʑ҉༂͍ͯ͠·͢ɻ IUUQTTQFBLFSEFDLDPNEPKJOFLP

  4. ͱ͍͏ ϫέͰ

  5. 5ZQF4DSJQU͔Β࢖͑Δ 03.ʹ͍ͭͯ͝঺հ͠·͢

  6. ໨࣍ 4FRVFMJ[Fͱ͸ 4FRVFMJ[Fͷ5ZQF4DSJQUαϙʔτঢ়گ 5ZQF4DSJQUͰ͏·͘΍͍ͬͯ͘ํ๏ 4FRVFMJ[F$-*ͷ5ZQF4DSJQUରԠঢ়گ 5ZQF03.ͱͷൺֱ ·ͱΊ

  7. None
  8. 4FRVFMJ[Fͱ͸ʁ w/PEFKTͰݹ͔͘Β࢖͑Δ03. OQN্࠷ݹͷϦϦʔε͸೥લ  w.Z42-ɺ.BSJB%#ɺ1PTUHSF42-ɺ.442-ɺ42-JUFʹରԠ w೔ຊޠɺӳޠؚΊࣄྫ΍৘ใ͕๛෋ʂࣄྫ͕ଟ͍ w࣮࣭ϑΝΫτελϯμʔυ ˞ཁग़య

  9. W͔Β5ZQF4DSJQUΛਖ਼ࣜʹαϙʔτ wW͔Β5ZQF4DSJQUΛਖ਼ࣜʹαϙʔτ։࢝ʂ wܕఆ͕ٛެࣜύοέʔδ͔Βڙڅ͞ΕΔΑ͏ʹʂ w͔͠͠ɾɾɾ

  10. W͔Β5ZQF4DSJQUΛਖ਼ࣜʹαϙʔτ ɾɾɾ 4FRVFMJ[F͸࣮ߦ࣌ʹϓϩύςΟͷׂΓ౰ͯΛߦ͏͜ͱʹɺ͔ͳΓ ґଘ͍ͯ͠ΔͷͰɺ5ZQF4DSJQU͸ͦͷ··Ͱ͸͋·Γ໾ʹཱͪ·ͤΜɻ ϞσϧΛ࣮ߦՄೳʹ͢Δʹ͸ɺ͔ͳΓͷྔͷखಈܕએݴ͕ඞཁͰ͢ɻ

  11. ਖ਼ࣜରԠͬͯݴͬͨ͡ΌΜʂ ٽ

  12. ެࣜͷ5ZQF4DSJQUͰͷॻ͖ํ $MBTT൛

  13. ʲࢀߟʳ+BWB4DSJQUͰͷϞσϧఆٛ wʮDMBTT1SPKFDUFYUFOET.PEFMʯͰଘࡏΛએݴ w1SPKFDUJOJUͰத਎Λ࣮ߦ࣌ʹධՁ͠૊ΈࠐΜͰ͍Δ wܕਪ࿦ͳͲͳ͍ੈքͳͷͰ͜ΕͰ͓͠·͍ʜ

  14. $MBTT൛αϯϓϧͷൈਮ 4FRVFMJ[F.PEFMΛ&YUFOEͯ͠ϝϯόʔΛఆٛɻ ίίͰఆٛͨ͠%#ͷΧϥϜʹରԠ͢Δϝϯόʔ͸ɺ $POTUSVDUPSͰ͸ϝϯόʔͷॳظԽ͕ग़དྷͳ͍ɻ ʜͷͰʮʯΛ෇༩ͯ͠ະॳظԽϝϯόʔΛڐ༰͢Δ Ϟσϧͷ4UBUJD.FUIPEͷJOJUϝιουΛݺͼग़ͯ͠ %#ͷΧϥϜͱϝϯόʔͷରԠ෇Λ࣮ߦ࣌ʹඥ෇͚Δɻ ͜Ε͸Ϋϥεͷએݴͱ͸·ͨผʹߦ͏ඞཁ͕͋Δ ϚχϡΞϧͷ࣮ߦ࣌ʹґଘ͢Δͱ͍͏ͷ͸ओʹ͜ͷ఺

  15. Πϝʔδ $MBTTFYUFOET.PEFM 4FRVFMJ[FJOJU .PEFM ˙ίϯύΠϧϑΣʔζ੩తղੳɺܕਪ࿦ ˙ϥϯλΠϜϑΣʔζ4FRVFMJ[Fͷಈ࡞Λܾఆ͢Δ

  16. ެࣜͷ5ZQF4DSJQUͰͷॻ͖ํ EFpOF൛ JOUFSGBDFΛॻ͍ͯϝϯόʔͷଘࡏΛએݴ 4FRVFMJ[Fͷ༷ࣜʹԊ͏ͨΊ4UBUJDઐ༻ܕΛએݴ ࣮ߦ࣌ʹ4FRVFMJ[FͷϞσϧΛએݴ

  17. ެࣜͷ5ZQF4DSJQUରԠͷ՝୊఺ wલఏͱͯ͠ɺ4FRVFMJ[F͕Ϟσϧͷఆٛ΍ؔ࿈෇͚Λ࣮ߦ࣌ʹ
 ΞάϨογϒʹॲཧ͢Δઃܭ ޙํޓ׵ͷͨΊͱࢥΘΕΔ  w5ZQF4DSJQUͰॻ͍ͨͱ͖ʹɺΫϥεͰϞσϧΛએݴͰ͖Δ͕ɺ
 %#ͷΧϥϜͷώϞ෇͸ผʹߦ͏ඞཁ͕͋Δ wએݴͨ͠ϞσϧΛ4FRVFMJ[FͰ࢖༻͢ΔͨΊͷಓͷΓ͕ԕ͘
 ͦ΋ͦ΋5ZQF4DSJQU͕Θ͔͍ͬͯͳ͍ͱֶशίετ͕ߴ͍ wޓ׵ੑͷͨΊʹ࢒͞ΕͨҰ෦ͷػೳ͕ܕ҆શʹͳΒͳ͍৔߹͕͋Δ

  18. ͭΒ͍

  19. ΋͏ͪΐͬͱ͍͍ײ͡ʹ΍Γ͍ͨʜ

  20. TFRVFMJ[FUZQFTDSJQU

  21. TFRVFMJ[FUZQFTDSJQUͱ͸ w4FRVFMJ[FͷϞσϧͷ࣮૷Λɺ%FDPSBUPSΛۦ࢖ͭͭ͠
 ΄΅ΫϥεͷએݴͷΈͰ࣮ݱ͢ΔϥΠϒϥϦ wґଘͷ௥Ճͱ5ZQF4DSJQUͷઃఆมߋͰಋೖՄೳ wSFqFDUNFUBEBUBύοέʔδͷ௥Ճ wUTDPOpHKTPOͰFYQFSJNFOUBM%FDPSBUPSTΛ༗ޮ wSFGIUUQTHJUIVCDPN3PCJO#VTDINBOOTFRVFMJ[FUZQFTDSJQU

  22. ͪͳΈʹʜ wSFqFDUNFUBͱ͸ʁ w ʮ.FUBEBUB3FqFDUJPO"1*ʯΛ࣮ݱ͢Δ1PMZpMM w $΍+BWBͷΑ͏ʹσίϨʔλΛ࢖༻ͯ͠ɺΫϥε΍ؔ਺ʹɺ
 ଐੑ΍஫ऍͳͲͷϝλσʔλΛ෇༩औಘ͢Δػߏ w 1SPQPTBMͳͷͰݱ࣌఺Ͱ͸ඇެࣜͳػೳ wFYQFSJNFOUBM%FDPSBUPSTͱ͸ʁ

    w &$."4DSJQU4UBHFͷ1SPQPTBM w Ϋϥε΍ؔ਺ʹػೳΛʮ௥Ճʯ͢Δ͜ͱ͕Ͱ͖Δ
  23. Ϟσϧͷఆٛ $MBTTʹΑͬͯϞσϧΛఆٛͰ͖ɺΧϥϜͱͷώϞ෇΋ %FDPSBUPSͰߦ͑ΔͷͰɺએݴͱJOJUΛΘ͚ͯߦ͏ΑΓ΋؆୯ʂ

  24. Ϟσϧͷొ࿥ 4FRVFMJ[FͷॳظԽ͸TFRVFMJ[FUZQFTDSJQU͕΍ͬͯ͘ΕΔɻ ઃఆ͸ڞ௨  େຊ͕4FRVFMJ[FͳͷͰ΍͸Γ࣮ߦ࣌ʹϞσϧͷొ࿥͕ඞཁ͕ͩɺ 4FRVFMJ[Fຊମͷ΍Γํͱൺֱ͔ͯ͠ͳΓ؆ུԽ͞Ε͍ͯΔɻ ˞5ZQF4DSJQUͷόʔδϣϯʹΑͬͯ͸54ͰϏϧυΤϥʔʹͳΔ৔߹͕͋Γ·͢
 BEE.PEFMTʹ౉͢഑ྻͷܕΛʮBOZ<>ʯʹΩϟετ͢ΔͱճආͰ͖·͢

  25. 4FRVFMJ[F$-* ϚΠάϨʔγϣϯ΋͋ΔΑ

  26. 4FRVFMJ[F$-*ͱ͸ʁ w4FRVFMJ[FͷαϒϓϩδΣΫτͷίϚϯυϥΠϯπʔϧ wNJHSBUJPO΍TFFEΛ/PEFKT͔Βߦ͏͜ͱ͕Ͱ͖Δ w"DUJWF3FDPSEΆ͍งғؾ w͔͠͠ɾɾɾ

  27. 4FRVFMJ[F$-*ͷؾʹͳΔͱ͜Ζ wNJHSBUJPO΍TFFEͰ࢖͑ΔએݴϑΝΠϧ͸+BWB4DSJQUͷΈ w5ZQF4DSJQUͰॻ͖͍ͨ৔߹͸UTDͰࣄલʹίϯύΠϧ͕ඞཁ wඪ४ͰͷରԠ͸1VMM3FRVFTUʹͳ͍ͬͯΔ༷ࢠ w͋͘·Ͱ͓·͚ͬΆ͍ͷͰɺෳ਺ͷ%#ͷछผΛ
 ԣஅ͠ͳ͍৔߹͸ଞͷखஈΛݕ౼ͯ͠΋͍͍͔΋ʁ w ྫ͑͹ɺHPMBOHNJHSBUFNJHSBUFͳͲͷ5JOZͳ࢓૊ΈͳͲ

  28. None
  29. 5ZQF03.ͱͷൺֱ w5ZQF03.͸5ZQF4DSJQUͰॻ͘͜ͱΛલఏʹॻ͔Εͨ03. w࣮ߦ࣌ͷධՁΛલఏͱ͍ͯ͠ͳ͍ͷͰ੩తղੳͳͲͱͷ૬ੑόπάϯ wTFRVFMJ[FUZQFTDSJQUͱಉ͘͡ΫϥεͱσίϨʔλʹΑΔϞσϧ࣮૷ w&$."4DSJQUͷ࠷৽ͷػೳΛΞάϨογϒʹऔΓࠐΜͰ͍Δ܏޲

  30. 5ZQF03.͸ɺ/PEF+4ɺϒϥ΢βɺ$PSEPWBɺ1IPOF(BQɺ*POJDɺ3FBDU/BUJWFɺ /BUJWF4DSJQUɺ&YQPɺ͓Αͼ&MFDUSPOϓϥοτϑΥʔϜͰ࣮ߦͰ͖Δ03.Ͱ͋Γɺ 5ZQF4DSJQU͓Αͼ+BWB4DSJQUʢ&4ɺ&4ɺ&4ɺ&4ʣͱڞʹ࢖༻Ͱ͖·͢ɻͦͷ໨ඪ͸ɺ ৗʹ࠷৽ͷ+BWB4DSJQUػೳΛαϙʔτ͠ɺσʔλϕʔεΛ࢖༻͢Δ͋ΒΏΔछྨͷΞϓϦέʔ γϣϯΛ։ൃ͢Δͷʹ໾ཱͭ௥ՃػೳΛఏڙ͢Δ͜ͱͰ͢ɻςʔϒϧ͕গͳ͍খن໛ΞϓϦ έʔγϣϯ͔Βෳ਺σʔλϕʔε͕͋Δେن໛ΤϯλʔϓϥΠζΞϓϦέʔγϣϯ·Ͱɻ 5ZQF03.ͷϞνϕʔγϣϯ

  31. 4FRVFMJ[Fͱ5ZQF03.Ͳ͕͍͍ͬͪͷʁ w৽نҊ݅Ͱ͋Ε͹5ZQF03.ʹνϟϨϯδ͢ΔՁ஋͸͋Γ w5ZQF4DSJQUͰॻ͔ΕΔ͜ͱ͕ϕʔεʹͳ͍ͬͯΔͷͰϋϚΓʹ͍͘ wͨͩɺ৘ใ͕ൺֱతগͳΊͰ͢ w҆ఆੑ΍τϥϒϧγϡʔτɺपลπʔϧΛॏࢹ͢ΔͳΒ4FRVFMJ[F w4FRVFMJ[Fͷࢿ࢈͕͢Ͱʹ͋ΔͳΒɺTFRVFMJ[FUZQFTDSJQUΛ ௥Ճ͢Ε͹5ZQF03.MJLFͷΑ͏ͳ͜ͱ͸Ͱ͖·͢ wνʔϜͷ੒ख़౓΍5ZQF4DSJQUͷཧղ౓ʹԠͯ͡બఆ͠·͠ΐ͏ʂ

  32. (PPHMF5SFOETͰͷൺֱ

  33. ·ͱΊ w4FRVFMJ[F͸/PEFKTͰͷ03.ͷ࿝ฮ wW͔Β5ZQF4DSJQUਖ਼ࣜαϙʔτ ͔ͭ͠͠Β͍ͱ͜Ζ΋͋Δʜ  w5ZQF4DSJQUͰ4FRVFMJ[F࢖͏ͳΒTFRVFMJ[FUZQFTDSJQUΦεεϝ wNJHSBUJPOʹTFRVFMJ[FDMJΛ࢖͏ͷ͸͋͘·ͰΦϓγϣϯ wผͷϚΠάϨʔγϣϯπʔϧΛ࢖ͬͯ΋શવ0,ʂ w৽نҊ݅͸5ZQF03.΋ݕ౼ͯ͠ΈΑ͏ʂ w

    ૬ޓʹҠߦ͕Ͱ͖Δ΋ͷ͔͸ݕূதଟ෼ΤΠϠοͱ΍Δඞཁ͋Γ
  34. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠