$attrs->{where},$attrs);
}
+=item search_like
+
+Identical to search except defaults to 'LIKE' instead of '=' in condition
+
+=cut
+
+sub search_like {
+ my $class = shift;
+ my $attrs = { };
+ if (@_ > 1 && ref $_[$#_] eq 'HASH') {
+ $attrs = pop(@_);
+ }
+ my $query = ref $_[0] eq "HASH" ? { %{shift()} }: {@_};
+ $query->{$_} = { 'like' => $query->{$_} } for keys %$query;
+ return $class->search($query, { %$attrs });
+}
+
=item slice <first> <last>
return a number of elements from the given resultset.
sub search { shift->resultset_instance->search(@_); }
sub search_literal { shift->resultset_instance->search_literal(@_); }
+sub search_like { shift->resultset_instance->search_like(@_); }
sub count { shift->resultset_instance->count(@_); }
sub count_literal { shift->resultset_instance->count_literal(@_); }
return $rs_class->new($class);
}
-=item search_like
-
-Identical to search except defaults to 'LIKE' instead of '=' in condition
-
-=cut
-
-sub search_like {
- my $class = shift;
- my $attrs = { };
- if (@_ > 1 && ref $_[$#_] eq 'HASH') {
- $attrs = pop(@_);
- }
- my $query = ref $_[0] eq "HASH" ? { %{shift()} }: {@_};
- $query->{$_} = { 'like' => $query->{$_} } for keys %$query;
- return $class->search($query, { %$attrs });
-}
-
sub _select_columns {
return keys %{$_[0]->_columns};
}