/[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.34 by joko, Fri Apr 11 01:18:53 2003 UTC revision 1.35 by jonen, Sat Apr 19 16:09:48 2003 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.35  2003/04/19 16:09:48  jonen
7    #  + added operator dispatching (currently for getting ref-type) at 'getListFiltered'
8    #
9  #  Revision 1.34  2003/04/11 01:18:53  joko  #  Revision 1.34  2003/04/11 01:18:53  joko
10  #  sendQuery:  #  sendQuery:
11  #  + introduced crud action 'DELETE'  #  + introduced crud action 'DELETE'
# Line 506  sub getListFiltered { Line 509  sub getListFiltered {
509    #    objects => $objects,    #    objects => $objects,
510    #  );    #  );
511        
512      # HACK: build eval-string (sorry) to get filtered list - please give advice here      # TODO: is_op?
513      push @tfilters, '$remote->{' . $filter->{key} . '}' . " $filter->{op} '$filter->{val}'";      # dispatch un-common operators if exists
514        if($filter->{op} eq "ref") {
515          push @tfilters, 'ref($remote->{' . $filter->{key} . '})' . " eq '$filter->{val}'";
516        } else {
517          # HACK: build eval-string (sorry) to get filtered list - please give advice here
518          push @tfilters, '$remote->{' . $filter->{key} . '}' . " $filter->{op} '$filter->{val}'";
519        }
520    
521    }    }
522    
# Line 590  sub sendQuery { Line 599  sub sendQuery {
599            
600      } elsif (my $guid = $query->{options}->{GUID}) {      } elsif (my $guid = $query->{options}->{GUID}) {
601        $type = 'TRANSPARENT';        $type = 'TRANSPARENT';
602        $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ];        $query->{criterias} = [ { key => 'guid', op => 'eq', val => $guid } ];    
603        
604        # if operator is different (dispatcher for 'getListFiltered')
605        } elsif (my $op = $query->{options}->{op}) {
606          $type = 'TRANSPARENT';
607          $query->{criterias} = [ { key => $query->{options}->{meta_label}, op => $op, val => $query->{options}->{meta_value} } ];    
608    
609      }      }
610        
611      # 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

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

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