src/DatabaseDriver.php
public function getQuery($new = false)
	{
		if ($new)
		{
			// Derive the class name from the driver.
			$class = '\\Joomla\\Database\\' . ucfirst($this->name) . '\\' . ucfirst($this->name) . 'Query';

			// Make sure we have a query class for this driver.
			if (!class_exists($class))
			{
				// If it doesn't exist we are at an impasse so throw an exception.
				throw new Exception\UnsupportedAdapterException('Database Query Class not found.');
			}

			return new $class($this);
		}

		return $this->sql;
	}
public function getQuery($new = false)
	{
		if ($new)
		{
			// Derive the class name from the driver.
			$class = '\\Joomla\\Database\\' . ucfirst($this->name) . '\\' . ucfirst($this->name) . 'Query';

			// Make sure we have a query class for this driver.
			if (!class_exists($class))
			{
				// If it doesn't exist we are at an impasse so throw an exception.
				throw new Exception\UnsupportedAdapterException('Database Query Class not found.');
			}

			return new $class($this);
		}

		return $this->sql;
	}
public function getQuery ( $ new = false ) { if ( $ new ) { // Derive the class name from the driver. $ class = '\\Joomla\\Database\\' . ucfirst ( $ this -> name ) . '\\' . ucfirst ( $ this -> name ) . 'Query' ; // Make sure we have a query class for this driver. if ( ! class_exists ( $ class ) ) { // If it doesn't exist we are at an impasse so throw an exception. throw new Exception \ UnsupportedAdapterException ( 'Database Query Class not found.' ) ; } return new $ class ( $ this ) ; } return $ this -> sql ; }
Get the current query object or a new DatabaseQuery object.

@param   boolean  $new  False to return the current query object, True to return a new DatabaseQuery object.

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

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