| DBIx::Librarian::Library::OnePerFile - one-query-per-file support class |
DBIx::Librarian::Library::OnePerFile - one-query-per-file support class for DBIx::Librarian
Provides repository service to DBIx::Librarian. This package supports SQL in template files, where each file contains a single query block. A query tag corresponds to a filename (tag.EXTENSION where EXTENSION is specified at initialization and defaults to ".sql"). Searching will be done through a list of directories. The first matching file will be used. Conflicts are not detected.
OnePerFile recognizes when a query file is changed, and will instruct DBIx::Librarian to reload the query.
my $archiver = new DBIx::Librarian::Library::OnePerFile ({ name => "value" ... });
Supported Library::OnePerFile parameters:
LIB Search path for SQL files. Defaults to [ "sql" ]
EXTENSION Filename extension for SQL files. Defaults to ".sql"
TRACE Turns on function tracing in this package.
$archiver->lookup($tag);
Returns cached statement handles. If the source has changed since it was cached, returns false.
$archiver->find($tag);
Searches through the directory path in LIB for a query file named
"$tag.EXTENSION". Returns the contents of that file if successful,
and records the path for subsequent checking by lookup().
$archiver->cache($tag, $data);
Caches statement handles for later fetching via lookup().
my @array = $archiver->toc();
Search through the library and return a list of all available entries. Does not import any of the items.
Jason W. May <jmay@pobox.com>
Copyright (C) 2001 Jason W. May. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| DBIx::Librarian::Library::OnePerFile - one-query-per-file support class |