-Implement sourceforge feature request 1914497, nodels now will list all defined columns if only a table name without column is requested, i.e. nodels n1 nodehm.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1149 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a1c44b5870
commit
7b0c7dbfd6
@ -778,11 +778,22 @@ sub nodels
|
||||
if ($shortnames{$temp})
|
||||
{
|
||||
($table, $column) = @{$shortnames{$temp}};
|
||||
}
|
||||
else
|
||||
{
|
||||
} elsif ($temp =~ /\./) {
|
||||
($table, $column) = split('\.', $temp, 2);
|
||||
} elsif ($xCAT::Schema::tabspec{$temp}) {
|
||||
$table = $temp;
|
||||
foreach my $column (@{$xCAT::Schema::tabspec{$table}->{cols}}) {
|
||||
unless (grep /^$column$/, @{$tables{$table}}) {
|
||||
push @{$tables{$table}},[$column,"$temp.$column"];
|
||||
}
|
||||
}
|
||||
next;
|
||||
} else {
|
||||
$callback->({error=>"$temp not a valid table.column description",errorcode=>[1]});
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
unless (grep /$column/,@{$xCAT::Schema::tabspec{$table}->{cols}}) {
|
||||
$callback->({error=>"$table.$column not a valid table.column description",errorcode=>[1]});
|
||||
next;
|
||||
|
Loading…
x
Reference in New Issue
Block a user