Skip to content

Conversation

@roberth-k
Copy link
Contributor

Adds table name aliasing and an optional table name prefix. Both are configured at dynamo.DB level.

It's similar to what's offered by the AWS .NET Core SDK.

In a call to db.Table(name) or db.CreateTable(name, ...): if the name is a key in the db's alias mapping, it is replaced by its value in the alias mapping. Finally, the prefix is prepended to the name. The alias mapping and prefix are initially empty, so the default behaviour remains unchanged.

This is a convenience feature for applications that must permit overrides of individual table names, allowing for this configuration to be decoupled from the construction of dynamo.Table. By setting up a randomly generated prefix, it can also simplify testing where dynamo.DB is involved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant