Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Alias-aware version of Rose::DB::Object::Metadata->column method?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark Frost  
View profile  
 More options Jun 18 2010, 2:37 pm
From: Mark Frost <abaddonon...@gmail.com>
Date: Fri, 18 Jun 2010 11:37:39 -0700 (PDT)
Local: Fri, Jun 18 2010 2:37 pm
Subject: Alias-aware version of Rose::DB::Object::Metadata->column method?
Hey John. I feel like I might have read something about this on the
mailing list, so maybe this was accomplished with a newer version of
Rose than Im using, but I thought Id go ahead and ask anyway:

Im iterating over a hash and wanting to check and see which entries on
it are valid Rose columns for a certain class. I tried using the -

>meta->column($name) method, and then I thought about checking ->meta-
>method_name_is_reserved($name), but neither of these methods seem to

be taking aliases into account. So I have a line like this:

Now, I can run my method name through the ->meta->column_aliases hash
if I have to, or I can check the list from ->meta-

>column_mutator_method_names, but I was hoping there was a simpler one-

liner I could use here that wouldnt require an extra iteration on my
part.

So, is there a method I can use here that is alias-aware to check and
see if $name is the name of a "column" from the Rose-schema (not MySQL
schema) point of view?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Siracusa  
View profile  
 More options Jun 18 2010, 2:51 pm
From: John Siracusa <sirac...@gmail.com>
Date: Fri, 18 Jun 2010 14:51:03 -0400
Local: Fri, Jun 18 2010 2:51 pm
Subject: Re: Alias-aware version of Rose::DB::Object::Metadata->column method?

On Fri, Jun 18, 2010 at 2:37 PM, Mark Frost <abaddonon...@gmail.com> wrote:
> Im iterating over a hash and wanting to check and see which entries on
> it are valid Rose columns for a certain class. I tried using the -
>>meta->column($name) method, and then I thought about checking ->meta-
>>method_name_is_reserved($name), but neither of these methods seem to
> be taking aliases into account. So I have a line like this:

> Now, I can run my method name through the ->meta->column_aliases hash
> if I have to, or I can check the list from ->meta-
>>column_mutator_method_names, but I was hoping there was a simpler one-
> liner I could use here that wouldnt require an extra iteration on my
> part.

There is no such method, but the technique you described (check
meta->column() and the column_aliases hash) sounds fine.

-John


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »