src/Postgresql/PostgresqlDriver.php
public function getQuery($new = false, $asObj = false)
	{
		if ($new)
		{
			// Make sure we have a query class for this driver.
			if (!class_exists('\\Joomla\\Database\\Postgresql\\PostgresqlQuery'))
			{
				throw new UnsupportedAdapterException('\\Joomla\\Database\\Postgresql\\PostgresqlQuery Class not found.');
			}

			$this->queryObject = new PostgresqlQuery($this);

			return $this->queryObject;
		}

		if ($asObj)
		{
			return $this->queryObject;
		}

		return $this->sql;
	}
public function getQuery($new = false, $asObj = false)
	{
		if ($new)
		{
			// Make sure we have a query class for this driver.
			if (!class_exists('\\Joomla\\Database\\Postgresql\\PostgresqlQuery'))
			{
				throw new UnsupportedAdapterException('\\Joomla\\Database\\Postgresql\\PostgresqlQuery Class not found.');
			}

			$this->queryObject = new PostgresqlQuery($this);

			return $this->queryObject;
		}

		if ($asObj)
		{
			return $this->queryObject;
		}

		return $this->sql;
	}
public function getQuery ( $ new = false , $ asObj = false ) { if ( $ new ) { // Make sure we have a query class for this driver. if ( ! class_exists ( '\\Joomla\\Database\\Postgresql\\PostgresqlQuery' ) ) { throw new UnsupportedAdapterException ( '\\Joomla\\Database\\Postgresql\\PostgresqlQuery Class not found.' ) ; } $ this -> queryObject = new PostgresqlQuery ( $ this ) ; return $ this -> queryObject ; } if ( $ asObj ) { return $ this -> queryObject ; } return $ this -> sql ; }
Get the current or query, or new DatabaseQuery object.

@param   boolean  $new    False to return the last query set, True to return a new Query object.
@param   boolean  $asObj  False to return last query as string, true to get Postgresql query object.

@return  PostgresqlQuery  The current query object or a new object extending the Query class.

@since   1.0
@throws  \RuntimeException
Get the current or query or new DatabaseQuery object .