Created
January 25, 2023 01:25
-
-
Save brfrn169/ee516b3d5b0de6fdbd72f0cb87b97fe3 to your computer and use it in GitHub Desktop.
Example of Get/Scan with index
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
// Get query with a secondary index on the “country” column of the “back” table | |
query BankGetWithIndex { | |
get_with_index: bank_getWithIndexOn_country(get: {indexKey : {country:"france"}}){ | |
bank {id, region_code, country} | |
} | |
} | |
// Scan query with a secondary index on the “region_code” column of the “bank” table | |
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