SPOPS::Key::DBI::Identity -- Retrieve IDENTITY values from a supported DBI database
# In your SPOPS configuration $spops = { 'myspops' => { 'isa' => [ qw/ SPOPS::Key::DBI::Identity SPOPS::DBI / ], ... }, };
This class enables a just-created object to the IDENTITY value returned by its last insert. Of course, this only works if you have an IDENTITY field in your table, such as:
CREATE TABLE my_table ( id NUMERIC( 8, 0 ) IDENTITY NOT NULL, ... )
This method is typically used in Sybase and Microsoft SQL Server databases. The client library (Open Client, FreeTDS, ODBC) should not make a difference to this module since we perform a SELECT statement to retrieve the value rather than relying on a property of the database/statement handle.
post_fetch_id()
Retrieve the IDENTITY value after inserting a row.
None known.
Nothing known.
DBD::Sybase
DBI
Copyright (c) 2001-2004 intes.net, inc.. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Chris Winters <chris@cwinters.com>
See the SPOPS module for the full author list.
To install SPOPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPOPS
CPAN shell
perl -MCPAN -e shell install SPOPS
For more information on module installation, please visit the detailed CPAN module installation guide.