Class::DBI::DataMigration::MapperAbstract class for mapping a single row in the source database to a single row in the target database. | |
Download |
Class::DBI::DataMigration::Mapper Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Dan Friedman
- Publisher web site:
- http://search.cpan.org/~lamech/
Class::DBI::DataMigration::Mapper Tags
Class::DBI::DataMigration::Mapper Description
Abstract class for mapping a single row in the source database to a single row in the target database. Class::DBI::DataMigration::Mapper is an abstract Perl class for mapping a single row in the source database to a single row in the target database.SYNOPSIS use Class::DBI::DataMigration::Mapper; # ... later ... # Assume we've retrieved a $source_object of class Class from the source # database, and have assembled $mappings, a ref to an appropriate hash of # Class::DBI::DataMigration::Mapping objects: my $mapper = new Class::DBI::DataMigration::Mapper({ target_cdbi_class => Class, mappings => $mappings, target_search_keys => @search_keys }); my $new_db_object = $mapper->map($source_object); # ... now $new_db_object is in the new database ... Class::DBI::DataMigration::Mapper is an abstract parent class for objects that will map a single row at a time from the source database into a single row in the new one. This is accomplished via Class::DBI; it's assumed that appropriate classes exist representing the tables in the source and target databases.Mapping is accomplished using a hash of instances of Class::DBI::DataMigration::Mapping objects. Requirements: · Perl
Class::DBI::DataMigration::Mapper Related Software