refactoring database.

This commit is contained in:
Taylor Otwell
2011-08-19 21:18:59 -05:00
parent bf0aaa3cc7
commit 9d2a76b26f
8 changed files with 35 additions and 64 deletions

View File

@@ -630,7 +630,7 @@ class Query {
foreach (explode('.', $value) as $segment)
{
$wrapped[] = ($segment != '*') ? $this->connection->wrapper().$segment.$this->connection->wrapper() : $segment;
$wrapped[] = ($segment != '*') ? $this->wrapper().$segment.$this->wrapper() : $segment;
}
return implode('.', $wrapped);
@@ -649,6 +649,18 @@ class Query {
return $this->wrap($segments[0]).' AS '.$this->wrap($segments[2]);
}
/**
* Get the keyword identifier wrapper for the connection.
*
* MySQL uses a non-standard wrapper
*
* @return string
*/
protected function wrapper()
{
return '"';
}
/**
* Create query parameters from an array of values.
*