DBIx::...Columns(3pm)

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

✨ NAME ✨

okay bestie, so this page lives in the User Contributed Perl Documentation section of your man pages, and it's all about one thing:

DBIx::Class::Helper::ResultSet::RemoveColumns β€” literally just: remove columns from a ResultSet. that's the whole job. she's focused. πŸ’…


🌸 SYNOPSIS 🌸

package MySchema::ResultSet::Bar;

use strict;
use warnings;

use parent 'DBIx::Class::ResultSet';

__PACKAGE__->load_components('Helper::ResultSet::RemoveColumns');

# in code using resultset:
my $rs = $schema->resultset('Bar')->search(undef, {
   remove_columns => ['giant_text_col', 'password'],
});

like. look at her. so simple. no cap. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this component lets you conveniently remove columns from a select. iconic, right?

normally if you wanted to do this you'd have to sit there and list every single column except the ones you want to remove. every. single. one. exhausting. πŸ™ˆ this component does that part for you. the tedious part. gone. slay.

pssst β€” go look at "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it to your entire schema. you're welcome bestie 🫢

and honestly? it does not get a lot more complicated than the synopsis. that's it. that's the whole thing. if you are interested in having more control, go check out DBIx::Class::Helper::ResultSet::AutoRemoveColumns instead. she's got range. 🌈

the entire to-do list, in order:

  • Load the component ✨
  • Put an "ArrayRef" of columns to remove in the "remove_columns" search attribute πŸ’–
  • Profit. πŸ’° periodt.

πŸ‘‘ AUTHOR πŸ‘‘

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

yes, the whole legend. main character energy, honestly.


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.

like, free free. go wild, just keep the same terms. legally iconic. 🌸


k so that's the whole page, and the footer is serving perl v5.40.0, dated 2024-11-16, filed under DBIx::...Columns(3pm). love that for us. bye bestie, go remove some columns πŸ’œπŸ§š

πŸ“¦ where this page comes from