NAME

blx::xsdsql::xml::generic::table - a generic table class

SYNOPSIS

use blx::xsdsql::xml::generic::table

DESCRIPTION

this package is a class - instance it with the method new

FUNCTIONS

this module defined the followed functions

new - contructor

PARAMS: 
	COLUMNS  			- a pointer too an array of  column objects (default [])
	CHILD_TABLES 		- pointer too an array of table objects (default [])
	XSD_SEQ  			- a XSD_SEQ start number 
	XSD_TYPE			- xsd type - see XSD_TYPE_* constants 
	CHOICE 				- the table is associated to a choice
	MINOCCURS 			- the table as a minoccurs 
	MAXOCCURS 			- the table as a maxoccurs
	PATH    			- a node path name 
	TYPE 				- an internal node type
	NAME 				- a node name 
	DEEP_LEVEL			- a deep level - the root has level 0
	INTERNAL_REFERENCE  - if true the the table is an occurs of simple types
	TYPES  				- a pointer to an array of table types (only for root)
	PARENT_PATH			- a path of parent table if table path is not set
	TABLE_DICTIONARY 	- a pointer to table dictionary (only for root)
	COLUMN_DICTIONARY 	- a pointer to column dictionary (only for root)
	RELATION_DICTIONARY - a pointer to a relation dictionary (only for root)

	

add_columns - add columns to a table

the params are a list of columns
the method return a self object

reset_columns - reset the columns of the table

the method return  the columns

get_columns - return an array of columns object

add_child_tables - add child tables to a table

	the params are a list of tables
	the method return a self object

 

find_columns - find columns that match the pairs attributes => value

the method return an array of columns object

get_child_tables - return an array of child tables

set_attrs_value - set a value of attributes

the arguments are a pairs NAME => VALUE	
the method return a self object

get_attrs_value - return a list of attributes values

the arguments are a list of attributes name

get_sql_name - return the sql name

get_constraint_name - return a constraint name

the first argument must be the constant 'pk' (primary key)

get_pk_columns - return the primary key columns

is_type - return true if the table is associated to a xsd type

is_simple_type - return true if the table is associated to a xsd simple type

is_complex_type - return true if the table is associated to a xsd complex type

is_simple_content_type - return true if the table is associated to a xsd simple content type

is_group_type - return true if the table is associated to a xsd group type

is_choice - return true if the table is associated to a xsd choice

is_internal_reference - return true if the the table is an occurs of simple types

is_unpath - return true if the table is not associated to a path

get_xsd_seq - return the start xsd sequence

get_xsd_type - return the xsd type og the object - see the constants XSD_TYPE_*

get_min_occurs - return the min occurs of the table

get_max_occurs - return the max occurs of the table

get_path - return the xml path associated with table

get_dictionary_data - return an hash of dictionary column name => value for the insert into dictionary

the first argument must be:
	TABLE_DICTIONARY - return data for table dictionary
	RELATION_DICTIONARY - return data for relation dictionary
	COLUMN_DICTIONARY - return data for column dictionary

get_deep_level - return the deep level - the root has level 0

get_parent_path - return the parent path if is_unpath is true

EXPORT

None by default.

EXPORT_OK

none

SEE ALSO

See blx::xsdsql::xml::generic::catalog, it's the base class

See blx:.xsdsql::generator for generate the schema of the database and blx::xsdsql::parser for parse a xsd file (schema file)

AUTHOR

lorenzo.bellotti, <pauseblx@gmail.com>

COPYRIG

Copyright (C) 2010 by lorenzo.bellotti

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html