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

Update to use local-dynamo, start local-dynamo from setUp #65

Merged
merged 3 commits into from
Jul 24, 2015

Conversation

chaosgame
Copy link
Contributor

Hello @xiao,

Please review the following commits I made in branch 'nathan-AttributeValueList'.

a9499a9 (2015-07-23 17:04:42 -0700)
Update to use local-dynamo, start local-dynamo from setUp

7b973b5 (2015-07-23 16:37:35 -0700)
Migrate all uses of AttribueValueList/ComparisonOperator to ConditionBuilder

R=@xiao

Test plan: 'New unit test, old unit tests'

@chaosgame
Copy link
Contributor Author

Now that we have local-dynamo and the test code runs on it's own, it would be nice to see if we could set up travis-ci integration for the repo.

* no conditions.
* @return {DynamoRequest}
*/
DynamoRequest.prototype.setQueryFilter = function (conditions) {
Copy link
Contributor

Choose a reason for hiding this comment

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

conditions -> filters?

@xiao
Copy link
Contributor

xiao commented Jul 24, 2015

First pass done.

A high-level question -- can we consolidate ConditionBuilder and FilterBuilder into one builder, and maybe call it ConditionBuilder? They are essentially all conditions and they produce the same format in DynamoDB API, for KeyConditions, QueryFilter and ScanFilter.

@chaosgame
Copy link
Contributor Author

ConditionBuilder and FilterBuilder don't produce the same format in DynamoDB yet, but you are correct -- that is the plan (see my comment above about changes in behavior).

@xiao
Copy link
Contributor

xiao commented Jul 24, 2015

I still think we should consolidate them in this PR, so we don't introduce a new API (FilterBuilder) and change it later.

Here is a proposal that I think would work. Let me know what you think about it.

  • Keep the current two APIs in ConditionBuilder.
  • Add the new APIs you added into FilterBuilder into ConditionBuilder.
  • Use the new ConditionBuilder to generate values for all these fields (DynamoDB API), Expected, KeyConditions, QueryFilter and ScanFilter.
  • Stop using Value + Exist, and use AttributeValueList + ComparisonOperator for Expected. This is hidden from the user of Dynamite anyway.
  • I really like your idea to keep the APIs in QueryBuilder unchanged.

@chaosgame
Copy link
Contributor Author

Alright @xiao, changes have been made. PTAL.

@chaosgame chaosgame force-pushed the nathan-AttributeValueList branch 2 times, most recently from f6181f4 to f69b70c Compare July 24, 2015 17:02
@xiao
Copy link
Contributor

xiao commented Jul 24, 2015

LGTM!

Beautiful piece.

chaosgame added a commit that referenced this pull request Jul 24, 2015
Update to use local-dynamo, start local-dynamo from setUp
@chaosgame chaosgame merged commit 42134ea into master Jul 24, 2015
@chaosgame chaosgame deleted the nathan-AttributeValueList branch July 24, 2015 18:18
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