Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fluent API #251

Merged
merged 20 commits into from
Mar 16, 2021
Merged

Add Fluent API #251

merged 20 commits into from
Mar 16, 2021

Conversation

rcoh
Copy link
Collaborator

@rcoh rcoh commented Mar 12, 2021

Issue #, if available:

Description of changes: Adds a fluent API layer that is a little bit less flexible but more ergonomic for most use cases

    let new_table = client
        .create_table()
        .table_name("test-table")
        .key_schema(vec![KeySchemaElement::builder()
            .attribute_name("k")
            .key_type(KeyType::Hash)
            .build()])
        .attribute_definitions(vec![AttributeDefinition::builder()
            .attribute_name("k")
            .attribute_type(ScalarAttributeType::S)
            .build()])
        .provisioned_throughput(
            ProvisionedThroughput::builder()
                .write_capacity_units(10)
                .read_capacity_units(10)
                .build(),
        )
        .send().await?

I ended up making some other refactorings to enable creating cargo features.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rcoh and others added 10 commits March 9, 2021 10:04
For a long time, we've been fully qualifying depdency types but not model types. This produces code that's fine, but it's always been a confusing inconsistency and it posed problems trying to render Opaque types that specified namespaces (because the namespace was ignored).

This removes that inconsistency.
@rcoh rcoh changed the title Fluent Add Fluent API Mar 16, 2021
@rcoh rcoh changed the base branch from main to cargo-features March 16, 2021 17:30
@rcoh rcoh requested a review from a team March 16, 2021 17:34
@rcoh rcoh requested a review from davidbarsky March 16, 2021 17:56
@rcoh rcoh added this to the AWS Rest JSON milestone Mar 16, 2021
Copy link
Contributor

@davidbarsky davidbarsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ship-it!

Base automatically changed from cargo-features to main March 16, 2021 22:45
@rcoh rcoh enabled auto-merge (squash) March 16, 2021 22:45
@rcoh rcoh merged commit 3f4f44c into main Mar 16, 2021
@rcoh rcoh deleted the fluent branch March 16, 2021 22:50
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.

2 participants