From 9ae70a43779118ff6f61a8366c3185bccfb35b0d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 24 Jun 2016 11:47:45 +0200 Subject: [PATCH] ImportRun: provide historic run as a standalone... ...object --- library/Director/Objects/ImportRun.php | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 library/Director/Objects/ImportRun.php diff --git a/library/Director/Objects/ImportRun.php b/library/Director/Objects/ImportRun.php new file mode 100644 index 00000000..240b68b8 --- /dev/null +++ b/library/Director/Objects/ImportRun.php @@ -0,0 +1,39 @@ + null, + 'source_id' => null, + 'rowset_checksum' => null, + 'start_time' => null, + 'end_time' => null, + // TODO: Check whether succeeded could be dropped + 'succeeded' => null, + ); + + public function prepareImportedObjectQuery($columns = array('object_name')) + { + return $this->getDb()->select()->from( + array('r' => 'imported_row'), + $columns + )->joinLeft( + array('rsr' => 'rowset_checksum'), + 'rsr.row_checksum = r.checksum', + 'r.object_name' + )->where( + 'rsr.rowset_checksum = ?', + $this->getConnection()->quoteBinary($this->rowset_checksum) + ); + } +}