/** * Set up this query and join the initial tables * * @see IdoQuery::initializeForPostgres For postgresql specific setup */ protected function init() { parent::init(); $this->prefix = $this->ds->getTablePrefix(); $dbType = $this->ds->getDbType(); if ($dbType === 'oracle') { $this->initializeForOracle(); } elseif ($dbType === 'pgsql') { $this->initializeForPostgres(); } $this->joinBaseTables(); $this->select->columns($this->columns); $this->prepareAliasIndexes(); }
/** * Set up this query and join the initial tables * * @see IdoQuery::initializeForPostgres For postgresql specific setup */ protected function init() { parent::init(); $this->prefix = $this->ds->getTablePrefix(); foreach (Hook::all('monitoring/idoQueryExtension') as $hook) { $extensions = $hook->extendColumnMap($this); if (!is_array($extensions)) { continue; } foreach ($extensions as $vTable => $cols) { if (!array_key_exists($vTable, $this->columnMap)) { $this->hookedVirtualTables[$vTable] = $hook; $this->columMap[$vTable] = array(); } foreach ($cols as $k => $v) { $this->columnMap[$vTable][$k] = $v; } } } $dbType = $this->ds->getDbType(); if ($dbType === 'oracle') { $this->initializeForOracle(); } elseif ($dbType === 'pgsql') { $this->initializeForPostgres(); } $this->joinBaseTables(); $this->select->columns($this->columns); $this->prepareAliasIndexes(); }