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

DynamoDBでQuery

C8edb724205443e8bfc3fa8663588041?s=47 jacoyutorius
February 22, 2020

 DynamoDBでQuery

Hamamatsu.js #8のLT資料です

C8edb724205443e8bfc3fa8663588041?s=128

jacoyutorius

February 22, 2020
Tweet

More Decks by jacoyutorius

Other Decks in Technology

Transcript

  1. "NB[PO%ZOBNP%#Ͱݕࡧ͢Δ !KBDPZVUPSJVT )BNBNBUTVKT

  2. খ໦༔ే !KBDPZVUPSJVT ‣ ΤΞʔζגࣜձࣾ ‣ +"846()BNBNBUTVSC ‣ 3VCZ3VCZPO3BJMT+BWBTDSJQU"84 ࠷ۙ͸ࣗ࡞ΩʔϘʔυͱΧϨʔ࡞ΓʹϋϚ͍ͬͯΔ

  3. None
  4. None
  5. +4͸ύΠϓ໓ଟʹ࢖Θͳ͍͔Βେৎ෉ͩΖଟ෼

  6. "NB[PO%ZOBNP%# ‣ ϑϧϚωʔδυͳ/P42-σʔλϕʔε ‣ ߴՄ༻ੑ ͭͷ";΁ͷϨϓϦέʔγϣϯ  ‣ ΩʔόϦϡʔετΞ ‣

    εΩʔϚϨε ‣ ΩϟύγςΟϢχοτ ‣ ಡΈॻ͖ੑೳΛܾఆ͢Δύϥϝʔλ ‣ lΦϯσϚϯυzͱ͍͏Φϓγϣϯ΋͋Δɻ"NQMJGZΛ௨ͯ͠%ZOBNP%#ͷςʔϒϧ Λ࡞ͬͨ৔߹ɺσϑΥϧτͰͪ͜ΒͷΦϓγϣϯ͕༗ޮʹͳΔ
  7. %ZOBNP%#ͷݕࡧ ‣ RVFSZ ‣ TDBO ςʔϒϧશମΛεΩϟϯͯ͠৚݅ʹ߹க͢Δ΋ͷΛฦ͢ ύʔςΟγϣϯΩʔιʔτΩʔΛࢦఆͯ͠৚݅ʹ߹க͢Δ΋ͷ Λநग़͢Δ ॊೈͳݕࡧ͕ՄೳͳҰํɺ%#΁ͷෛՙ͕ߴ͘ύϑΥʔϚϯε΋ྑ͘ͳ͍

  8. ΍Γ͔ͨͬͨ͜ͱ ‣ %ZOBNP%#Ͱݕࡧ ‣ ύʔςΟγϣϯΩʔ ιʔτΩʔΛ࢖͏

  9. ΍͍ͬͯͳ͍͜ͱ ‣ ΩϟύγςΟϢχοτͷࢼࢉ ‣ ྉۚ

  10. EPDLFSDPNQPTFZNM

  11. ‣ %ZOBNP%#"ENJO ‣ IUUQMPDBMIPTU ‣ EBUBCBTFFOEQPJOU ‣ IUUQMPDBMIPTU %ZOBNP%#ΛϩʔΧϧͰىಈ

  12. None
  13. ॅॴ$% ౎ಓ෎ݝ$% ࢢ۠ொଜ$% ொҬ$% ༣ศ൪߸ ࣄۀॴϑϥά ഇࢭϑϥά ౎ಓ෎ݝ ౎ಓ෎ݝΧφ ࢢ۠ொଜ

    ࢢ۠ொଜΧφ        ੩Ԭݝ γζΦΧέϯ ඿দࢢத۠ ϋϚϚπγφ ΧΫ        ੩Ԭݝ γζΦΧέϯ ඿দࢢத۠ ϋϚϚπγφ ΧΫ ொҬ ொҬΧφ ொҬิ଍ ژ౎௨Γ໊ ࣈஸ໨ ࣈஸ໨Χφ ิ଍ ࣄۀॴ໊ ࣄۀॴ໊Χ φ ࣄۀॴॅॴ ৽ॅॴ$% ஁໶ொ ΧδϚν יߐ ΧϞΤ ඿দࢢอ݈ॴ ϋϚϚπγϗ έϯδϤ יߐ̎ஸ໨̍ ̍—̎ ॅॴKQ IUUQKVTZPKQ
  14. 1,Ͱݕࡧ͢Δ ॅॴ$% ॅॴ ॅॴΧφ  ੩Ԭݝ඿দࢢத۠יߐொ γζΦΧέϯϋϚϚπγφΧΫΧϞΤνϣ΢  ੩Ԭݝ඿দࢢத۠יߐொத෦ిྗɹʢגʣɹ඿দӦۀॴיߐொ̎ ̎—̍

    γζΦΧέϯϋϚϚπγφΧΫΧϞΤνϣ΢νϢ΢ϒσϯϦϤΫɹʢΧϒʣɹ ϋϚϚπΤΠΪϤ΢γϤ
  15. ύʔςΟγϣϯΩʔࢦఆʹΑΔݕࡧ݁Ռ

  16. ύʔςΟγϣϯΩʔࢦఆʹΑΔݕࡧ݁Ռ

  17. 1,4,Ͱݕࡧ͢Δ

  18. https:/ /docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/ LegacyConditionalParameters.KeyConditions.html “ςʔϒϧʹର͢ΔΫΤϦͷ৔߹ɺςʔϒϧͷϓϥΠϚϦΩʔଐੑͷΈ ͷ৚݅Λ࣋ͭ͜ͱ͕Ͱ͖·͢ɻEQ ৚݅ͱͯ͠ύʔςΟγϣϯΩʔͷ໊ લͱ஋Λఏڙ͢Δඞཁ͕͋Γ·͢ɻ ΦϓγϣϯͰɺιʔτΩʔΛࢀর͢Δ 2 ൪໨ͷ৚݅ΛࢦఆͰ͖·͢ɻ”

    RVFSZͷ੍ݶ
  19. https:/ /docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/ LegacyConditionalParameters.KeyConditions.html KeyConditions ͷ৔߹ɺ࣍ͷൺֱԋࢉࢠͷΈ͕αϙʔτ͞Ε͍ͯ·͢ɻ EQ | LE | LT

    | GE | GT | BEGINS_WITH | BETWEEN RVFSZͷ੍ݶ
  20. IUUQTEPDTBXTBNB[PODPNKB@KQBNB[POEZOBNPECMBUFTUEFWFMPQFSHVJEF)PX*U8PSLT1BSUJUJPOTIUNM

  21. ࢁསݝ ੩Ԭݝ Ѫ஌ݝ ʜ ੩ԬࢢѮ۠ ੩Ԭࢢਗ਼ਫ۠ ʜ ඿দࢢத۠ ඿দࢢ੢۠ ʜ

    ஁໶ொ ࠠ԰ொ ʜ יߐ ݩ඿ொ ʜ FY TFMFDUCPYͰυϦϧμ΢ϯ͢ΔΑ͏ͳ6*
  22. (4* ‣ ςʔϒϧ࡞੒࣌ʹࢦఆ͢Δ1,4,ͱ͸ผʹఆٛͰ͖ΔΠϯσοΫε ‣ Ұͭͷςʔϒϧʹ͖ͭɺ࠷େͭͷ(4*͕ొ࿥Մೳ ‣ (4*͝ͱʹΩϟύγςΟϢχοτͷઃఆ͕ඞཁ ‣ (4*͸ςʔϒϧͷࣹӨɻϨίʔυͷొ࿥௚ޙʹ(4*΁ݕࡧΛ͔͚ͯ΋͙͢ʹ ൓ө͞Ε͍ͯͳ͍৔߹͕͋Δ

    άϩʔόϧηΧϯμϦΠϯσοΫε
  23. ॅॴ$% ౎ಓ෎ݝ $% ࢢ۠ொଜ $% ொҬ$% ༣ศ൪߸ ࣄۀॴϑϥ ά ഇࢭϑϥά

    ౎ಓ෎ݝ ౎ಓ෎ݝΧ φ ࢢ۠ொଜ ࢢ۠ொଜΧ φ ொҬ ொҬΧφ         ੩Ԭݝ γζΦΧέ ϯ ඿দࢢத۠ ϋϚϚπγ φΧΫ יߐ ΧϞΤ DBUFHPSZ WBMVF DJUZ ඿দࢢத۠ DBUFHPSZ WBMVF QSFGFDUVSF ੩Ԭݝ DBUFHPSZ WBMVF UPXO יߐ
  24. ॅॴ$% DBUFHPSZ DBUFHPSZ@WBMVF ౎ಓ෎ݝ ࢢ۠ொଜ ொҬ  QSFGFDUVSF ੩Ԭݝ ੩Ԭݝ

       DJUZ ੩Ԭݝ඿দࢢத۠  ඿দࢢத۠   UPXO ੩Ԭݝ඿দࢢத۠יߐ   יߐ 1, 4, ॅॴ$% ౎ಓ෎ݝ $% ࢢ۠ொଜ $% ொҬ$% ༣ศ൪߸ ࣄۀॴϑϥ ά ഇࢭϑϥά ౎ಓ෎ݝ ౎ಓ෎ݝΧ φ ࢢ۠ொଜ ࢢ۠ொଜΧ φ ொҬ ொҬΧφ         ੩Ԭݝ γζΦΧέ ϯ ඿দࢢத۠ ϋϚϚπγ φΧΫ יߐ ΧϞΤ
  25. ॅॴ$% DBUFHPSZ DBUFHPSZ@WBMVF ౎ಓ෎ݝ ࢢ۠ொଜ ொҬ  QSFGFDUVSF ੩Ԭݝ ੩Ԭݝ

       DJUZ ੩Ԭݝ඿দࢢத۠  ඿দࢢத۠   UPXO ੩Ԭݝ඿দࢢத۠יߐ   יߐ 1, 4, 1, 4, ॅॴ$% DBUFHPSZ DBUFHPSZ@WBMVF ౎ಓ෎ݝ ࢢ۠ொଜ ொҬ  QSFGFDUVSF ੩Ԭݝ ੩Ԭݝ    DJUZ ੩Ԭݝ඿দࢢத۠  ඿দࢢத۠   UPXO ੩Ԭݝ඿দࢢத۠יߐ   יߐ (4*
  26. (4*ύʔςΟγϣϯΩʔࢦఆʹΑΔݕࡧ݁Ռ

  27. (4*ύʔςΟγϣϯΩʔιʔτΩʔࢦఆʹΑΔ લํҰகݕࡧ݁Ռ

  28. (4*ύʔςΟγϣϯΩʔιʔτΩʔࢦఆʹΑΔݕࡧ݁Ռ

  29. ࢁསݝ ੩Ԭݝ Ѫ஌ݝ ʜ ੩ԬࢢѮ۠ ੩Ԭࢢਗ਼ਫ۠ ʜ ඿দࢢத۠ ඿দࢢ੢۠ ʜ

    ஁໶ொ ࠠ԰ொ ʜ יߐ ݩ඿ொ ʜ FY TFMFDUCPYͰυϦϧμ΢ϯ͢ΔΑ͏ͳ6*
  30. %ZOBNP%#σʔλϞσϦϯάދͷר IUUQNBSDZIBUFOBCMPHDPNFOUSZ ͷ΅Γʔ͞ΜͷΫϥ΢υΠϯϑϥ1PEDBTUʰ5SBDLরҪ͞Μͷ 4FSWFSMFTTΞʔΩςΫτࢦೆͱɺ1BUSFPOొ࿥ͷ͓஌ΒͤʱͷϝϞ IUUQTDMPVEJOGSBBVEJPUSBDLEGFD %ZOBNP%#Λ࢖༻ͨ͠ઃܭͱΞʔΩςΫνϟͷઃܭʹؔ͢ΔϕετϓϥΫςΟε IUUQTEPDTBXTBNB[PODPNKB@KQBNB[POEZOBNPECMBUFTUEFWFMPQFSHVJEFCFTU QSBDUJDFTIUNM

  31. None
  32. None
  33. None
  34. "84&YQFSU0OMJOF+"846(඿দ"84ษڧձ IUUQTKBXTVHIBNBNBUTVEPPSLFFQFSKQFWFOUT +"846(඿দ"84ษڧձ IUUQTKBXTVHIBNBNBUTVEPPSLFFQFSKQFWFOUT +"84%":4 IUUQTKBXTEBZTKBXTVHKQ