[interchange-cvs] interchange - racke modified 2 files
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Aug 2 06:43:05 EDT 2007
User: racke
Date: 2007-08-02 10:43:05 GMT
Modified: . WHATSNEW-5.5
Modified: lib/Vend/Table DBI.pm
Log:
set_slice now skips updates on existing records when we have only key
columns (#98)
Revision Changes Path
1.40 +3 -0 interchange/WHATSNEW-5.5
rev 1.40, prev_rev 1.39
Index: WHATSNEW-5.5
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.5,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- WHATSNEW-5.5 6 Jul 2007 13:54:34 -0000 1.39
+++ WHATSNEW-5.5 2 Aug 2007 10:43:04 -0000 1.40
@@ -72,6 +72,9 @@
* Superfluous Vend::Interpolate::sort_cart function removed (#70).
+* set_slice now skips updates on existing records when we have only key
+ columns (#98).
+
UserDB
------
2.78 +6 -2 interchange/lib/Vend/Table/DBI.pm
rev 2.78, prev_rev 2.77
Index: DBI.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/DBI.pm,v
retrieving revision 2.77
retrieving revision 2.78
diff -u -r2.77 -r2.78
--- DBI.pm 11 Jun 2007 08:27:55 -0000 2.77
+++ DBI.pm 2 Aug 2007 10:43:05 -0000 2.78
@@ -1,6 +1,6 @@
# Vend::Table::DBI - Access a table stored in an DBI/DBD database
#
-# $Id: DBI.pm,v 2.77 2007/06/11 08:27:55 racke Exp $
+# $Id: DBI.pm,v 2.78 2007/08/02 10:43:05 racke Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -21,7 +21,7 @@
# MA 02110-1301 USA.
package Vend::Table::DBI;
-$VERSION = substr(q$Revision: 2.77 $, 10);
+$VERSION = substr(q$Revision: 2.78 $, 10);
use strict;
no warnings qw(uninitialized numeric);
@@ -1230,6 +1230,10 @@
if ( defined $tkey and $s->record_exists($key) ) {
+ unless (@$fary) {
+ # as there are no data columns, we can safely skip the update
+ return $key;
+ }
my $fstring = join ",", map { "$_=?" } @$fary;
$sql = "update $s->[$TABLE] SET $fstring WHERE $s->[$KEY] = $tkey";
}
More information about the interchange-cvs
mailing list