lithium\data\source\database\adapter\PostgreSql::searchPath()
Gets or sets the search path for the connection.
Parameters
-
$searchPath
Returns
mixedIf setting the searchPath; returns ture on success, else false When getting, returns the searchPath
Source
public function searchPath($searchPath) {
if (empty($searchPath)) {
$query = $this->connection->query('SHOW search_path');
$searchPath = $query->fetchColumn(1);
return explode(",", $searchPath);
}
try{
$this->connection->exec("SET search_path TO ${searchPath}");
return true;
} catch (PDOException $e) {
return false;
}
}