lithium\data\source\database\adapter\PostgreSql::searchPath()

public method

Getter/Setter for the connection's search path.

Parameters

  • null|string $searchPath

    Either null to retrieve the current one, or a string to set the current one to.

Returns

string|boolean

When $searchPath is null returns the current search path in effect, otherwise a boolean indicating if setting the search path succeeded or failed.

Source

	public function searchPath($searchPath = null) {
		if ($searchPath === null) {
			return explode(',', $this->connection->query('SHOW search_path')->fetchColumn(1));
		}
		return $this->connection->exec("SET search_path TO {$searchPath}") !== false;
	}