Skip to content

Commit

Permalink
Merge pull request #474 from Clever/datetime-ddb-codegen-key
Browse files Browse the repository at this point in the history
fix dynamoodb codegen for datetime partition keys for GSIs
  • Loading branch information
dxu429 authored Mar 4, 2024
2 parents 4865b9d + 26ac4e4 commit b640b2c
Show file tree
Hide file tree
Showing 24 changed files with 3,522 additions and 4 deletions.
4 changes: 3 additions & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v9.1.5
v9.1.6

v9.1.6 Fix dynamodb codegen for datetime HASH keys in GSIs

v9.1.5 Fix import for transaction codegen

Expand Down
27 changes: 27 additions & 0 deletions samples/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -828,3 +828,30 @@ definitions:
properties:
name:
type: string

ThingWithDatetimeGSI:
x-db:
AllowOverwrites: false
AllowPrimaryIndexScan: true
AllowSecondaryIndexScan:
- byDate
DynamoDB:
KeySchema:
- AttributeName: id
KeyType: HASH
GlobalSecondaryIndexes:
- IndexName: byDate
Projection:
ProjectionType: ALL
KeySchema:
- AttributeName: datetime
KeyType: HASH
- AttributeName: id
KeyType: RANGE
type: object
properties:
id:
type: string
datetime:
type: string
format: date-time
51 changes: 51 additions & 0 deletions samples/gen-go-db-custom-path/db/dynamodb/dynamodb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b640b2c

Please sign in to comment.