The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

String::Lookup::DBI - flush String::Lookup using DBI compatible database handle

SYNOPSIS

use String::Lookup;

tie my %lookup, 'String::Lookup',

  # standard persistent storage parameters
  storage => 'DBI', # store using DBI compatible database handle
  tag     => $tag,  # possibly fully qualified table name
  fork    => 1,     # fork for each flush, default: no

  # parameters specific to 'DBI'
  dbh    => $dbh,         # database handle to be used
  id     => $id_name,     # name of "id" column, default: 'id'
  string => $string_name, # name of "string" column, default: 'name'

  # other parameters for String::Lookup
  ...
;

VERSION

This documentation describes version 0.14.

DESCRIPTION

This module is a class for providing persistent storage for lookup hashes, as provided by String::Lookup.

Please see the METHODS IN STORAGE MODULE section in String::Lookup for documentation on which methods this storage class provides.

ADDITIONAL PARAMETERS

The following additional parameters are provided by this storage class:

dbh
tie my %lookup, 'String::Lookup',
  dbh    => $dbh,         # database handle to be used
;

Indicate the DBI compatible database handle to be used to store the lookup hash. Must be specified.

id
tie my %lookup, 'String::Lookup',
  id     => $id_name,     # name of "id" column, default: 'id'
;

Indicate the name of the column for storing "id" values. Defaults to id.

string
tie my %lookup, 'String::Lookup',
  string => $string_name, # name of "string" column, default: 'name'
;

Indicate the name of the column for storing strings. Defaults to name.

REQUIRED MODULES

(none)

AUTHOR

Elizabeth Mattijsen

COPYRIGHT

Copyright (c) 2012 Elizabeth Mattijsen <liz@dijkmat.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.