NAME
Meta::Db::Ops - Perl module to create a database for you.
COPYRIGHT
Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.
LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
DETAILS
MANIFEST: Ops.pm
PROJECT: meta
VERSION: 0.07
SYNOPSIS
package foo;
use Meta::Db::Ops qw();
my($scod)=Meta::Db::Ops::act($connection,$dbdef);
DESCRIPTION
Give this module a few parameters and it will create a database for you.
FUNCTIONS
act($$)
export_writ($$$$)
export_hand($$$$)
export_file($$$$)
import($)
san($$$$$$$$)
sindex($$$)
FUNCTION DOCUMENTATION
- act($$)
-
This will actually do the work of creating. You need to supply a connection object and a definition object.
- export_writ($$$$)
-
This method will export the content of a database to an XML::Writer object. This method does not prepare statements since when you prepare a statement you have to know the exact number of parameters that you want and we dont: for each table the statement should be "SELECT (f1,f2,f3,...,fn) FROM table;" and the number of fields is changing. We do NOT wish to use a stupid: "SELECT * FROM table;" since we know which fields are there and we could avoid errros by doing this.
- export_hand($$$$)
-
This method does the same as export_writ except it writes everything to a file handle and takes care of the writer itself.
- export_file($$$$)
-
This method does the same as export_hand except it actually creates a new file.
- import($)
-
This method will import the content of an XML file into a database. It uses a parser to achieve this (the idea is not store the entire XML in RAM and then import it but rather do it record by record).
- san($$$$$$$$)
-
This will actually do the sanity tests.
- sindex($$$)
-
This will check that all indices are ok in the database.
BUGS
None.
AUTHOR
Name: Mark Veltzer
Email: mark2776@yahoo.com
WWW: http://www.geocities.com/mark2776
CPAN id: VELTZER
HISTORY
0.00 MV more database issues
0.01 MV md5 project
0.02 MV database
0.03 MV perl module versions in files
0.04 MV movies and small fixes
0.05 MV movie stuff
0.06 MV thumbnail user interface
0.07 MV more thumbnail issues
SEE ALSO
Nothing.
TODO
-make a routine to just provide the statement lists for creation.