![]() |
![]()
| ![]() |
![]()
NAMERose::DB::Object::Std::Metadata - Standardized database object metadata. SYNOPSISuse Rose::DB::Object::Std::Metadata; $meta = Rose::DB::Object::Std::Metadata->new(class => 'Product'); # ...or... # $meta = Rose::DB::Object::Std::Metadata->for_class('Product'); $meta->table('products'); $meta->columns ( id => { type => 'int', primary_key => 1 }, name => { type => 'varchar', length => 255 }, description => { type => 'text' }, category_id => { type => 'int' }, status => { type => 'varchar', check_in => [ 'active', 'inactive' ], default => 'inactive', }, start_date => { type => 'datetime' }, end_date => { type => 'datetime' }, date_created => { type => 'timestamp', default => 'now' }, last_modified => { type => 'timestamp', default => 'now' }, ); $meta->add_unique_key('name'); $meta->foreign_keys ( category => { class => 'Category', key_columns => { category_id => 'id', } }, ); ... DESCRIPTION"Rose::DB::Object::Std::Metadata" is a subclass of Rose::DB::Object::Metadata that is designed to serve the needs of Rose::DB::Object::Std objects. See the Rose::DB::Object::Std documentations for information on what differentiates it from Rose::DB::Object. Only the methods that are overridden are documented here. See the Rose::DB::Object::Metadata documentation for the rest. OBJECT METHODS
AUTHORJohn C. Siracusa (siracusa@gmail.com) LICENSECopyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
|