/** * @param SqlInterface|null $sql * @return string */ public function getSqlString(SqlInterface $sql = null) { $sql = $sql ?: $this->lastSql; if (!$sql) { throw new Exception\InvalidArgumentException('Sql sequence is not supplied.'); } return $sql->getSqlString($this->adapter->getPlatform()); }