diff options
author | ivan <ivan> | 1998-09-25 08:52:48 +0000 |
---|---|---|
committer | ivan <ivan> | 1998-09-25 08:52:48 +0000 |
commit | 08f52e31c5f777963d565085d077c9d8d9734e17 (patch) | |
tree | 12cadac5ed336b42861b7df1907fd74c0bda5944 /htdocs/docs/man/dbdef_table.txt | |
parent | 693939e7879f77a52b9e482a0f6bf2e80f8f7020 (diff) |
Initial revision
Diffstat (limited to 'htdocs/docs/man/dbdef_table.txt')
-rw-r--r-- | htdocs/docs/man/dbdef_table.txt | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/htdocs/docs/man/dbdef_table.txt b/htdocs/docs/man/dbdef_table.txt new file mode 100644 index 000000000..25e010d8b --- /dev/null +++ b/htdocs/docs/man/dbdef_table.txt @@ -0,0 +1,94 @@ +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 + +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 + |