Jason W. May > Data-Library-0.2 > Data::Library::ManyPerFile

Download:
Data-Library-0.2.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.2   Source  

NAME ^

Data::Library::ManyPerFile - multiple-queries-per-file support class for Data

SYNOPSIS ^

Provides repository service to Data. This package supports SQL in template files, where each file contains one or more query blocks.

DESCRIPTION ^

Format of queries in a template file is as follows:

queryname1:

[One or more SQL statements]

;;

Query name must start at beginning of line and end with a colon. Terminate is a pair of semicolons on a line by itself.

When searching through the repository for a matching tag, the first match will be used. Conflicts are not detected.

ManyPerFile recognizes when a query file is changed, and will instruct Data to reload the query from the file.

METHODS ^

new
  my $library = new Data::Library::ManyPerFile
                  ({ name => "value" ... });

Supported Library::ManyPerFile parameters:

  LIB         Search path for SQL files.  Defaults to [ "sql" ]

  EXTENSION   Filename extension for SQL files.  Defaults to ".sql"
cache
  $library->cache($tag, $data);

Caches statement handles for later fetching via lookup().

toc
  my @array = $library->toc();

Search through the library and return a list of all available entries. Does not import any of the items.

reset
  $library->reset;

Erase all entries from the cache.

AUTHOR ^

Jason W. May <jmay@pobox.com>

COPYRIGHT ^

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.

syntax highlighting: