Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
select: change Symbol handling in script syntax
This is a backward incompatible change. But the use case affected by
this change will make Ruby scripts difficult to maintain. I hope that
existing users didn't match the use case. The use case is using Symbol
as string value in script syntax like the following:
filter("title", :value) # => --filter "title == \"value\""
Before this change, all Symbol are treated as string value in script
syntax. We can't specify column (object in general) in script syntax
with the specification.
With this change, Symbol is treated as identifier. It means that Symbol
is treated as column (object in general) in script syntax like the
following:
filter("title", :normalized_title) # => --filter "title == normalized_title"
For backward compatibility, invalid identifier in script syntax is
fallbacked to string value in script syntax like the following:
filter("title", :"Hello World") # => --filter "title == \"Hello World\""
I think that an exception should be raised for the case but I choose the
above specification...- Loading branch information
Showing
4 changed files
with
46 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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