Last active
March 30, 2022 02:20
-
-
Save oharaandrew314/e71eae9225f9eb038b5331bcbcf883a3 to your computer and use it in GitHub Desktop.
dynamodb-v2-kotlin-cat
This file contains hidden or 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
| @DynamoDbBean | |
| data class DynamoCat( | |
| @get:DynamoDbPartitionKey var ownerId: Int? = null, | |
| @get:DynamoDbSortKey | |
| @get:DynamoDbSecondaryPartitionKey(indexNames = ["names"]) | |
| var name: String? = null, | |
| var gender: String? = null, | |
| var features: List<String> = emptyList() | |
| ) | |
| val schema = TableSchema.fromBean(DynamoCat::class.java) | |
| val table = DynamoDbEnhancedClient.create().table("cat", schema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment