KiokuD...:Simple(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

✨ NAME ✨

KiokuDB::Backend::Role::Query::Simple β€” the simple query api, bestie πŸ’… (it lives in KiokuDB::Backend::Role::Query::Simple, a Perl 3pm page, so that's the whole vibe)


πŸŽ€ VERSION πŸŽ€

version 0.57 β€” yeah, she's got a number and she's proud of it 🫢


🌸 SYNOPSIS 🌸

okay so here's the tea, you literally do this:

with qw(KiokuDB::Backend::Role::Query::Simple);

sub simple_search {
    my ( $self, $proto ) = @_;

    # return all candidate entries in the root set matching fields in $proto
    return Data::Stream::Bulk::Foo->new(...);
}

that's it, that's the whole shape of it, no cap ✨


πŸ’– DESCRIPTION πŸ’–

so this role is a lil demanding ngl β€” it requires a simple_search method to be implemented. you can't just show up to this party empty-handed, bestie 😭

that method takes exactly one argument: the hash of the proto you wanna search for. that's the whole guest list.

it's still loosely defined rn, but the basic functionality is based on attribute matching, and honestly? it's giving:

$kiokudb->search({ name => "Mia" });

that will search for objects whose "name" attribute contains the string "Mia". simple, clean, iconic πŸ‘‘

more complex operations will be defined in the future β€” so like, watch this space, it's lowkey a work in progress πŸ¦‹


🌈 AUTHOR 🌈

Yuval Kogman <nothingmuch@woobling.org> β€” the author, the moment, the main character 🫢


This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so go off, remix it, redistribute it, do your thing πŸ’–


and that's the whole page, bestie β€” brought to you by perl v5.34.0, dated 2022-05-23, filed under KiokuDB::Backend::Role::Query::Simple(3pm) βœ¨πŸ’…πŸ¦‹

πŸ“¦ where this page comes from