Apache...QLJSON(3pm)

okay bestie, welcome to Apache...QLJSON(3pm), straight out of the User Contributed Perl Documentation section of your local man pages. it's giving "small module, very specific job" and honestly? we love that for it. let's get into it πŸ’…


✨ NAME ✨

Apache::Session::Browseable::MySQL β€” the glow-up of Apache::Session::MySQL that adds index and search methods to it. that's the whole vibe: same session energy, but now you can find stuff. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

so first things first: you gotta create a table with columns for your indexed fields, okay? here's the example for Lemonldap::NG β€” and yes it includes the optional virtual tables and indexes, we're doing the full thing:

CREATE TABLE sessions (
    id varchar(64) not null primary key,
    a_session json,
    as_wt varchar(32) AS (a_session->"$._whatToTrace") VIRTUAL,
    as_sk varchar(12) AS (a_session->"$._session_kind") VIRTUAL,
    as_ut bigint AS (a_session->"$._utime") VIRTUAL,
    as_ip varchar(40) AS (a_session->"$.ipAddr") VIRTUAL,
    KEY as_wt (as_wt),
    KEY as_sk (as_sk),
    KEY as_ut (as_ut),
    KEY as_ip (as_ip)
) ENGINE=InnoDB;

then you use it with Perl, like so 🐚:

use Apache::Session::Browseable::MySQLJSON;

my $args = {
     DataSource => 'dbi:mysql:sessions',
     UserName   => $db_user,
     Password   => $db_pass,
     LockDataSource => 'dbi:mysql:sessions',
     LockUserName   => $db_user,
     LockPassword   => $db_pass,

     # Choose your browseable fileds
     Index          => 'uid mail',
};

(and yeah, fileds is spelled exactly like that in the original, we're keeping it, no cap πŸ™ˆ)

last thing: use it like Apache::Session::Browseable::MySQL. that's it. that's the instruction. iconic. ⭐


πŸ’– DESCRIPTION πŸ’–

Apache::Session::browseable hands you a bunch of class methods so you can manipulate all the sessions at once, plus the ability to index some fields so your research is way faster. main character energy for your query performance, honestly πŸ”₯

Apache::Session::Browseable::MySQLJSON implements all of that for MySQL databases, using the "json" type so you can actually browse your sessions. slay. 🫢

⚠️ THIS MODULE ISN'T USABLE WITH MARIADB FOR NOW. β€” like, literally not usable. don't come for me, that's just what the docs say πŸ˜­πŸ’€

🌈 SEE ALSO 🌈

go touch some of these:


the credits, because we respect the icons who built this πŸŽ€:

  • 2009-2025 by Xavier Guimard
  • 2013-2025 by ClΓ©ment Oudot
  • 2019-2025 by Maxime Besson
  • 2013-2025 by Worteks
  • 2023-2025 by Linagora

and the legal bit, verbatim vibes: this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available. πŸ’œ


and that's the page, bestie 🧚 this little doc drop is from perl v5.40.1, dated 2026-05-14 β€” go forth and index those fields, mwah πŸ’‹

πŸ“¦ where this page comes from