DBIx::...::Bare(3pm)

πŸ“¦
version 2.037000 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– DBIx::Class::Helper::ResultSet::Bare πŸ’–

okay so bestie, this page is literally DBIx::...::Bare(3pm) from the User Contributed Perl Documentation collection, and it's a lil helper module that hands you back an unsearched ResultSet. she's small, she's powerful, she's giving main character energy ✨


🌸 NAME 🌸

DBIx::Class::Helper::ResultSet::Bare β€” get an unsearched ResultSet πŸ¦‹

like... a ResultSet with zero searches on it. that's the whole vibe. no cap.


✨ SYNOPSIS ✨

package MyApp::Schema::ResultSet::KV;

__PACKAGE__->load_components(qw{Helper::ResultSet::Bare});

sub set_value {
   my ($self, $key, $value) = @_;

   $self->bare->create_or_update({
      key => $key,
      value => $value,
   });
}

1;

see how she loads the component, then calls ->bare to shake off whatever search was riding on the ResultSet before doing her create_or_update? iconic. πŸ’…


🫢 DESCRIPTION 🫢

okay so picture this: once in a blue moon πŸŒ™ you find yourself in the most frustrating position β€” you need a vanilla ResultSet, but all you've got in your hands is a ResultSet that already has a search applied to it. tragic. genuinely devastating. 😭

that's exactly what this helper is for, bestie. it gives you a method to get at an unsearched version of the ResultSet. problem solved, crisis averted, slay. πŸŽ€


πŸ‘‘ METHODS πŸ‘‘

πŸ’œ "bare"

my $plain_rs = $searched_rs->bare;

takes no arguments and returns the ResultSet as if nothing were searched against it at all. that's it. that's the method. she's simple, she's clean, she ate. πŸ”₯

no arguments, no fuss, no drama β€” just a fresh unsearched ResultSet back in your arms. periodt. πŸ’–

🌈 AUTHOR 🌈

Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>


This software is copyright (c) 2024 by Arthur Axel "fREW" Schmidt.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


and that's the whole page, bestie πŸ¦‹ tysm for reading β€” this one was generated by perl v5.40.0 on 2024-11-16, and yeah the page name is that little DBIx::...::Bare(3pm) up top πŸ’– bye bye, go unsearch those ResultSets βœ¨πŸ’…

πŸ“¦ where this page comes from