Skip to content

Instantly share code, notes, and snippets.

@brfrn169
Created January 25, 2023 01:27
Show Gist options
  • Save brfrn169/b83d6b0430a372b3c4ae6fb243ed8c69 to your computer and use it in GitHub Desktop.
Save brfrn169/b83d6b0430a372b3c4ae6fb243ed8c69 to your computer and use it in GitHub Desktop.
Example of Get/Scan with index (Japanese)
// 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