• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/CPANInternal-140/DBIx-Class/lib/DBIx/Class/

Lines Matching defs:search

28   my $registered_users_rs   = $schema->resultset('User')->search({ registered => 1 });
29 my @cds_in_2005 = $schema->resultset('CD')->search({ year => 2005 })->all();
46 A new ResultSet is returned from calling L</search> on an existing
48 original, plus any new conditions added in the C<search> call.
73 my $cd_rs = $schema->resultset('CD')->search({
87 return $rs->search({
100 The L</where>, L</having> attribute, and any search conditions are
105 search attributes.
113 my $cd_rs = $schema->resultset('CD')->search({
139 See: L</search>, L</count>, L</get_column>, L</all>, L</create>.
166 automatically get one from e.g. a L</search> called in scalar context:
168 my $rs = $schema->resultset('CD')->search({ title => '100th Window' });
212 =head2 search
222 my @cds = $cd_rs->search({ year => 2001 }); # "... WHERE year = 2001"
223 my $new_rs = $cd_rs->search({ year => 2005 });
225 my $new_rs = $cd_rs->search([ { year => 2005 }, { year => 2004 } ]);
229 call it as C<search(undef, \%attrs)>.
232 my @all_artists = $schema->resultset('Artist')->search(undef, {
236 For a list of attributes that can be passed to C<search>, see
241 For more help on using joins with search, see L<DBIx::Class::Manual::Joining>.
245 sub search {
261 This method does the same exact thing as search() except it will
290 # no search, effectively just a clone
321 ? $self->throw_exception("Odd number of arguments to search")
389 It is equivalent to calling $schema->search(\[]), but if you want to ensure
390 columns are bound correctly, use C<search>.
392 Example of how to use C<search> instead of C<search_literal>
395 my @cds = $cd_rs->search(\[ 'cdid = ? AND (artist = ? OR artist = ?)', [ 'cdid', 2 ], [ 'artist', 1 ], [ 'artist', 2 ] ]);
410 return $self->search(\[ $sql, map [ __DUMMY__ => $_ ], @bind ], ($attr || () ));
454 L<resultset attributes|/ATTRIBUTES> in the same way as L</search> does.
538 my $rs = $self->search ($query, $attrs);
636 return shift->related_resultset(shift)->search(@_);
689 L</search>.
691 While this method can take an optional search condition (just like L</search>)
692 being a fast-code-path it does not recognize search attributes. If you need to
693 add extra joins or similar, call L</search> and then chain-call L</single> on the
721 $self->throw_exception('single() only takes search conditions, no attributes. You want ->search( $cond, $attrs )->single()');
747 # . "; please declare your unique constraints or use search instead";
858 Performs a search, but uses C<LIKE> instead of C<=> as the condition. Note
860 You most likely want to use L</search> with specific operators.
864 This method is deprecated and will be removed in 0.09. Use L</search()>
871 ->search({ foo => { like => 'bar' } });
879 .' Instead use ->search({ x => { -like => "y%" } })'
885 return $class->search($query, { %$attrs });
912 return $self->search(undef(), $attrs);
931 my $rs = $schema->resultset('CD')->search;
1156 C<< $rs->search ($cond, \%attrs)->count >>
1162 return $self->search(@_)->count if @_ and defined $_[0];
1201 ->search( { amount => $some_rs->count_rs->as_query } )
1211 return $self->search(@_)->count_rs if @_;
1327 $self->throw_exception("all() doesn't take any arguments, you probably wanted ->search(...)->all()");
1934 # It is not a mere key-search but a deep inspection of {from}
2222 Also takes an optional C<key> attribute, to search by a specific key or unique
2277 Takes an optional C<key> attribute to search on a specific unique constraint.
2346 Takes an optional C<key> attribute to search on a specific unique constraint.
2404 L</search> or by calling L</set_cache>.
2428 L</prefetch> attribute to L</search>.
2585 L</search>/L</find> family method depends on how you got to the resultset: it's
2601 return $self->search(
2626 point on, any joined tables are inaccessible to ->search on the resultset (as if
2629 my $rs = $schema->resultset('Bar')->search({'x.name' => 'abc'},{ join => 'x' });
2634 my $ok_rs = $rs->search({'x.other' => 1});
2639 my $broken_rs = $rs->search({'x.name' => 'def'});
2644 my $not_joined_rs = $rs2->search({'x.other' => 1});
2647 my $correctly_joined_rs = $rs2->search({'x.name' => 'def'});
2652 my $rs = $schema->resultset('Bar')->search(undef, {
2654 })->as_subselect_rs->search(undef, {
2666 return $self->result_source->resultset->search( undef, {
2713 my $rs_copy = $self->search;
3158 C<\%attrs> argument. See L</search>, L</search_rs>, L</find>,
3222 $schema->resultset('CD')->search(undef, {
3254 $rs = $schema->resultset('Employee')->search(undef, {
3303 $rs = $schema->resultset('Employee')->search(undef, {
3313 If the object against which the search is performed already has an accessor
3349 my $rs = $schema->resultset('CD')->search(
3366 my $rs = $schema->resultset('Artist')->search(
3379 my $rs = $schema->resultset('CD')->search(
3390 my $rs = $schema->resultset('Artist')->search({
3403 For more help on using joins with search, see L<DBIx::Class::Manual::Joining>.
3419 my $rs = $schema->resultset('Tag')->search(
3428 The initial search results in SQL like the following:
3439 for a C<join> attribute in the above search.
3447 my $rs = $schema->resultset('Artist')->search(
3475 This means that adding prefetch to a search() B<may alter> what is returned by
3478 my $artist_rs = $schema->resultset('Artist')->search({
3486 my $artist_rs_prefetch = $artist_rs->search( {}, { prefetch => 'cds' } );
3590 Set to 1 to cache search results. This prevents extra SQL queries if you
3593 my $resultset = $schema->resultset('Artist')->search( undef, { cache => 1 } );