This module is mostly about setting up the database, and setting default parameters, like the table name, the id column name, etc.
These are the base methods to interact with a record.
One is to create a record id, one to retrieve a record id. The third is to provide an id as argument, and to get back where the file *is*- this is essentially for when you get back search results from Metadata::DB::Search
argument is the file id, returns abs path and host id
argument is abs path and optionally host_id of machine file is on returns id for this file resource. If it does not exist in the database, it is created/inserted.
argument is abs_path and optionally host_id returns id of file or 0 if it's not in the files table
argument is abs_path and optionally host_id inserts data and returns id
argument is id, abs path, and optionally host id returns boolean
$self->_file_entry_exists( 5, '/home/this/that',3); $self->_file_entry_exists( 5, '/home/this/that');
argument is id of a file deletes all data from files table and metadata table
will drop ALL metatada and files locations table and rebuild this is called for re-indexing an entire archive
checks if table files exists if not creates.
creates files table
returns string for creating files table
optional argument is limit (number) returns string dump for STDERR
returns number of entries in files table
Imagine you have a path, and you want to clear all indexed data fromthere down. Maybe you indexed /home/myself/this/ and you want to drop everything in /home/myself/this/here/
argument is abs path clears all entries for that path, argument would be a directory on disk
argument is abs path, returns all ids for files indexed in that path used by tree_clear to easily deduce what should be cleared will use Cwd::abs_path to resolve
Leo Charre leocharre at cpan dot org