-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
null database strategy to disable @javascript handling #522
Conversation
What about naming it "none" instead of "null"? |
@aurelien-reeves , I agree with whatever naming project wants. If the change is in general accepted, I'd go ahead to rename it. |
I renamed to none. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, well done 👌
But as I am not that much into this project, I prefer to let other contributors to review it :)
@luke-hill @olleolleolle , could you look at this pull request? It is not big. Or what are the rules to merge? Can I merge once another member has reviewed and there is some time passed without other comments? |
@akostadinov could you add an entry in the changelog? And if you had the opportunity to add some documentation regarding those database strategies, that would be a good bonus to that PR :) @olleolleolle @luke-hill if no further objection, I may merge this soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it's not a None strategy i.e. one isn't there, but a null strategy. So perhaps we should name it NullStrategy to infer that the responses on the js checkers are nil
Well, it was first named NullStrategy, I ask him to rename it to None weeks ago 😓 I keep feeling this is more "None" than "Null": the strategy is actually nothing, no code. It is like having no strategy at all. But I may misunderstand it actually 😶 |
@@ -23,6 +23,9 @@ Feature: Choose javascript database strategy | |||
The deletion strategy can be quicker for situations where truncation causes locks which | |||
has been reported by some Oracle users. | |||
|
|||
The none strategy can be used when user doesn't want special handling of scenario |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Perhaps it's not easy to see that the names none and deletion are symbols to be used, or rather, names of strategies. Would they be easier to read if they were quoted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a change here, it is clear now, not sure if there would be a nicer way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
(I would know what a NullStrategy was, but since the setting to be interacted with is a Ruby Symbol, I'd have to look it up anyway.)
@aurelien-reeves so under the hood this sets a few methods. These methods do exist (So they're not The OP wanted these methods to deliberately return |
So what should name be after all? |
My vote is for either Nil or Null because those correctly identify that the strategy is setting nil values. |
The strategy is an instance of the Null Object pattern but we don't have to use that name if we don't want to. IMO the right name for the symbol is |
1c3a4e0
to
10c7bb5
Compare
Due to popular demand, I renamed class back to @luke-hill , added changelog and updated doc to clarify |
Once again, it looks good to me, once again, thanks a lot @akostadinov And, once again, I prefer to wait for other review before merging 😅 |
Guys, can we merge in case of no objections? |
Summary
Presently there is no nice way to disable
@javascript
tag handling without writing a custom database strategy class. See #521This PR adds a null database strategy to allow easily doing so by
I'm planning to add some other enhancements and documentation later to allow custom list of tags but having a null strategy is useful anyway and is a first step.
Types of changes
Checklist: