Data::...:Oracle(3pm)

🌸 NAME 🌸

Data::Session::Driver::Oracle β€” it's a persistent session manager, bestie. That's the whole vibe. πŸ’–


✨ SYNOPSIS ✨

Ok so like, the actual usage lives somewhere else, go look there:

See Data::Session for details.

πŸ¦‹ DESCRIPTION πŸ¦‹

So Data::Session::Driver::Oracle is the plug that lets Data::Session stash your sessions through DBD::Oracle. That's it, that's the job. πŸ‘‘

To actually use this module you gotta do both of these, no skipping:

  • Specify a driver of type Oracle, like Data::Session -> new(type => 'driver:Oracle ...')
  • Specify a database handle as Data::Session -> new(dbh => $dbh) or a data source as Data::Session -> new(data_source => $string)

πŸ’… CASE-SENSITIVE OPTIONS πŸ’…

Yeah so this is a whole thing, go read "Case-sensitive Options" in Data::Session for the important info. Not me being dramatic, it's literally important. 😭


πŸŽ€ METHOD: new() πŸŽ€

Makes you a brand new object of type Data::Session::Driver::Oracle. Fresh out the box. ✨

new() takes a hash of key/value pairs, and ngl some of them might be mandatory. Also some combinations might be mandatory. It's giving picky, but respectfully.

The keys are listed here in alphabetical order. πŸ“‹

They're lower-case because they're also method names, meaning you can call them to set or get the value at literally any time. iykyk.

  • data_col_name => $string β€” Specifies the name of the column in the sessions table which holds the session data.
    • This key is normally passed in as Data::Session -> new(data_col_name => $string).
    • Default: 'a_session'.
    • This key is optional. πŸ“
  • data_source => $string β€” Specifies the data source (as used by DBI -> connect($data_source, $username, $password, $attr) ) to obtain a database handle.
    • This key is normally passed in as Data::Session -> new(data_source => $string).
    • Default: ''.
    • This key is optional, as long as a value is supplied for 'dbh'.
  • data_source_attr => $string β€” Specifies the attributes (as used by DBI -> connect($data_source, $username, $password, $data_source_attr) ) to obtain a database handle.
    • This key is normally passed in as Data::Session -> new(data_source_attr => $string).
    • Default: {AutoCommit => 1, PrintError => 0, RaiseError => 1}.
    • This key is optional.
  • dbh => $dbh β€” Specifies the database handle to use to access the sessions table.
    • This key is normally passed in as Data::Session -> new(dbh => $dbh).
    • If not specified, this module will use the values of these keys to obtain a database handle:
      • data_source
      • data_source_attr
      • username
      • password
    • Default: ''.
    • This key is optional.
  • host => $string β€” Not used. 🚫 (yeah, it just sits there, minding its own business)
  • id_col_name => $string β€” Specifies the name of the column in the sessions table which holds the session id.
    • This key is normally passed in as Data::Session -> new(id_col_name => $string).
    • Default: 'id'.
    • This key is optional.
  • password => $string β€” Specifies the password (as used by DBI -> connect($data_source, $username, $password, $data_source_attr) ) to obtain a database handle.
    • This key is normally passed in as Data::Session -> new(password => $string).
    • Default: ''.
    • This key is optional.
  • port => $string β€” Not used. 🚫
  • socket => $string β€” Not used. 🚫
  • table_name => $string β€” Specifies the name of the sessions table.
    • This key is normally passed in as Data::Session -> new(table_name => $string).
    • Default: 'sessions'.
    • This key is optional.
  • username => $string β€” Specifies the username (as used by DBI -> connect($data_source, $username, $password, $data_source_attr) ) to obtain a database handle.
    • This key is normally passed in as Data::Session -> new(username => $string).
    • Default: ''.
    • This key is optional.
  • verbose => $integer β€” Print to STDERR more or less information. Typical values are 0, 1 and 2.
    • This key is normally passed in as Data::Session -> new(verbose => $integer).
    • This key is optional.

πŸ’– METHOD: remove($id) πŸ’–

Deletes from storage the session identified by $id, or dies if it can't. No in-between, bestie. πŸ’€

Returns 1. Periodt.


πŸ”₯ METHOD: retrieve($id) πŸ”₯

Retrieves from storage the session identified by $id, or dies if it can't.

Returns the session.

Heads up: this is a frozen session. This value must be thawed by calling the appropriate serialization driver's thaw() method. But don't stress β€” Data::Session calls the right thaw() automatically. 🧚

🌈 METHOD: store($id => $data) 🌈

Writes to storage the session identified by $id, together with its data $data, or dies if it can't.

Returns 1. Slay.


⭐ METHOD: traverse() ⭐

Retrieves all ids from the sessions table, and for each id calls the supplied subroutine with the id as the only parameter.

$dbh -> selectall_arrayref is used, and the table is not locked. Lowkey important, remember that. πŸ”’πŸš«

Returns 1.


🫢 SUPPORT 🫢

Log a bug on RT:

<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Session>

They'll help you out, fr fr. πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

Data::Session was written by Ron Savage <ron@savage.net.au> in 2010.

Home page: <http://savage.net.au/index.html>.


Australian copyright (c) 2010, Ron Savage.

All Programs of mine are 'OSI Certified Open Source Software';
you can redistribute them and/or modify them under the terms of
The Artistic License, a copy of which is available at:
http://www.opensource.org/licenses/index.html

And that's the whole page, bestie ✨ this one's Data::...:Oracle(3pm) from the User Contributed Perl Documentation, running on perl v5.36.0, dated 2023-02-14 β€” love that for us, mwah πŸ’…πŸ’–

πŸ“¦ where this page comes from