| 1 | package SPOPS::DBI::Sybase; | ||
| 2 | |||
| 3 | # $Id: Sybase.pm,v 3.6 2004/06/02 00:48:22 lachoy Exp $ | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use SPOPS::Key::DBI::Identity; | ||
| 7 | |||
| 8 | $SPOPS::DBI::Sybase::VERSION = sprintf("%d.%02d", q$Revision: 3.6 $ =~ /(\d+)\.(\d+)/); | ||
| 9 | |||
| 10 | sub sql_current_date { return 'GETDATE()' } | ||
| 11 | |||
| 12 | # Backward compatibility and convenience, so you don't have to specify | ||
| 13 | # another item in the isa -- instead just set 'syb_identity' or | ||
| 14 | # 'increment_field' to true. | ||
| 15 | |||
| 16 | sub post_fetch_id { | ||
| 17 | my ( $item, @args ) = @_; | ||
| 18 | return undef unless ( $item->CONFIG->{increment_field} or $item->CONFIG->{syb_identity} ); | ||
| 19 | return SPOPS::Key::DBI::Identity::post_fetch_id( $item, @args ); | ||
| 20 | } | ||
| 21 | |||
| 22 | |||
| 23 | 1; | ||
| 24 | |||
| 25 | __END__ |