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

Fixed issue #153, escape queries generated by Riak store. #161

Merged
merged 11 commits into from
May 28, 2015

Conversation

cabol
Copy link
Contributor

@cabol cabol commented May 20, 2015

  • Fixed issue Escape queries generated by the riak backend. #153, escape queries generated by Riak store.
  • Function build_query was totally modified to support different scenarios, not only escape string values but also handle conditions such as: <, <=, >, >=, /=, ==, null, not_null.
  • Fixed bug in find_by function, when argument 'Conditions' is a tuple (specifying only one condition), instead of a list.

@elbrujohalcon
Copy link
Member

@cabol to make sure your changes are actually working, you should remove riak from here and run the tests

sumo:persist(Module, Module:new("Jane", "Doe")),
sumo:persist(Module, Module:new("John", "Doe", 30, "2015-01-01")),
sumo:persist(Module, Module:new("Jane Jr.", "Doe", 5, "2015-01-05")),
sumo:persist(Module, Module:new("Joe", "Armstrong")),
Copy link
Member

Choose a reason for hiding this comment

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

According to Elvis:

Remove the dynamic function call on line 49. Only modules that define callbacks should make dynamic calls.

@cabol
Copy link
Contributor Author

cabol commented May 28, 2015

@elbrujohalcon now is ready to merge!!

sumo:persist(Module, Module:new("Alan", "Turing", 102, "Computer St.")),

case Module of
sumo_test_people_riak -> timer:sleep(5000);
Copy link
Member

Choose a reason for hiding this comment

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

I'm very aware that you will hate me… even more… after this comment but: can you keep the style and create a sumo_test_utils:sleep_if_required(Module) and put this case (in a function-head pattern-matching fashion) in it?
That way we will not need to have cases and conditionals checking module names in the tests themselves.

elbrujohalcon pushed a commit that referenced this pull request May 28, 2015
Fixed issue #153, escape queries generated by Riak store.
@elbrujohalcon elbrujohalcon merged commit 270e7b2 into master May 28, 2015
@cabol cabol deleted the cabol.153.escape_riak_queries branch May 29, 2015 13:26
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.

3 participants