Re: [CDBI] Question

[prev] [thread] [next] [Date index for 2005/09/08]

From: merlyn (Randal L. Schwartz)
Subject: Re: [CDBI] Question
Date: 10:57 on 08 Sep 2005
>>>>> "Tyler" == Tyler Rorabaugh <trorabaugh@xxxxx.xxx> writes:

Tyler> 1) Is there a way to return a hashref of data from a cdbi module
Tyler> without knowing the column names? Say for instance you want to
Tyler>     send a hashref to Soap::Lite or other cpan soap related modules.
Tyler>            For example:
Tyler>                If you wanted to call a cdbi module remotely via say
Tyler> .Net j2ee etc by using a method of a class that returns a cdbi object

Tyler>    I have tried the internal method called _data_hash but for tables
Tyler> that have Foreign Keys it appears as though it will only return
Tyler> the blessed hashref of that data.


my %data = map { $_ => $object->get($_) } $object->columns;

Beware that some values of %data will be inflated objects.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Question
Tyler Rorabaugh 06:55 on 08 Sep 2005

Re: [CDBI] Question
merlyn (Randal L. Schwartz) 10:57 on 08 Sep 2005

Re: [CDBI] Question
Matt S Trout 13:11 on 08 Sep 2005

Generated at 23:46 on 13 Sep 2005 by mariachi v0.52