Skip to content

Instantly share code, notes, and snippets.

@winebarrel
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save winebarrel/cdfc59ff6188b1e49027 to your computer and use it in GitHub Desktop.
Save winebarrel/cdfc59ff6188b1e49027 to your computer and use it in GitHub Desktop.
ap-northeast-1> .debug true
ap-northeast-1> /* Normal Query Action */
ap-northeast-1> select * from employees where emp_no = 75104;
---request begin---
Action: Query
{
"TableName": "employees",
"KeyConditions": {
"emp_no": {
"ComparisonOperator": "EQ",
"AttributeValueList": [
{
"N": "75104"
}
]
}
}
}
---request end---
---response begin---
{
"Count": 1,
"Items": [
{
"first_name": {
"S": "Yishay"
},
"gender": {
"S": "M"
},
"birth_date": {
"S": "1957-01-19"
},
"emp_no": {
"N": "75104"
},
"last_name": {
"S": "Pavlopoulou"
},
"hire_date": {
"S": "1985-03-10"
}
}
],
"ScannedCount": 1
}
---response end---
[
{"birth_date":"1957-01-19","emp_no":75104,"first_name":"Yishay","gender":"M","hire_date":"1985-03-10","last_name":"Pavlopoulou"}
]
// 1 row in set (0.04 sec)
ap-northeast-1> /* Using QueryFilter */
ap-northeast-1> select * from employees where emp_no = 75104 having first_name in ("Yishay");
---request begin---
Action: Query
{
"TableName": "employees",
"KeyConditions": {
"emp_no": {
"ComparisonOperator": "EQ",
"AttributeValueList": [
{
"N": "75104"
}
]
}
},
"QueryFilter": {
"first_name": {
"ComparisonOperator": "IN",
"AttributeValueList": [
{
"S": "Yishay"
}
]
}
}
}
---request end---
---response begin---
{
"Count": 1,
"Items": [
{
"first_name": {
"S": "Yishay"
},
"gender": {
"S": "M"
},
"birth_date": {
"S": "1957-01-19"
},
"emp_no": {
"N": "75104"
},
"last_name": {
"S": "Pavlopoulou"
},
"hire_date": {
"S": "1985-03-10"
}
}
],
"ScannedCount": 1
}
---response end---
[
{"birth_date":"1957-01-19","emp_no":75104,"first_name":"Yishay","gender":"M","hire_date":"1985-03-10","last_name":"Pavlopoulou"}
]
// 1 row in set (0.59 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment