/[cvs]/nfo/perl/libs/Data/Storage/Handler/Tangram.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage/Handler/Tangram.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.31 by joko, Sat Apr 5 21:24:09 2003 UTC revision 1.32 by joko, Tue Apr 8 22:52:22 2003 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.32  2003/04/08 22:52:22  joko
7    #  modified 'querySchema': better behaviour regarding filtering result
8    #
9  #  Revision 1.31  2003/04/05 21:24:09  joko  #  Revision 1.31  2003/04/05 21:24:09  joko
10  #  modified 'sub getChildNodes': now contains code from 'querySchema'  #  modified 'sub getChildNodes': now contains code from 'querySchema'
11  #  #
# Line 235  sub getChildNodes { Line 238  sub getChildNodes {
238    
239    my $self = shift;    my $self = shift;
240    my $mode = shift;    my $mode = shift;
241      my $filter = shift;
242      
243    $mode ||= 'core';    $mode ||= 'core';
244      $filter ||= 'all';
245        
246    $logger->debug( __PACKAGE__ . "->getChildNodes($mode)" );    $logger->debug( __PACKAGE__ . "->getChildNodes($mode)" );
247    
# Line 277  sub getChildNodes { Line 283  sub getChildNodes {
283        push @concret_names, $_  if (!Class::Tangram::class_is_abstract($_));        push @concret_names, $_  if (!Class::Tangram::class_is_abstract($_));
284        $o_cnt++;        $o_cnt++;
285      }      }
286      
287      my $result = {      if ($filter eq 'all') {
288        all => \@object_names,        return \@object_names;
289        concrete => \@concret_names,      } elsif ($filter eq 'concrete') {
290      };        return \@concret_names;
291      return $result;      }
292        
293    }    }
294        
# Line 554  sub sendQuery { Line 560  sub sendQuery {
560    
561    # HACK: special case: querying by id does not translate into a common tangram query    # HACK: special case: querying by id does not translate into a common tangram query
562    # just load the object by given id(ent)    # just load the object by given id(ent)
563    if ($query->{criterias}->[0]->{key} eq 'id' && $query->{criterias}->[0]->{op} eq 'eq') {    if ($query->{criterias} && ($query->{criterias}->[0]->{key} eq 'id' && $query->{criterias}->[0]->{op} eq 'eq')) {
564      #print "LOAD!!!", "\n";      #print "LOAD!!!", "\n";
565      #exit;      #exit;
566      #return Set::Object->new( $self->{COREHANDLE}->load($query->{criterias}->[0]->{val}) );      #return Set::Object->new( $self->{COREHANDLE}->load($query->{criterias}->[0]->{val}) );

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed