Apache::Session::Browseable::MySQLJSON(3pm)

NAME
Apache::Session::Browseable::MySQL - Add index and search methods to Apache::Session::MySQL

SYNOPSIS
Create table with columns for indexed fields. Example for Lemonldap::NG with optional virtual tables and indexes:

  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;

Use it with Perl:

  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',
  };

Use it like Apache::Session::Browseable::MySQL

DESCRIPTION
Apache::Session::browseable provides some class methods to manipulate all sessions and add the capability to index some fields to make research faster.

Apache::Session::Browseable::MySQLJSON implements it for MySQL databases using "json" type to be able to browse sessions.

THIS MODULE ISN'T USABLE WITH MARIADB FOR NOW.

SEE ALSO
Apache::Session, Apache::Session::Browseable::MySQL, <http://lemonldap-ng.org>

COPYRIGHT AND LICENSE

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

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.