📄 changes.pm
字号:
HandleError docs updated to show that handler can edit error message. HandleError subroutine interface is now regarded as stable.=head2 Changes in DBI 1.25, 5th June 2002 Fixed build problem on Windows and some compiler warnings. Fixed $dbh->{Driver} and $sth->{Statement} for driver internals These are 'inner' handles as per behaviour prior to DBI 1.16. Further minor improvements to DBI::PurePerl accuracy.=head2 Changes in DBI 1.24, 4th June 2002 Fixed reference loop causing a handle/memory leak that was introduced in DBI 1.16. Fixed DBI::Format to work with 'filehandles' from IO::Scalar and similar modules thanks to report by Jeff Boes. Fixed $h->func for DBI::PurePerl thanks to Jeff Zucker. Fixed $dbh->{Name} for DBI::PurePerl thanks to Dean Arnold. Added DBI method call profiling and benchmarking. This is a major new addition to the DBI. See $h->{Profile} attribute and DBI::Profile module. For a quick trial, set the DBI_PROFILE environment variable and run your favourite DBI script. Try it with DBI_PROFILE set to 1, then try 2, 4, 8, 10, and -10. Have fun! Added execute_array() and bind_param_array() documentation with thanks to Dean Arnold. Added notes about the DBI having not yet been tested with iThreads (testing and patches for SvLOCK etc welcome). Removed undocumented Handlers attribute (replaced by HandleError). Tested with 5.5.3 and 5.8.0 RC1.=head2 Changes in DBI 1.23, 25th May 2002 Greatly improved DBI::PurePerl in performance and accuracy. Added more detail to DBI::PurePerl docs about what's not supported. Fixed undef warnings from t/15array.t and DBD::Sponge.=head2 Changes in DBI 1.22, 22nd May 2002 Added execute_array() and bind_param_array() with special thanks to Dean Arnold. Not yet documented. See t/15array.t for examples. All drivers now automatically support these methods. Added DBI::PurePerl, a transparent DBI emulation for pure-perl drivers with special thanks to Jeff Zucker. Perldoc DBI::PurePerl for details. Added DBI::Const::GetInfo* modules thanks to Steffen Goeldner. Added write_getinfo_pm utility to DBI::DBD thanks to Steffen Goeldner. Added $allow_active==2 mode for prepare_cached() thanks to Stephen Clouse. Updated DBI::Format to Revision 11.4 thanks to Tom Lowery. Use File::Spec in Makefile.PL (helps VMS etc) thanks to Craig Berry. Extend $h->{Warn} to commit/rollback ineffective warning thanks to Jeff Baker. Extended t/preparse.t and removed "use Devel::Peek" thanks to Scott Hildreth. Only copy Changes to blib/lib/Changes.pm once thanks to Jonathan Leffler. Updated internals for modern perls thanks to Jonathan Leffler and Jeff Urlwin. Tested with perl 5.7.3 (just using default perl config). Documentation changes: Added 'Catalog Methods' section to docs thanks to Steffen Goeldner. Updated README thanks to Michael Schwern. Clarified that driver may choose not to start new transaction until next use of $dbh after commit/rollback. Clarified docs for finish method. Clarified potentials problems with prepare_cached() thanks to Stephen Clouse.=head2 Changes in DBI 1.21, 7th February 2002 The minimum supported perl version is now 5.005_03. Fixed DBD::Proxy support for AutoCommit thanks to Jochen Wiedmann. Fixed DBI::ProxyServer bind_param(_inout) handing thanks to Oleg Mechtcheriakov. Fixed DBI::ProxyServer fetch loop thanks to nobull@mail.com. Fixed install_driver do-the-right-thing with $@ on error. It, and connect(), will leave $@ empty on success and holding the error message on error. Thanks to Jay Lawrence, Gavin Sherlock and others for the bug report. Fixed fetchrow_hashref to assign columns to the hash left-to-right so later fields with the same name overwrite earlier ones as per DBI < 1.15, thanks to Kay Roepke. Changed tables() to use quote_indentifier() if the driver returns a true value for $dbh->get_info(29) # SQL_IDENTIFIER_QUOTE_CHAR Changed ping() so it no longer triggers RaiseError/PrintError. Changed connect() to not call $class->install_driver unless needed. Changed DESTROY to catch fatal exceptions and append to $@. Added ISO SQL/CLI & ODBCv3 data type definitions thanks to Steffen Goeldner. Removed the definition of SQL_BIGINT data type constant as the value is inconsistent between standards (ODBC=-5, SQL/CLI=25). Added $dbh->column_info(...) thanks to Steffen Goeldner. Added $dbh->foreign_key_info(...) thanks to Steffen Goeldner. Added $dbh->quote_identifier(...) insipred by Simon Oliver. Added $dbh->set_err(...) for DBD authors and DBI subclasses (actually been there for a while, now expanded and documented). Added $h->{HandleError} = sub { ... } addition and/or alternative to RaiseError/PrintError. See the docs for more info. Added $h->{TraceLevel} = N attribute to set/get trace level of handle thus can set trace level via an (eg externally specified) DSN using the embedded attribute syntax: $dsn = 'dbi:DB2(PrintError=1,TraceLevel=2):dbname'; Plus, you can also now do: local($h->{TraceLevel}) = N; (but that leaks a little memory in some versions of perl). Added some call tree information to trace output if trace level >= 3 With thanks to Graham Barr for the stack walking code. Added experimental undocumented $dbh->preparse(), see t/preparse.t With thanks to Scott T. Hildreth for much of the work. Added Fowler/Noll/Vo hash type as an option to DBI::hash(). Documentation changes: Added DBI::Changes so now you can "perldoc DBI::Changes", yeah! Added selectrow_arrayref & selectrow_hashref docs thanks to Doug Wilson. Added 'Standards Reference Information' section to docs to gather together all references to relevant on-line standards. Added link to poop.sourceforge.net into the docs thanks to Dave Rolsky. Added link to hyperlinked BNF for SQL92 thanks to Jeff Zucker. Added 'Subclassing the DBI' docs thanks to Stephen Clouse, and then changed some of them to reflect the new approach to subclassing. Added stronger wording to description of $h->{private_*} attributes. Added docs for DBI::hash. Driver API changes: Now a COPY of the DBI->connect() attributes is passed to the driver connect() method, so it can process and delete any elements it wants. Deleting elements reduces/avoids the explicit $dbh->{$_} = $attr->{$_} foreach keys %$attr; that DBI->connect does after the driver connect() method returns.=head2 Changes in DBI 1.20, 24th August 2001 WARNING: This release contains two changes that may affect your code. : Any code using selectall_hashref(), which was added in March 2001, WILL : need to be changed. Any code using fetchall_arrayref() with a non-empty : hash slice parameter may, in a few rare cases, need to be changed. : See the change list below for more information about the changes. : See the DBI documentation for a description of current behaviour. Fixed memory leak thanks to Toni Andjelkovic. Changed fetchall_arrayref({ foo=>1, ...}) specification again (sorry): The key names of the returned hashes is identical to the letter case of the names in the parameter hash, regardless of the L</FetchHashKeyName> attribute. The letter case is ignored for matching. Changed fetchall_arrayref([...]) array slice syntax specification to clarify that the numbers in the array slice are perl index numbers (which start at 0) and not column numbers (which start at 1). Added { Columns=>... } and { Slice =>... } attributes to selectall_arrayref() which is passed to fetchall_arrayref() so it can fetch hashes now. Added a { Columns => [...] } attribute to selectcol_arrayref() so that the list it returns can be built from more than one column per row. Why? Consider my %hash = @{$dbh->selectcol_arrayref($sql,{ Columns=>[1,2]})} to return id-value pairs which can be used directly to build a hash. Added $hash_ref = $sth->fetchall_hashref( $key_field ) which returns a ref to a hash with, typically, one element per row. $key_field is the name of the field to get the key for each row from. The value of the hash for each row is a hash returned by fetchrow_hashref. Changed selectall_hashref to return a hash ref (from fetchall_hashref) and not an array of hashes as it has since DBI 1.15 (end March 2001). WARNING: THIS CHANGE WILL BREAK ANY CODE USING selectall_hashref()! Sorry, but I think this is an important regularization of the API. To get previous selectall_hashref() behaviour (an array of hash refs) change $ary_ref = $dbh->selectall_hashref( $statement, undef, @bind); to $ary_ref = $dbh->selectall_arrayref($statement, { Columns=>{} }, @bind); Added NAME_lc_hash, NAME_uc_hash, NAME_hash statement handle attributes. which return a ref to a hash of field_name => field_index (0..n-1) pairs. Fixed select_hash() example thanks to Doug Wilson. Removed (unbundled) DBD::ADO and DBD::Multiplex from the DBI distribution. The latest versions of those modules are available from CPAN sites. Added $dbh->begin_work. This method causes AutoCommit to be turned off just until the next commit() or rollback(). Driver authors: if the DBIcf_BegunWork flag is set when your commit or rollback method is called then please turn AutoCommit on and clear the DBIcf_BegunWork flag. If you don't then the DBI will but it'll be much less efficient and won't handle error conditions very cleanly. Retested on perl 5.4.4, but the DBI won't support 5.4.x much longer. Added text to SUPPORT section of the docs: For direct DBI and DBD::Oracle support, enhancement, and related work I am available for consultancy on standard commercial terms. Added text to ACKNOWLEDGEMENTS section of the docs: Much of the DBI and DBD::Oracle was developed while I was Technical Director (CTO) of the Paul Ingram Group (www.ig.co.uk). So I'd especially like to thank Paul for his generosity and vision in supporting this work for many years.=head2 Changes in DBI 1.19, 20th July 2001 Made fetchall_arrayref({ foo=>1, ...}) be more strict to the specification in relation to wanting hash slice keys to be lowercase names. WARNING: If you've used fetchall_arrayref({...}) with a hash slice that contains keys with uppercase letters then your code will break. (As far as I recall the spec has always said don't do that.) Fixed $sth->execute() to update $dbh->{Statement} to $sth->{Statement}. Added row number to trace output for fetch method calls. Trace level 1 no longer shows fetches with row>1 (to reduce output volume). Added $h->{FetchHashKeyName} = 'NAME_lc' or 'NAME_uc' to alter behaviour of fetchrow_hashref() method. See docs. Added type_info quote caching to quote() method thanks to Dean Kopesky. Makes using quote() with second data type param much much faster. Added type_into_all() caching to type_info(), spotted by Dean Kopesky. Added new API definition for table_info() and tables(), driver authors please note! Added primary_key_info() to DBI API thanks to Steffen Goeldner. Added primary_key() to DBI API as simpler interface to primary_key_info(). Indent and other fixes for DBI::DBD doc thanks to H.Merijn Brand. Added prepare_cached() insert_hash() example thanks to Doug Wilson. Removed false docs for fetchall_hashref(), use fetchall_arrayref({}).=head2 Changes in DBI 1.18, 4th June 2001 Fixed that altering ShowErrorStatement also altered AutoCommit! Thanks to Jeff Boes for spotting that clanger. Fixed DBD::Proxy to handle commit() and rollback(). Long overdue, sorry. Fixed incompatibility with perl 5.004 (but no one's using that right? :) Fixed connect_cached and prepare_cached to not be affected by the order of elements in the attribute hash. Spotted by Mitch Helle-Morrissey. Fixed version number of DBI::Shell reported by Stuhlpfarrer Gerhard and others. Defined and documented table_info() attribute semantics (ODBC compatible) thanks to Olga Voronova, who also implemented then in DBD::Oracle. Updated Win32::DBIODBC (Win32::ODBC emulation) thanks to Roy Lee.=head2 Changes in DBI 1.16, 30th May 2001 Reimplemented fetchrow_hashref in C, now fetches about 25% faster! Changed behaviour if both PrintError and RaiseError are enabled to simply do both (in that order, obviously :) Slight reduction in DBI handle creation overhead. Fixed $dbh->{Driver} & $sth->{Database} to return 'outer' handles. Fixed execute param count check to honour RaiseError spotted by Belinda Giardie. Fixed build for perl5.6.1 with PERLIO thanks to H.Merijn Brand. Fixed client sql restrictions in ProxyServer.pm thanks to Jochen Wiedmann. Fixed batch mode command parsing in Shell thanks to Christian Lemburg. Fixed typo in selectcol_arrayref docs thanks to Jonathan Leffler. Fixed selectrow_hashref to be available to callers thanks to T.J.Mather. Fixed core dump if statement handle didn't define Statement attribute. Added bind_param_inout docs to DBI::DBD thanks to Jonathan Leffler. Added note to data_sources() method docs that some drivers may require a connected database handle to be supplied as an attribute. Trace of install_driver method now shows path of driver file loaded. Changed many '||' to 'or' in the docs thanks to H.Merijn Brand. Updated DBD::ADO again (improvements in error handling) from Tom Lowery. Updated Win32::DBIODBC (Win32::ODBC emulation) thanks to Roy Lee. Updated email and web addresses in DBI::FAQ thanks to Michael A Ch
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -