remove query::table method.
This commit is contained in:
parent
e822f34c2f
commit
bf0aaa3cc7
|
@ -90,18 +90,6 @@ public function __construct($table, Connection $connection)
|
||||||
$this->from = 'FROM '.$this->wrap($table);
|
$this->from = 'FROM '.$this->wrap($table);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new query instance.
|
|
||||||
*
|
|
||||||
* @param string $table
|
|
||||||
* @param Connection $connection
|
|
||||||
* @return Query
|
|
||||||
*/
|
|
||||||
public static function table($table, Connection $connection)
|
|
||||||
{
|
|
||||||
return new static($table, $connection);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force the query to return distinct results.
|
* Force the query to return distinct results.
|
||||||
*
|
*
|
||||||
|
@ -638,16 +626,11 @@ public function delete($id = null)
|
||||||
*/
|
*/
|
||||||
private function wrap($value)
|
private function wrap($value)
|
||||||
{
|
{
|
||||||
if (strpos(strtolower($value), ' as ') !== false)
|
if (strpos(strtolower($value), ' as ') !== false) return $this->wrap_alias($value);
|
||||||
{
|
|
||||||
return $this->wrap_alias($value);
|
|
||||||
}
|
|
||||||
|
|
||||||
$wrap = $this->connection->wrapper();
|
|
||||||
|
|
||||||
foreach (explode('.', $value) as $segment)
|
foreach (explode('.', $value) as $segment)
|
||||||
{
|
{
|
||||||
$wrapped[] = ($segment != '*') ? $wrap.$segment.$wrap : $segment;
|
$wrapped[] = ($segment != '*') ? $this->connection->wrapper().$segment.$this->connection->wrapper() : $segment;
|
||||||
}
|
}
|
||||||
|
|
||||||
return implode('.', $wrapped);
|
return implode('.', $wrapped);
|
||||||
|
|
Loading…
Reference in New Issue