Created
January 25, 2023 01:27
-
-
Save brfrn169/b83d6b0430a372b3c4ae6fb243ed8c69 to your computer and use it in GitHub Desktop.
Example of Get/Scan with index (Japanese)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// backテーブルのcountryカラムのセカンダリインデックスを用いたGetクエリ | |
query BankGetWithIndex { | |
get_with_index: bank_getWithIndexOn_country(get: {indexKey : {country:"france"}}){ | |
bank {id, region_code, country} | |
} | |
} | |
// backテーブルのregion_codeカラムのセカンダリインデックスを用いたScanクエリ | |
query BankScanWithIndex { | |
scan_with_index: bank_scanWithIndexOn_region_code(scan: {indexKey: {region_code: 1}}) { | |
bank {id region_code country} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment