Changeset 9330

Show
Ignore:
Timestamp:
04/11/08 20:32:36 (5 years ago)
Author:
kazuho
Message:

update pod

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/DBIx-Replicate/trunk/lib/DBIx/Replicate.pm

    r9318 r9330  
    119119    dest_table   => 'tbl', 
    120120    copy_by      => [ qw/zipcode/ ], 
     121    load         => 0.5, 
    121122  }); 
    122123   
     
    131132    block        => 1000, 
    132133    extra_cond   => 'age<20', 
     134    load         => 0.1, 
    133135  }); 
    134136 
     
    144146=head1 DESCRIPTION 
    145147 
    146 ... 
     148DBIx::Replicate is a perl module that incrementally copies SQL tables using C<DBI> connections.  The granuality and speed of the copy can be controlled. 
     149 
     150=head1 FUNCTIONS 
     151 
     152=head2 dbi_replicate 
     153 
     154A functional interface of DBIx::Replicate.  Accepts following parameters through a hashref argument. 
     155 
     156=head3 src_conn 
     157 
     158C<DBI> connection to source database 
     159 
     160=head3 src_table 
     161 
     162name of the source table (mandatory) 
     163 
     164=head3 dest_conn 
     165 
     166C<DBI> connection to destination database (mandatory) 
     167 
     168=head3 dest_table 
     169 
     170name of the destination table (mandatory) 
     171 
     172=head3 columns 
     173 
     174an arrayref containing the name of columns to be copied (mandatory) 
     175 
     176=head3 extra_cond 
     177 
     178sql expression to filter rows to be copied (optional) 
     179 
     180=head3 load 
     181 
     182load average for the copy operation (optional).  The value should be greater than 0 and less or equal to 1. 
     183 
     184=head3 copy_by 
     185 
     186optionally takes an arrayref of column names.  If given, C<DBIx::Replicate::Strategy::CopyBy> will be used for copying tables.  The strategy repeatedly copies a set of rows that contain identical values in the specified columns. 
     187 
     188=head3 primary_key 
     189 
     190optionally takes an arrayref of primary key column names.  If given, C<DBIx::Replicate::Strategy::PK> will be used for copying tables.  The strategy copies certain number of rows at once specified by parameter C<block>, in the order sorted by C<primary_key>. 
     191 
     192=head3 block 
     193 
     194used together with C<primary_key> to specify the number of rows copied at once 
    147195 
    148196=head1 AUTHOR