public final function compile()
	{
		try {
			$q = $this->compileQuery();
			if ($this->log_query) {
				error_log(sprintf("SQL Query (compile):\n%s", $this->query_sql));
			}
			return $q;
		}
		catch (\Exception $ex) {
			// Make sure unfinished query will not make it to the output.
			ob_end_clean();
			throw $ex;
		}
	}