From 3a8ee9cf5b9123579e2e389907e7537205905e5a Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 11 May 2012 11:40:38 +0000 Subject: [PATCH] give better example for delEntries git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12619 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Table.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 239b6d782..af731fdfe 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -3119,11 +3119,13 @@ sub getAllAttribs Error: Example: - my $table=xCAT::Table->new("notification", -create => 1,-autocommit => 0); - my %key_col = (filename=>$fname); - $table->delEntries(\%key_col); - $table->commit; - + my $table=xCAT::Table->new("nodelist"); + my %keyhash; + $keyhash{node} = "node1"; + $keyhash{groups} = "compute1"; + $table->delEntries(\%keyhash); + Build delete statement and'ing the elements of the hash + DELETE FROM nodelist WHERE ("groups" = "compute1" AND "node" = "node1") Comments: none