[Rt-commit] [svn] r978 - in DBIx-SearchBuilder/trunk: .
SearchBuilder/Handle
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Sat May 29 01:34:08 EDT 2004
Author: jesse
Date: Sat May 29 01:34:07 2004
New Revision: 978
Added:
DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Sybase.pm
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/MANIFEST
DBIx-SearchBuilder/trunk/META.yml
Log:
----------------------------------------------------------------------
r1730 at tinbook: jesse | 2004-05-29T05:32:24.543992Z
First cut at sybase support
----------------------------------------------------------------------
r1731 at tinbook: jesse | 2004-05-29T05:33:52.279579Z
Added a file to the manifest
----------------------------------------------------------------------
Modified: DBIx-SearchBuilder/trunk/MANIFEST
==============================================================================
--- DBIx-SearchBuilder/trunk/MANIFEST (original)
+++ DBIx-SearchBuilder/trunk/MANIFEST Sat May 29 01:34:07 2004
@@ -13,6 +13,7 @@
SearchBuilder/Handle/Informix.pm
SearchBuilder/Handle/SQLite.pm
SearchBuilder/Handle/Pg.pm
+SearchBuilder/Handle/Sybase.pm
SearchBuilder/Handle/ODBC.pm
inc/Module/Install/Base.pm
inc/Module/Install/Makefile.pm
Modified: DBIx-SearchBuilder/trunk/META.yml
==============================================================================
--- DBIx-SearchBuilder/trunk/META.yml (original)
+++ DBIx-SearchBuilder/trunk/META.yml Sat May 29 01:34:07 2004
@@ -1,5 +1,5 @@
name: DBIx-SearchBuilder
-version: 1.00_01
+version: 1.00_03
license: perl
distribution_type: module
build_requires:
Added: DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Sybase.pm
==============================================================================
--- (empty file)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Handle/Sybase.pm Sat May 29 01:34:07 2004
@@ -0,0 +1,94 @@
+# $Header: /home/jesse/DBIx-SearchBuilder/history/SearchBuilder/Handle/mysql.pm,v 1.8 2001/10/12 05:27:05 jesse Exp $
+
+package DBIx::SearchBuilder::Handle::Sybase;
+use DBIx::SearchBuilder::Handle;
+ at ISA = qw(DBIx::SearchBuilder::Handle);
+
+use vars qw($VERSION @ISA $DBIHandle $DEBUG);
+use strict;
+
+=head1 NAME
+
+ DBIx::SearchBuilder::Handle::mysql -- a mysql specific Handle object
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+=head1 AUTHOR
+
+Jesse Vincent, jesse at fsck.com
+
+=head1 SEE ALSO
+
+perl(1), DBIx::SearchBuilder
+
+=cut
+
+# {{{ sub Insert
+
+=head2 Insert
+
+Takes a table name as the first argument and assumes that the rest of the arguments
+are an array of key-value pairs to be inserted.
+
+
+If the insert succeeds, returns the id of the insert, otherwise, returns
+a Class::ReturnValue object with the error reploaded.
+
+=cut
+
+sub Insert {
+ my $self = shift;
+
+ my $sth = $self->SUPER::Insert(@_);
+ if (!$sth) {
+ return ($sth);
+ }
+ my $sql = 'SELECT @@identity';
+ my @row = $self->FetchResult($sql);
+ # TODO: Propagate Class::ReturnValue up here.
+ unless ($row[0]) {
+ return(undef);
+ }
+ $self->{'id'} = $row[0];
+
+ return ($self->{'id'});
+}
+
+
+
+# }}}
+
+
+=head2 DatabaseVersion
+
+return the mysql version, trimming off any -foo identifier
+
+=cut
+
+sub DatabaseVersion {
+ my $self = shift;
+ my $v = $self->SUPER::DatabaseVersion();
+
+ $v =~ s/\-(.*)$//;
+ return ($v);
+
+}
+
+=head2 CaseSensitive
+
+Returns undef, since mysql's searches are not case sensitive by default
+
+=cut
+
+sub CaseSensitive {
+ my $self = shift;
+ return(undef);
+}
+
+
+# }}}
+
+
More information about the Rt-commit
mailing list