protected function _buildIndex(Atomik_Db_Definition_Index $index) { return sprintf("CREATE INDEX %s ON %s(%s);\n", $this->_adapter->quoteIdentifier($index->name), $this->_adapter->quoteIdentifier($index->table->name), $this->_adapter->quoteIdentifier($index->column)); }
/** * Builds the JOIN part * * @return string */ protected function _buildJoinPart() { $sql = ''; if (count($this->_info['join'])) { foreach ($this->_info['join'] as $joinInfo) { $sql .= ' ' . trim(strtoupper($joinInfo['type'])) . ' JOIN ' . $this->_adapter->quoteIdentifier($joinInfo['table']) . (!empty($joinInfo['alias']) ? ' AS ' . $joinInfo['alias'] : '') . ' ON ' . $joinInfo['on']; } } return $sql; }