[Rt-commit] [svn] r1733 - in DBIx-SearchBuilder/trunk: .
SearchBuilder
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Sun Nov 7 09:34:16 EST 2004
Author: jesse
Date: Sun Nov 7 09:34:16 2004
New Revision: 1733
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/Changes
DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
Log:
r6216 at tinbook: jesse | 2004-11-07T14:32:41.390827Z
Updated Delete method to
1) have docs
2) return true on success, rather than a statement handle
Modified: DBIx-SearchBuilder/trunk/Changes
==============================================================================
--- DBIx-SearchBuilder/trunk/Changes (original)
+++ DBIx-SearchBuilder/trunk/Changes Sun Nov 7 09:34:16 2004
@@ -1,9 +1,13 @@
Revision history for Perl extension DBIx::SearchBuilder.
+
+
1.13
- Silenced warnings about uninitialized warnings when inserting null cols
into the database.
+ - Started adding lowercase method name aliases
+
1.12
- Better error handling for some query build failure cases
- Corrected query builder for SQLite
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm Sun Nov 7 09:34:16 2004
@@ -1049,6 +1049,12 @@
# {{{ sub Delete
+=head2 Delete
+
+ Delete this record from the database. On failure return a Class::ReturnValue with the error. On success, return 1;
+
+=cut
+
*delete = \&Delete;
sub Delete {
@@ -1072,7 +1078,14 @@
$where =~ s/AND\s$//;
my $QueryString = "DELETE FROM ". $self->Table . ' ' . $where;
- return($self->_Handle->SimpleQuery($QueryString, @bind));
+ my $return = $self->_Handle->SimpleQuery($QueryString, @bind);
+
+ if (UNIVERSAL::isa('Class::ReturnValue')) {
+ return ($return);
+ } else {
+ return(1);
+ }
+
}
# }}}
More information about the Rt-commit
mailing list