File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
examples/SDK/kotlin/data_plane/WorkingWithItems/src/main/kotlin Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ suspend fun main() {
3939 val tableName = " YourTableName"
4040 val keys =
4141 listOf (
42- mapOf (" PrimaryKey " to AttributeValue .S (" YourPrimaryKeyValue1 " )),
43- mapOf (" PrimaryKey " to AttributeValue .S (" YourPrimaryKeyValue2 " )),
42+ mapOf (" id " to AttributeValue .S (" 12345 " )),
43+ mapOf (" id " to AttributeValue .S (" 1234 " )),
4444 )
4545
4646 batchGetItem(tableName, keys)
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ suspend fun deleteItem(
1717
1818suspend fun main () {
1919 val tableName = " YourTableName"
20- val key = mapOf (" PrimaryKey " to AttributeValue .S (" YourPrimaryKeyValue " ))
20+ val key = mapOf (" id " to AttributeValue .S (" 1234 " ))
2121
2222 deleteItem(tableName, key)
2323}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ suspend fun getItem(
2121
2222suspend fun main () {
2323 val tableName = " YourTableName"
24- val key = mapOf (" PrimaryKey " to AttributeValue .S (" YourPrimaryKeyValue " ))
24+ val key = mapOf (" id " to AttributeValue .S (" 1234 " ))
2525
2626 getItem(tableName, key)
2727}
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ suspend fun main() {
3131 val tableName2 = " YourTableName2"
3232 val requests =
3333 mapOf (
34- tableName1 to mapOf (" PrimaryKey1 " to AttributeValue .S (" YourPrimaryKeyValue1 " )),
35- tableName2 to mapOf (" PrimaryKey2 " to AttributeValue .S (" YourPrimaryKeyValue2 " )),
34+ tableName1 to mapOf (" id " to AttributeValue .S (" 12345 " )),
35+ tableName2 to mapOf (" id " to AttributeValue .S (" 1234 " )),
3636 )
3737 transactGetItem(requests)
3838}
You can’t perform that action at this time.
0 commit comments