---
name: "Apache::Session::Browseable::MySQLJSON"
section: "3pm"
platform: "linux"
package: "libapache-session-browseable-perl"
version: "1.3.16-1+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Apache::Session::Browseable::MySQLJSON"
---

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

Add index and search methods to Apache::Session::MySQL

## 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.
