Open
Conversation
Collaborator
|
Off the top of my head. I think when I run
Hope that helps for now. You can merge whenever you feel good about it though |
Collaborator
Author
|
@tongueroo I have dynamodb local, that's not the problem. I just don't see any test db schema or connection info in the repo. Is there a manual setup to set up the test db for the first time? I get these weird errors when running rspec: thanks for the push access! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been using Jets with Dynomite for my company's cloud platform for years and going through an upgrade to Jets v5 and Dynomite v2. This PR includes various fixes/tweaks needed to Dynomite as I upgrade a fairly large application and work through the test suite.
Use expression_attribute_names when checking for uniqueness on create
When creating a new record,
put_itemis called withcondition_expression: "attribute_not_exists(primary_key)"to validate uniqueness and raise if a record already exists. In the case whereprimary_keyis a Reserved Word in DynamoDb this will fail with an Invalid ConditionExpression error.This change utilizes the Expression attribute names to alias the primary key attribute name so that it will generate a valid condition expression even if it is a reserved word.
Use a key condition on tables with composite key if at least partition key is present
If a table is defined with a composite key (partition key and sort key), Dynomite reverts to doing a scan operation if you try to query with just the partition key. It is possible to use a key condition when only the partition key is present, and it avoids an expensive scan operation.
nilis a Falsey value in TypecasterWhen casting a boolean field,
nilis now considered a Falsey value.Comments/questions
@tongueroo are the tests working in this repo? How to setup and run a test environment? I get errors when running
bundle exec rspec specand the examples don't even run. I will add tests if I can get them running.