DBI and do

"Knoerl, Thomas" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <385666B3840C794CB0B110E866909122AA6BEED5A5@DEFTHW99E64MSX.ww902.siemens.net>
Hello folks,

Is there are reason why the 'select(all|col)_*' methods support the handover of statement handles, but 'do' doesn't?

Is it possible to change the statement assignment?

Current:
my $sth = $dbh->prepare($statement, $attr) or return undef;

Suggested:
my $sth = (ref $stmt) ? $stmt : $dbh->prepare($stmt, $attr)     or return;

The suggested solution makes it possible to work with cached statements and would therefore, in my opinion, improve performance.

With best regards,
Thomas Knoerl

Siemens AG
Siemens IT Solutions and Services
SIS IT SM CP
Wuerzburger Str. 121
90766 Fuerth, Germany
Tel.: +49 (911) 978-3034
Fax: +49 (911) 978-2037
Mobile: +49 (1522) 2795353
mailto:[email protected]

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Barbara Kux, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.