SPOPS logo

NAME

SPOPS::Key::DBI::Identity -- Retrieve IDENTITY values from a supported DBI database

SYNOPSIS

 # In your SPOPS configuration
 $spops  = {
   'myspops' => {
       'isa' => [ qw/ SPOPS::Key::DBI::Identity  SPOPS::DBI / ],
       ...
   },
 };

DESCRIPTION

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.

METHODS

post_fetch_id()

Retrieve the IDENTITY value after inserting a row.

BUGS

None known.

TO DO

Nothing known.

SEE ALSO

DBD::Sybase

DBI

COPYRIGHT

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.

AUTHORS

Chris Winters <chris@cwinters.com>

See the SPOPS module for the full author list.

Generated from the SPOPS 0.87 source.

SourceForge Logo