/[BackupPC]/trunk/dbxml/convert_pgsql_xmldb.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/dbxml/convert_pgsql_xmldb.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 221 by dpavlin, Sat Oct 22 15:40:38 2005 UTC revision 223 by dpavlin, Sat Oct 22 15:40:42 2005 UTC
# Line 82  join backups on shares.hostid = backups. Line 82  join backups on shares.hostid = backups.
82          and files.backupnum = backups.num          and files.backupnum = backups.num
83          and shares.id = backups.shareid          and shares.id = backups.shareid
84  order by backups.date  order by backups.date
85    limit 1000
86  };  };
87    
88  _debug("prepare");  _debug("prepare");
# Line 96  my $next_update = 0; Line 97  my $next_update = 0;
97    
98  while (my $row = $sth->fetchrow_hashref() ) {  while (my $row = $sth->fetchrow_hashref() ) {
99    
100          my $xml = XMLout( $row );          my $xml = XMLout( $row, NoAttr => 1, RootName => 'file' );
101          if ($xml) {          if ($xml) {
102                  # Set the XmlDocument to the relevant string and then put it                  # Set the XmlDocument to the relevant string and then put it
103                  #  into the container.                  #  into the container.
# Line 126  while (my $row = $sth->fetchrow_hashref( Line 127  while (my $row = $sth->fetchrow_hashref(
127    
128  # Commit the writes. This causes the container write operations  # Commit the writes. This causes the container write operations
129  #   to be saved to the container.  #   to be saved to the container.
130  _debug("commit");  _debug("final commit");
131  $txn->commit();  $txn->commit();
132    

Legend:
Removed from v.221  
changed lines
  Added in v.223

  ViewVC Help
Powered by ViewVC 1.1.26