Changeset 1761 for trunk/LATMOS-Accounts/lib/LATMOS/Accounts
- Timestamp:
- 05/06/16 08:57:49 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1758 r1761 742 742 # attr=foo => no extra white space ! 743 743 # \W is false, it is possible to have two char 744 my ($attr, $mode, $val) = $item =~ /^(\w+)(?:( \W+)(.+))?$/ or next;744 my ($attr, $mode, $val) = $item =~ /^(\w+)(?:([^\w*]+)(.+))?$/ or next; 745 745 if (!$mode) { 746 746 $mode = '~'; … … 776 776 $base->db->quote_identifier($attribute->iname), 777 777 ($mode eq '~' ? '::text' : ''), 778 $ val eq '*'778 $mode eq '=' && $val eq '*' 779 779 ? 'is not NULL' 780 : $mode eq '=' && $val eq 'NULL' 781 ? 'is NULL' 780 782 : $mode eq '~' 781 783 ? 'ILIKE ?' 782 784 : "$mode ?" 783 785 ); 784 push(@{$attrbind{$attr}}, $mode eq '~' ? '%' . $val . '%' : $val) unless($ val eq '*');786 push(@{$attrbind{$attr}}, $mode eq '~' ? '%' . $val . '%' : $val) unless($mode eq '=' && ($val eq '*' || $val eq 'NULL')); 785 787 } else { 786 788 $sql = sprintf(
Note: See TracChangeset
for help on using the changeset viewer.