You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2010/02/18 02:15:27 UTC
[jira] Created: (THRIFT-708) Is set checking methods
Is set checking methods
-----------------------
Key: THRIFT-708
URL: https://issues.apache.org/jira/browse/THRIFT-708
Project: Thrift
Issue Type: Improvement
Components: Compiler (Ruby)
Affects Versions: 0.2
Reporter: Bryan Duxbury
Assignee: Bryan Duxbury
Priority: Minor
Fix For: 0.3
It would be very useful to add some "is set checking" methods to our Ruby generated structs. For instance if you have a struct with a field named "blah", you generate a method called "blah?" that returns true if the blah field is non-nil.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-708) Is set checking methods
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-708:
---------------------------------
Patch Info: [Patch Available]
I'll commit this later today if there are no objections.
> Is set checking methods
> -----------------------
>
> Key: THRIFT-708
> URL: https://issues.apache.org/jira/browse/THRIFT-708
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.3
>
> Attachments: thrift-708.patch
>
>
> It would be very useful to add some "is set checking" methods to our Ruby generated structs. For instance if you have a struct with a field named "blah", you generate a method called "blah?" that returns true if the blah field is non-nil.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-708) Is set checking methods
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-708.
--------------------------------
Resolution: Fixed
Committed in r911557.
> Is set checking methods
> -----------------------
>
> Key: THRIFT-708
> URL: https://issues.apache.org/jira/browse/THRIFT-708
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.3
>
> Attachments: thrift-708.patch
>
>
> It would be very useful to add some "is set checking" methods to our Ruby generated structs. For instance if you have a struct with a field named "blah", you generate a method called "blah?" that returns true if the blah field is non-nil.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-708) Is set checking methods
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-708:
---------------------------------
Attachment: thrift-708.patch
This patch adds the suggested methods. At the same time, it reorganizes how field accessors and these qmark methods are created - rather than relying on the compiler generating a list of field names, instead the field names are determined at runtime through a single "generate_accessors" method. This gives us a bit more flexibility to add new accessor types to structs without requiring code regeneration.
> Is set checking methods
> -----------------------
>
> Key: THRIFT-708
> URL: https://issues.apache.org/jira/browse/THRIFT-708
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.3
>
> Attachments: thrift-708.patch
>
>
> It would be very useful to add some "is set checking" methods to our Ruby generated structs. For instance if you have a struct with a field named "blah", you generate a method called "blah?" that returns true if the blah field is non-nil.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-708) Is set checking methods
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835126#action_12835126 ]
Michael Stockton commented on THRIFT-708:
-----------------------------------------
I think this would be a great feature. Though, to me, it only seems helpful for boolean fields. I guess I don't find string_field.nil? cumbersome. But bool_field == true is slightly annoying. Either way I'll be happy.
> Is set checking methods
> -----------------------
>
> Key: THRIFT-708
> URL: https://issues.apache.org/jira/browse/THRIFT-708
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.2
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.3
>
>
> It would be very useful to add some "is set checking" methods to our Ruby generated structs. For instance if you have a struct with a field named "blah", you generate a method called "blah?" that returns true if the blah field is non-nil.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.