Closed fogfish closed 3 years ago
KeyConditionExpression
to another key name (prefix
and suffix
are primary key).// old
q := &dynamodb.QueryInput{
KeyConditionExpression: aws.String(dynamo.pkPrefix + " = :prefix"),
ExpressionAttributeValues: exprOf(gen),
TableName: dynamo.table,
IndexName: aws.String("test-b-c"),
}
// new
q := &dynamodb.QueryInput{
KeyConditionExpression: aws.String(someKeyNameUsedGSI + " = :prefix"),
ExpressionAttributeValues: exprOf(gen),
TableName: dynamo.table,
IndexName: aws.String("test-b-c"),
}
SeqConfig
interface support index definition via config methodtype SeqConfig interface {
Index(name string) Seq
}
Index name is configurable via URL
KeyValPattern
+ Get(Thing) error
shall be returned for LSI/GSI. Many aspects can be resolved at config phase, using config URLdynamo.New("ddb:///table-name/index-name?prefix=prefix&suffix=suffix")
dynamo.ReadOnly(uri) KeyValReader
begins_with
for partial suffix in LSI/GSI queries (composite key pattern)
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LSI.html https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GSI.html