NAME FS::dbdef_table - Table objects SYNOPSIS use FS::dbdef_table; $dbdef_table = new FS::dbdef_table ( "table_name", "primary_key", $FS_dbdef_unique_object, $FS_dbdef_index_object, @FS_dbdef_column_objects, ); $dbdef_table->addcolumn ( $FS_dbdef_column_object ); $table_name = $dbdef_table->name; $dbdef_table->name ("table_name"); $table_name = $dbdef_table->primary_keye; $dbdef_table->primary_key ("primary_key"); $FS_dbdef_unique_object = $dbdef_table->unique; $dbdef_table->unique ( $FS_dbdef_unique_object ); $FS_dbdef_index_object = $dbdef_table->index; $dbdef_table->index ( $FS_dbdef_index_object ); @column_names = $dbdef->columns; $FS_dbdef_column_object = $dbdef->column; @sql_statements = $dbdef->sql_create_table; @sql_statements = $dbdef->sql_create_table $datasrc; DESCRIPTION FS::dbdef_table objects represent a single database table. METHODS new Creates a new FS::dbdef_table object. addcolumn Adds this FS::dbdef_column object. name Returns or sets the table name. primary_key Returns or sets the primary key. unique Returns or sets the FS::dbdef_unique object. index Returns or sets the FS::dbdef_index object. columns Returns a list consisting of the names of all columns. column "column" Returns the column object (see the FS::dbdef_column manpage) for "column". sql_create_table [ $datasrc ] Returns an array of SQL statments to create this table. If passed a DBI $datasrc specifying the DBD::mysql manpage, will use MySQL-specific syntax. Non-standard syntax for other engines (if applicable) may also be supported in the future. BUGS SEE ALSO the FS::dbdef manpage, the FS::dbdef_unique manpage, the FS::dbdef_index manpage, the FS::dbdef_unique manpage, the DBI manpage VERSION $Id: dbdef_table.txt,v 1.5 1999-04-08 13:39:32 ivan Exp $ HISTORY class for dealing with table definitions ivan@sisd.com 98-apr-18 gained extra functions (should %columns be an IxHash?) ivan@sisd.com 98-may-11 sql_create_table returns a list of statments, not just one, and now it does indices (plus mysql hack) ivan@sisd.com 98-jun-2 untaint primary_key... hmm. is this a hack around a bigger problem? looks like, did the same thing singles in colgroup! ivan@sisd.com 98-jun-4 pod ivan@sisd.com 98-sep-24 $Log: dbdef_table.txt,v $ Revision 1.5 1999-04-08 13:39:32 ivan convert from pod for 1.2.0 release Revision 1.2 1998/10/14 07:05:06 ivan 1.1.4 release, fix postgresql