Add compileExists grammar
This commit is contained in:
parent
ad191bbbe0
commit
a1aad3bb54
@ -179,6 +179,21 @@ class DB2Grammar extends Grammar
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compile an exists statement into SQL.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Database\Query\Builder $query
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function compileExists(Builder $query)
|
||||||
|
{
|
||||||
|
$existsQuery = clone $query;
|
||||||
|
|
||||||
|
$existsQuery->columns = [];
|
||||||
|
|
||||||
|
return $this->compileSelect($existsQuery->selectRaw('1')->limit(1));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the format for database stored dates.
|
* Get the format for database stored dates.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user