Lucy::...lyQuery(3pm)

πŸ“¦
version 0.6.2 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Lucy::Search::PolyQuery β€” the base class energy for all your composite Query objects, bestie 🫢


✨ SYNOPSIS ✨

sub walk {
    my $query = shift;
    if ( $query->isa("Lucy::Search::PolyQuery") ) {
        if    ( $query->isa("Lucy::Search::ORQuery") )  { ... }
        elsif ( $query->isa("Lucy::Search::ANDQuery") ) { ... }
        elsif ( $query->isa("Lucy::Search::RequiredOptionalQuery") ) {
            ...
        }
        elsif ( $query->isa("Lucy::Search::NOTQuery") ) { ... }
    }
    else { ... }
}

look at that little type-checking cascade, it's giving very demure, very mindful πŸŽ€


🌸 DESCRIPTION 🌸

okay so. PolyQuery is the shared base class β€” the group chat that everyone's in β€” for ANDQuery, ORQuery, NOTQuery, and RequiredOptionalQuery. πŸ’…

and here's the iconic part: all of these classes can serve as nodes in a composite Query with a tree structure which may be walked. 🌳✨ like, a whole tree of queries, and you can just... walk it. main character behavior fr fr.


πŸ¦‹ METHODS πŸ¦‹

add_child

$poly_query->add_child($query);

Add a child Query node. that's it, that's the whole thing β€” you're literally just handing your poly query a baby query to hold πŸΌπŸ’–


πŸ‘‘ INHERITANCE πŸ‘‘

Lucy::Search::PolyQuery isa Lucy::Search::Query isa Clownfish::Obj.

three generations of slay, the lineage is immaculate 🌈


and that's the whole page, bestie β€” this was Lucy::...lyQuery(3pm), part of the User Contributed Perl Documentation, hanging out with perl v5.42.0 and dated 2025-07-25. go walk a query tree for me, ily, bye πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from