You are here

public function MigrateSourceDB2::performRewind in Migrate 7.2

Implementation of MigrateSource::performRewind().

File

plugins/sources/db2.inc, line 143
Define a MigrateSource class for importing from IBM DB2 databases.

Class

MigrateSourceDB2
Implementation of MigrateSource, to handle imports from remote DB2 servers.

Code

public function performRewind() {
  migrate_instrument_start('db2_query');

  // Ensure we're connected to the database.
  $this
    ->connect();

  // Execute the query.
  $this->stmt = db2_exec($this->connection, $this->query);

  // Throw an exception with the error message if something went wrong.
  if (!$this->stmt) {
    $e = db2_stmt_errormsg($this->stmt);
    throw new Exception($e);
  }
  migrate_instrument_stop('db2_query');
}