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' |
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 |
|
|
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 |