NAME
Meta::Db::Field - Object to store a definition of a field in a database.
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: Field.pm
PROJECT: meta
VERSION: 0.36
SYNOPSIS
package foo;
use Meta::Db::Field qw();
my($field)=Meta::Db::Field->new();
$field->set("String");
my($field)=Meta::Db::Field->new();
$field->set("number",$field);
DESCRIPTION
This is an object to store the definition of a single field in the database in. It will store the name of the field and its type as a 2-tuple.
FUNCTIONS
BEGIN()
new($)
init($)
get_type($)
set_type($$)
print($$)
printd($$)
printx($$)
getsql_name($$)
getsql_create($$$)
getsql_drop($$$)
getsql_add_multiple($$$)
getsql_names($$)
getsql_add($$)
TEST($)
FUNCTION DOCUMENTATION
- BEGIN()
-
This method creates the get/set methods for the following attributes: "name", "description". "type" is not auto created because of the connectivity features.
- new($)
-
Constructor for this class.
- init($)
-
This is an internal post constructor method.
- get_type($)
-
This gives you the type of the field.
- set_type($$)
-
This will set the type of the field for you.
- print($$)
-
This will print the current field for you.
- printd($$)
-
This method will print the object in DocBook XML format using a writer object received.
- printx($$)
-
This method will print the object in XML format using a writer object received.
- getsql_name($$)
-
This method will give you the fields full name (including the table and database names...).
- getsql_create($$$)
-
This method will add SQL statements to a container of SQL statements which is received which create this field entry in the database.
- getsql_drop($$$)
-
This method will add SQL statements to a container of SQL statements which is received which drop this field entry in the database.
- getsql_add_multiple($$$)
-
This method will add a statement to add the specific field.
- getsql_names($$)
-
This method will return an SQL string which is suitable for things like CREATE TABLE.
- getsql_add($$)
-
This methdd will return an SQL string which is suitable for things like ALTER TABLE ADD d int; statements.
- TEST($)
-
Test suite for this object.
SUPER CLASSES
Meta::Ds::Connected(3)
BUGS
None.
AUTHOR
Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER
HISTORY
0.00 MV initial code brought in
0.01 MV bring databases on line
0.02 MV ok. This is for real
0.03 MV make quality checks on perl code
0.04 MV more perl checks
0.05 MV check that all uses have qw
0.06 MV fix todo items look in pod documentation
0.07 MV more on tests/more checks to perl
0.08 MV change new methods to have prototypes
0.09 MV perl code quality
0.10 MV more perl quality
0.11 MV more perl quality
0.12 MV perl documentation
0.13 MV get graph stuff going
0.14 MV more perl quality
0.15 MV perl qulity code
0.16 MV more perl code quality
0.17 MV revision change
0.18 MV languages.pl test online
0.19 MV history change
0.20 MV db stuff
0.21 MV more data sets
0.22 MV perl packaging
0.23 MV db inheritance
0.24 MV PDMT
0.25 MV some chess work
0.26 MV md5 project
0.27 MV database
0.28 MV perl module versions in files
0.29 MV movies and small fixes
0.30 MV movie stuff
0.31 MV thumbnail user interface
0.32 MV more thumbnail issues
0.33 MV website construction
0.34 MV web site automation
0.35 MV SEE ALSO section fix
0.36 MV md5 issues
SEE ALSO
Meta::Db::Type(3), Meta::Ds::Connected(3), strict(3)
TODO
Nothing.