1Apache::Session::BrowseUasbelre:C:oMnytSrQiLbJuStOeNdA(p3Pa)ecrhle:D:oSceusmseinotna:t:iBornowseable::MySQLJSON(3)
2
3
4
6 Apache::Session::Browseable::MySQL - Add index and search methods to
7 Apache::Session::MySQL
8
10 Create table with columns for indexed fields. Example for Lemonldap::NG
11 with optional virtual tables and indexes:
12
13 CREATE TABLE sessions (
14 id varchar(64) not null primary key,
15 a_session json,
16 as_wt varchar(32) AS (a_session->"$._whatToTrace") VIRTUAL,
17 as_sk varchar(12) AS (a_session->"$._session_kind") VIRTUAL,
18 as_ut bigint AS (a_session->"$._utime") VIRTUAL,
19 as_ip varchar(40) AS (a_session->"$.ipAddr") VIRTUAL,
20 KEY as_wt (as_wt),
21 KEY as_sk (as_sk),
22 KEY as_ut (as_ut),
23 KEY as_ip (as_ip)
24 ) ENGINE=InnoDB;
25
26 Use it with Perl:
27
28 use Apache::Session::Browseable::MySQLJSON;
29
30 my $args = {
31 DataSource => 'dbi:mysql:sessions',
32 UserName => $db_user,
33 Password => $db_pass,
34 LockDataSource => 'dbi:mysql:sessions',
35 LockUserName => $db_user,
36 LockPassword => $db_pass,
37
38 # Choose your browseable fileds
39 Index => 'uid mail',
40 };
41
42 Use it like Apache::Session::Browseable::MySQL
43
45 Apache::Session::browseable provides some class methods to manipulate
46 all sessions and add the capability to index some fields to make
47 research faster.
48
49 Apache::Session::Browseable::MySQLJSON implements it for MySQL
50 databases using "json" type to be able to browse sessions.
51
52 THIS MODULE ISN'T USABLE WITH MARIADB FOR NOW.
53
55 Apache::Session, Apache::Session::Browseable::MySQL,
56 <http://lemonldap-ng.org>
57
59 Xavier Guimard, <x.guimard@free.fr>
60
62 Copyright (C) 2009-2017 by Xavier Guimard
63 2013-2017 by Clement Oudot
64
65 This library is free software; you can redistribute it and/or modify it
66 under the same terms as Perl itself, either Perl version 5.10.1 or, at
67 your option, any later version of Perl 5 you may have available.
68
69
70
71perl v5.32.1 2021A-p0a1c-h2e6::Session::Browseable::MySQLJSON(3)