/** @override */ public function saveItems(array $itemData, EarthIT_Schema_ResourceClass $rc, array $options = array()) { EarthIT_Storage_Util::defaultSaveItemsOptions($options); $queries = $this->sqlGenerator->makeBulkSaveQueries($itemData, $rc, $options); $resultRows = array(); foreach ($queries as $q) { list($sql, $params) = EarthIT_DBC_SQLExpressionUtil::templateAndParamValues($q); if ($q->returnsStuff()) { $resultRows = array_merge($resultRows, $this->sqlRunner->fetchRows($sql, $params)); } else { $this->sqlRunner->doQuery($sql, $params); } } if ($options[EarthIT_Storage_ItemSaver::RETURN_SAVED]) { return $this->sqlGenerator->dbExternalToSchemaItems($resultRows, $rc); } }
protected function _queryRows($sql, array $params = array()) { list($sql, $params) = EarthIT_DBC_SQLExpressionUtil::templateAndParamValues($sql, $params); return $this->sqlRunner->fetchRows($sql, $params); }