DBIx::...:Unique(3pm)
πΈ NAME πΈ
DBIx::SearchBuilder::Unique β bestie, it makes sure your records stay unique in a collection. No dupes, no drama. π
(You're reading the DBIx::...:Unique(3pm) page, straight outta User Contributed Perl Documentation, and honestly? It's giving underrated.)
β¨ SYNOPSIS β¨
package Foo::Collection;
use base 'DBIx::SearchBuilder';
use DBIx::SearchBuilder::Unique; # mixin
my $collection = Foo::Collection->New();
$collection->SetupComplicatedJoins;
$collection->OrderByMagic;
while (my $thing = $collection->Next) {
# $thing is going to be distinct
}
Look at that use DBIx::SearchBuilder::Unique; # mixin line. That's the whole move, iykyk. π«Ά
π DESCRIPTION π
Okay so here's the tea. πΈ Right now, DBIx::SearchBuilder makes exceptions for databases that can't handle both SELECT DISTINCT and ordering in the same statement β it just drops the DISTINCT requirement. Which, yeah, means the same row can show up twice. You might not want that. π
If that's your situation, use this module as a mix-in, and it will hand you an AddRecord method that makes sure a record will not appear twice in the same search. Periodt. π
That's the whole page, babe β no cap. Go forth and dedupe. π¦
This one's perl v5.40.1, dated 2026-05-07, and it's DBIx::...:Unique(3pm) β iconic of it, honestly. π
π¦ where this page comes from
- ubuntu stonking: libdbix-searchbuilder-perl 1.85-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms