[Dbix-class] Branch for supporting column attributes checked in
John Napiorkowski
jjn1056 at yahoo.com
Tue Dec 5 14:38:04 GMT 2006
--- Jess Robinson <castaway at desert-island.demon.co.uk>
wrote:
>
>
> On Fri, 1 Dec 2006, John Napiorkowski wrote:
>
> > --- Matt S Trout <dbix-class at trout.me.uk> wrote:
> >
> > The last big this I need to do is something with
> the
> > new bulk_insert function, since this also is using
> > execute_array. I need to use bind_param_array on
> > this, but I need to read the docs more clearly
> since
> > this is a function I haven't used before. Seems
> the
> > same as bind_param with arrayrefs instead of
> scalars.
> > I just need to make sure I fully get what:
> >
> > ArrayTupleFetch => sub { my $values = shift
> @$data;
> > return if !$values; return [ @{$values}[@bind] ]}
> >
> > is doing! I'm planning on playing with that over
> the
> > weekend.
> >
>
> Hi John,
>
> It's fairly simple. ArrayTupleFetch is set to a
> coderef that is supposed
> to return values for an entire insert row everytime
> it gets called, and
> undef if it ran out of values to pass.
>
> I haven't been paying much attention, so I'm not
> sure what you need to
> amend it for, but it shouldn't be hard, I hope. The
> execute_array docs are
> fairly self-explanatory.
Yup, the docs are pretty straightforward, I actually
played with this once a few years ago when writing a
bulk loader for an Oracle application, so it's coming
back to me. Just that "bind_param_array" doesn't
support the coderef version of suppling values so I'll
have to take a slice of the values for each column;
hope it doesn't impact performance too much, since I
assume the bulk loader is intended to be all about
speed.
I'll check in my best attempt a bit later and you can
poke and prod it at your leisure.
--john
>
> Jess
> (who wrote the bulk_insert thing)
>
> _______________________________________________
> List:
>
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN:
>
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
>
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
More information about the Dbix-class
mailing list