NAME
Oak::Filer::DBI - Filer to save/load data into/from DBI tables
SYNOPSIS
require
Oak::Filer::DBI;
my
$filer
= new Oak::Filer::DBI
(
io
=>
$iodbiobj
,
# mandatory, an Oak::IO::DBI object.
table
=>
"tablename"
,
# mandatory to enable load and store.
# table to work in selects and updates
where
=> {
primary
=> value},
# this is optional, once itsn't passed
# you assumes that u're creating a new object
)
my
$nome
=
$filer
->load(
"nome"
);
$filer
->store(
nome
=>
lc
(
$nome
));
DESCRIPTION
This module provides access for saving data into a DBI table, to be used by a Persistent descendant to save its data. Must pass table, and where
OBJECT METHODS
- constructor(PARAMS)
-
Called by new. You do not want do call it by yourself. Prepare to work with determined table and register (setted by privalue).
Could raise the Oak::Error::ParamsMissing exception.
- load(FIELD,FIELD,...)
-
Loads one or more properties of the selected DBI table with the selected WHERE statement. Returns a hash with the properties.
see do_sql for possible exceptions.
- store(FIELD=>VALUE,FIELD=>VALUE,...)
-
Saves the data into the selected table with the selected WHERE statement.
see do_sql for possible exceptions.
BUGS
Too early to know...
COPYRIGHT
Copyright (c) 2001 Daniel Ruoso <daniel@ruoso.com> and Rodolfo Sikora <rodolfo@trevas.net>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.