[Dbix-class] select from dual

Hartmaier Alexander Alexander.Hartmaier at t-systems.at
Thu Jul 13 15:12:10 CEST 2006


Some, e.g. to fetch the last inserted id of a record, because every database is different there.

-Alex


> -----Original Message-----
> From: dbix-class-bounces at lists.rawmode.org [mailto:dbix-class-
> bounces at lists.rawmode.org] On Behalf Of Thomas Hartman
> Sent: Thursday, July 13, 2006 2:21 PM
> To: dbix-class at lists.rawmode.org
> Subject: Re: [Dbix-class] select from dual
> 
> DBIC doesn't have any vender specific (eg, oracle specific) code, does
> it?
> 
> Or does it?
> 
> Thomas.
> 
> 2006/7/12, Hartmaier Alexander <Alexander.Hartmaier at t-systems.at>:
> >
> >
> >
> >
> > Hi!
> >
> >
> >
> > If you grep through the dbic sources you can see that dbic uses raw
> sql to
> > do that, for example to the get last inserted id in Oracle:
> >
> >
> >
> > my $sql = "SELECT " . $seq . ".currval FROM DUAL";
> >
> > my ($id) = $self->_dbh->selectrow_array($sql);
> >
> >
> >
> > @mst: how much performance impact does the use of '' instead of ""
> have?
> >
> >
> >
> >
> >
> >
> >
> >
> > -Alex
> >
> >
> >
> >
> >  ________________________________
> >
> >
> > From: dbix-class-bounces at lists.rawmode.org
> > [mailto:dbix-class-bounces at lists.rawmode.org] On Behalf Of
> > mark davies
> >  Sent: Tuesday, July 11, 2006 5:56 PM
> >  To: dbix-class at lists.rawmode.org
> >  Subject: [Dbix-class] select from dual
> >
> >
> >
> >
> > Hi,
> >
> >  I am new to dbix::class. I am using an oracle database and need to
> select
> > from dual in order to initialise an environment. What is the correct
> way to
> > select from dual using dbix::class?
> >
> >  Mark
> >
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
> *"*"*
> > T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
> > Handelsgericht Wien, FN 79340b
> >
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
> *"*"*
> > Notice: This e-mail contains information that is confidential and may
> be
> > privileged.
> > If you are not the intended recipient, please notify the sender and
> then
> > delete this e-mail immediately.
> >
> *"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"
> *"*"*
> > _______________________________________________
> > 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/
> >
> >
> 
> _______________________________________________
> 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 at lists.rawmode.org/

*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*


More information about the Dbix-class mailing list