Added a few changes to query expressions (#51)
- Added the between operator to query expressions. - Added the using query expression suffix to specify which index to query (or force a scan). This is required if query planning has found multiple indices that can potentially be used. - Rewrote the types of the query expressions to allow for functions to be defined once, and be useful in queries that result in DynamoDB queries, and evaluation. - Added some test functions around time and summing numbers. - Fixed a bug in the del-attr which was not honouring marked rows in a similar way to set-attr: it was only deleting attributes from the first row. - Added the -to type flag to set-attr which will set the attribute to the value of a query expression.
This commit is contained in:
parent
835ddd5630
commit
4b4d515ade
32 changed files with 1284 additions and 339 deletions
|
|
@ -91,10 +91,14 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
key := gofakeit.UUID()
|
||||
var key = gofakeit.UUID()
|
||||
for i := 0; i < totalItems; i++ {
|
||||
if i%50 == 0 {
|
||||
key = gofakeit.UUID()
|
||||
}
|
||||
if err := tableService.Put(ctx, inventoryTableInfo, models.Item{
|
||||
"pk": &types.AttributeValueMemberS{Value: key},
|
||||
"sk": &types.AttributeValueMemberN{Value: fmt.Sprint(i % 50)},
|
||||
"uuid": &types.AttributeValueMemberS{Value: gofakeit.UUID()},
|
||||
}); err != nil {
|
||||
log.Fatalln(err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue