NAME

Metadata::DB::Base

CONSTRUCTOR

new()

argument is hash ref you must pass DBH, database handle, to the object. This is a database handle you opened before instancing the object If you wanted to change the name of the table..

my $m = Metadata::DB::Base({ DBH => $dbh });
$m->table_metadata_name('other_metadata_table'); # default is 'metadata'
$m->table_metadata_check; # make sure the table is there, if you wanted to setup

SETUP AND DB METHODS

dbh()

returns database handle The DBI handle is passed to the CONSTRUCTOR You will need LEOCHARRE::Database

table_metadata_exists()

does the metadata table exist or not? returns boolean.

table_metadata_create()

creates metadata table, does not check for existance

table_metadata_dump()

optional argument is limit returns debug string with a pseudo metadata table dump, suitable for printing to STDERR for debug purposes.

table_metadata_layout()

returns what the metadata table is expected to look according to current params could be useful if you're having a hard time with all of this. If you turn DEBUG to on, this is printed to STDERR .

table_metadata_check()

create table if not exists

table_metadata_drop()

drops metadata table erases all records

table_metadata_reset()

drops and rebuilds metadata table erases all records

create_index_id()

creates an index for id col

create_index()

args are table name and column name

RECORD METHODS

_record_entries_delete()

arg is id deletes all metadata entries for this record from metadata table (does not commit, etc)

_record_entries_count()

arg is id, returns number of record entries in metadata table

_table_metadata_insert()

arg is id, key, val

_table_metadata_insert_multiple()

arg is id and hashref the hash ref is the metadata key value pairs this is mostly used for indexing

$self->_table_metadata_insert_mutiple(
   5,
   {
      name_first => 'jim',
      name_middle => 'raynor',
      name_last => 'waltzman',
      phone_number => '208-479-1515',
   },
);

_record_entries_hashref()

arg is id returns hashref

CREATE INDEXES

This is to VASTLY improve the speeds of searches

use method create_index_id() after running an indexing run for example

SEE ALSO

Metadata::DB Metadata::DB::Indexer Metadata::DB::WUI Metadata::Base LEOCHARRE::Database

AUTHOR

Leo Charre leocharre at cpan dot org

CAVEATS

Still in development Make sure you have the latest versions of DBI and DBD::mysql

BUGS

Send to AUTHOR

1 POD Error

The following errors were encountered while parsing the POD:

Around line 525:

Unknown directive: =ct