OOM/Tutorial/Searching.pm

filter: Statementstmt 100% 1 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 100% 1 / 1 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« OOM/Tutorial/Schema.pm ↑ Summary
1 package OpenERP::OOM::Tutorial::Searching;
2  
3 # FIXME: should this be a pod file instead?
4  
5 =pod
6  
7 =head1 NAME
8  
9 OpenERP::OOM::Tutorial::Searching
10  
11 =head1 DESCRIPTION
12  
13 =head1 Complex Search Terms
14  
15 OpenERP allows logic operators like most database wrappers, just
16 a little stranger. It uses postfix style operators to allow you
17 to or things together. You can also use '&' as an operator.
18  
19 my $products = $schema->class('Product');
20 $products->search('|', '|',
21 [ 'default_code', 'ilike', '%' . $query . '%' ],
22 [ 'description', 'ilike', '%' . $query . '%' ],
23 [ 'name', 'ilike', '%' . $query . '%' ]);
24  
25 For more details see the OpenERP Developer book.
26  
27 =cut
28  
29 1 1;
« OOM/Tutorial/Schema.pm ↑ Summary