Christopher Berning > DBIx-XML-DataLoader-1.1b > DBIx::XML::DataLoader::DB

Download:
DBIx-XML-DataLoader-1.1b.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source  

NAME ^

        DBIx::XML::DataLoader::DB

SYNOPSIS ^

        use DBIx::XML::DataLoader::DB;
        my $db=DB->new(dbmode=>"insertupdate", dbprint=>"dbprint");
        
        my $dbh=$db->DBConnect($DBLOG, $DBPASS, $DATA_SOURCE);

                
        my ($response, $error,$load)=$db->DBInsertUpdate(
                        datainfo=>\@inserts_data, 
                        dbconnections=>$db_connections
                        );

DESCRIPTION ^

        This module is hard coded for use with oracle. To change this setting edit the line 
        use DBI::Oracle to reflect your database choice 
       This module is used primarily inside DataLoader.pm. It is also used in the sample 
       script query_cb.pl
        DBInsertUpdate needs passed to a hash containing a arrayref to a array 
        of hashes containing the data that will be worked with, and dbconnections 
        a hashref to a hash of dbconnections keyed by handle names. 

        The hashes contained in the array of data should have the folowing keys
                cols: a array of the columns that are in this table
                table: the name of the table for this data
                keys: the key columns in the table
                results: a array of row hashes containing the data for each cell 
                        in the a table row. The hashes are keyed by column name. 
                dbname: the name of the db handle that will be used.

        The hash containing the dbconnections contains blessed db connection objects keyed
        by handle names.

        The items returned by the module are message, errors, and load(if dbmode=>"sqlloader");

Options ^

        These are the options you can pass to DB.pm
        
        
        dbmode:  Options are 
                        insertupdate: attempts to do a update and if that fails, a insert 
                                      is done
                        insert: attempts to do a insert only
                        update: attempts to do a update only
                        sqlloader: passes back a extra varibale that will contain data 
                                   suitable for writing to a file for use with sqlloader
                        
                default is insertupdate

        dbprint: Options are
        
                        db: tells the module to do the selected dbmode
                        print: simulate doing the dbmode, and add to $response the 
                               statements that would have been passed to the database
                        dbandprint: do both the operations above.

                default is db

Also see man page for ^

               DBIx::XML::DataLoader::XMLWriter,  and DBIx::XML::DataLoader

Sample Scripts ^

              


syntax highlighting: