src/Squid/MySql/Impl/Command/CmdCreate.php
public function assemble()
	{
		$command = 
			'CREATE ' . 
				$this->getPartIfSet(self::PART_TEMP) .
			'TABLE ' . 
				$this->getPartIfSet(self::PART_IF_NOT_EXIST) .
				$this->parts[self::PART_DB] . $this->parts[self::PART_NAME];
		
		if ($this->parts[self::PART_LIKE])
		{
			return $command . ' ' . $this->parts[self::PART_LIKE];
		}
		
		if (!$this->columnsList->isEmpty())
		{
			$command .= '(';
			
			$columns = $this->columnsList->assemble();
			$keys = $this->indexes->assemble();
			$combined = array_merge($columns, $keys);
			$command .= implode(',', $combined);
			
			$command .= ') ' . 
				$this->getPartIfSet(self::PART_ENGINE, 'ENGINE=') .
				$this->getPartIfSet(self::PART_CHARSET, 'CHARSET=') .
				$this->getPartIfSet(self::PART_CHARSET, 'AUTO_INCREMENT=') .
				$this->getPartIfSet(self::PART_COMMENT, 'COMMENT=');
		}
		
		if ($this->parts[self::PART_AS]) 
		{
			$command .= " {$this->getAsExpression()}";
		}
		
		return $command;
	}
public function assemble()
	{
		$command = 
			'CREATE ' . 
				$this->getPartIfSet(self::PART_TEMP) .
			'TABLE ' . 
				$this->getPartIfSet(self::PART_IF_NOT_EXIST) .
				$this->parts[self::PART_DB] . $this->parts[self::PART_NAME];
		
		if ($this->parts[self::PART_LIKE])
		{
			return $command . ' ' . $this->parts[self::PART_LIKE];
		}
		
		if (!$this->columnsList->isEmpty())
		{
			$command .= '(';
			
			$columns = $this->columnsList->assemble();
			$keys = $this->indexes->assemble();
			$combined = array_merge($columns, $keys);
			$command .= implode(',', $combined);
			
			$command .= ') ' . 
				$this->getPartIfSet(self::PART_ENGINE, 'ENGINE=') .
				$this->getPartIfSet(self::PART_CHARSET, 'CHARSET=') .
				$this->getPartIfSet(self::PART_CHARSET, 'AUTO_INCREMENT=') .
				$this->getPartIfSet(self::PART_COMMENT, 'COMMENT=');
		}
		
		if ($this->parts[self::PART_AS]) 
		{
			$command .= " {$this->getAsExpression()}";
		}
		
		return $command;
	}
Generate the query string.
@return string Currently set query.